@senior-gestao-empresarial/angular-components 7.22.0 → 7.23.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.
Files changed (40) hide show
  1. package/bundles/senior-gestao-empresarial-angular-components.umd.js +441 -3
  2. package/bundles/senior-gestao-empresarial-angular-components.umd.js.map +1 -1
  3. package/bundles/senior-gestao-empresarial-angular-components.umd.min.js +2 -2
  4. package/bundles/senior-gestao-empresarial-angular-components.umd.min.js.map +1 -1
  5. package/components/global-filter/global-filter-modal/global-filter-modal.component.d.ts +41 -0
  6. package/components/global-filter/global-filter.component.d.ts +61 -0
  7. package/components/global-filter/global-filter.module.d.ts +2 -0
  8. package/components/global-filter/global-filter.service.d.ts +54 -0
  9. package/components/global-filter/index.d.ts +3 -0
  10. package/components/lookups/fallback.d.ts +80 -0
  11. package/components/lookups/index.d.ts +1 -0
  12. package/components/storage/filters-storage.service.d.ts +2 -1
  13. package/esm2015/components/global-filter/global-filter-modal/global-filter-modal.component.js +124 -0
  14. package/esm2015/components/global-filter/global-filter.component.js +120 -0
  15. package/esm2015/components/global-filter/global-filter.module.js +29 -0
  16. package/esm2015/components/global-filter/global-filter.service.js +74 -0
  17. package/esm2015/components/global-filter/index.js +4 -0
  18. package/esm2015/components/lookups/fallback.js +81 -0
  19. package/esm2015/components/lookups/index.js +2 -1
  20. package/esm2015/components/storage/filters-storage.service.js +7 -2
  21. package/esm2015/public-api.js +2 -1
  22. package/esm2015/senior-gestao-empresarial-angular-components.js +4 -1
  23. package/esm5/components/global-filter/global-filter-modal/global-filter-modal.component.js +124 -0
  24. package/esm5/components/global-filter/global-filter.component.js +135 -0
  25. package/esm5/components/global-filter/global-filter.module.js +32 -0
  26. package/esm5/components/global-filter/global-filter.service.js +87 -0
  27. package/esm5/components/global-filter/index.js +4 -0
  28. package/esm5/components/lookups/fallback.js +81 -0
  29. package/esm5/components/lookups/index.js +2 -1
  30. package/esm5/components/storage/filters-storage.service.js +12 -5
  31. package/esm5/public-api.js +2 -1
  32. package/esm5/senior-gestao-empresarial-angular-components.js +4 -1
  33. package/fesm2015/senior-gestao-empresarial-angular-components.js +402 -5
  34. package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
  35. package/fesm5/senior-gestao-empresarial-angular-components.js +437 -7
  36. package/fesm5/senior-gestao-empresarial-angular-components.js.map +1 -1
  37. package/package.json +1 -1
  38. package/public-api.d.ts +1 -0
  39. package/senior-gestao-empresarial-angular-components.d.ts +3 -0
  40. package/senior-gestao-empresarial-angular-components.metadata.json +1 -1
@@ -6,15 +6,15 @@ import { NavigationEnd, PRIMARY_OUTLET, ActivatedRoute, Router, RouterModule } f
6
6
  import { Subject, throwError, from, of, interval, BehaviorSubject, ReplaySubject } from 'rxjs';
7
7
  import { takeUntil, filter, catchError, map, takeWhile, switchMap, take, finalize } from 'rxjs/operators';
8
8
  import * as moment$2 from 'moment';
9
- import { FormField, FieldType, ButtonModule, LoadingStateModule } from '@seniorsistemas/angular-components';
9
+ import { FormField, FieldType, ButtonModule, LoadingStateModule, DynamicFormModule } from '@seniorsistemas/angular-components';
10
10
  import { HttpParams, HttpClient } from '@angular/common/http';
11
11
  import { MessageService } from 'primeng/api';
12
- import { TranslateService } from '@ngx-translate/core';
12
+ import { TranslateService, TranslateModule } from '@ngx-translate/core';
13
13
  import { HttpInterceptorModule } from '@seniorsistemas/platform-components';
14
14
  import { TooltipModule } from 'primeng/tooltip';
15
15
  import { DialogModule } from 'primeng/dialog';
16
16
  import { trigger, state, style, transition, animate } from '@angular/animations';
17
- import { FormControl, FormGroup } from '@angular/forms';
17
+ import { FormControl, FormGroup, FormBuilder } from '@angular/forms';
18
18
  import { user } from '@seniorsistemas/senior-platform-data';
19
19
  import { Client, FrameImpl } from '@stomp/stompjs';
20
20
  import * as SockJS from 'sockjs-client';
@@ -7368,6 +7368,87 @@ var DfeEventoLookup = /** @class */ (function (_super) {
7368
7368
  return DfeEventoLookup;
7369
7369
  }(ErpLookups));
7370
7370
 
7371
+ var fallback = {
7372
+ "Entidades": "",
7373
+ "erpx_fnd.empresa.lookup_e070emp": "Empresa",
7374
+ "erpx_fnd.empresa.lookup_e070emp_search_title": "Consultar empresa",
7375
+ "erpx_fnd.empresa.lookup_e070emp_cod_emp": "Código",
7376
+ "erpx_fnd.empresa.lookup_e070emp_nom_emp": "Nome",
7377
+ "erpx_fnd.empresa.lookup_e070fil": "Filial",
7378
+ "erpx_fnd.empresa.lookup_e070fil_search_title": "Consultar filial",
7379
+ "erpx_fnd.empresa.lookup_e070fil_cod_fil": "Código",
7380
+ "erpx_fnd.empresa.lookup_e070fil_nom_fil": "Nome",
7381
+ "erpx_fnd.empresa.lookup_e070fil_sig_fil": "Sigla",
7382
+ "erpx_fnd.empresa.lookup_e070fil_num_cgc": "CNPJ/CPF",
7383
+ "erpx_fnd.empresa.lookup_e070fil_e007ufs.sig_ufs": "Estado",
7384
+ "erpx_fnd.empresa.lookup_e070fil_e008rai.nom_cid": "Cidade",
7385
+ "erpx_fnd.empresa.lookup_e070fil_ins_est": "Inscrição estadual",
7386
+ "erpx_fnd.empresa.lookup_e070fil_e007ufs_sig_ufs.sig_ufs": "Estado",
7387
+ "erpx_fnd.empresa.lookup_e070fil_bai_fil": "Bairro",
7388
+ "erpx_fnd.empresa.lookup_e070fil_fil_mat": "Matriz",
7389
+ "erpx_fnd.empresa.nothing_found": "Nenhum registro foi encontrado",
7390
+ "erpx_fnd.empresa.filter": "Filtrar",
7391
+ "erpx_fnd.empresa.clear": "Limpar",
7392
+ "erpx_fnd.empresa.cancel": "Cancelar",
7393
+ "erpx_fnd.empresa.select": "Selecionar",
7394
+ "erpx_fnd.empresa.yes": "Sim",
7395
+ "erpx_fnd.empresa.no": "Não",
7396
+ "erpx_fnd.empresa.click_to_select": "Clique para selecionar",
7397
+ "erpx_fnd.empresa.company_and_branch": "Empresa/Filial",
7398
+ "erpx_fnd.empresa.global_filter_header": "Filtros para preenchimento automático",
7399
+ "erpx_fnd.empresa.global_filter_description": "Escolha a empresa e filial que serão aplicadas automaticamente nos filtros, reduzindo preenchimentos repetitivos.",
7400
+ "erpx_cpl_ctb.movimentacao_contabil.lookup_e070fil_e070emp.cod_emp": "Código",
7401
+ "erpx_cpl_ctb.movimentacao_contabil.lookup_e070fil_e070emp.sig_emp": "Sigla",
7402
+ "erpx_fnd.financeiro.lookup_e030age": "Agência",
7403
+ "erpx_fnd.financeiro.lookup_e030age_search_title": "Consultar banco",
7404
+ "erpx_fnd.financeiro.lookup_e030age_cod_age": "Código",
7405
+ "erpx_fnd.financeiro.lookup_e030age_nom_age": "Nome",
7406
+ "erpx_fnd.financeiro.nothing_found": "Nenhum registro foi encontrado",
7407
+ "erpx_fnd.financeiro.filter": "Filtrar",
7408
+ "erpx_fnd.financeiro.clear": "Limpar",
7409
+ "erpx_fnd.financeiro.cancel": "Cancelar",
7410
+ "erpx_fnd.financeiro.select": "Selecionar",
7411
+ "erpx_fnd.financeiro.yes": "Sim",
7412
+ "erpx_fnd.financeiro.no": "Não",
7413
+ "erpx_fin.foundation.lookup_e030ban": "Banco",
7414
+ "erpx_fin.foundation.lookup_e030ban_search_title": "Consultar banco",
7415
+ "erpx_fin.foundation.lookup_e030ban_cod_ban": "Código",
7416
+ "erpx_fin.foundation.lookup_e030ban_nom_ban": "Nome",
7417
+ "erpx_fin.foundation.lookup_e600cco": "Conta interna",
7418
+ "erpx_fin.foundation.lookup_e600cco_search_title": "Consultar conta interna",
7419
+ "erpx_fin.foundation.lookup_e600cco_num_cco": "Número",
7420
+ "erpx_fin.foundation.lookup_e600cco_des_cco": "Descrição",
7421
+ "erpx_fin.foundation.nothing_found": "Nenhum registro foi encontrado",
7422
+ "erpx_fin.foundation.filter": "Filtrar",
7423
+ "erpx_fin.foundation.clear": "Limpar",
7424
+ "erpx_fin.foundation.cancel": "Cancelar",
7425
+ "erpx_fin.foundation.select": "Selecionar",
7426
+ "erpx_fin.foundation.yes": "Sim",
7427
+ "erpx_fin.foundation.no": "Não",
7428
+ "erpx_fnd.transacao.lookup_e001tns": "Transação",
7429
+ "erpx_fnd.transacao.lookup_e001tns_search_title": "Consultar transação",
7430
+ "erpx_fnd.transacao.lookup_e001tns_cod_tns": "Código",
7431
+ "erpx_fnd.transacao.lookup_e001tns_des_tns": "Descrição",
7432
+ "erpx_fnd.transacao.nothing_found": "Nenhum registro foi encontrado",
7433
+ "erpx_fnd.transacao.filter": "Filtrar",
7434
+ "erpx_fnd.transacao.clear": "Limpar",
7435
+ "erpx_fnd.transacao.cancel": "Cancelar",
7436
+ "erpx_fnd.transacao.select": "Selecionar",
7437
+ "erpx_fnd.transacao.yes": "Sim",
7438
+ "erpx_fnd.transacao.no": "Não",
7439
+ "Enums": "",
7440
+ "erpx_fin.tesouraria.enum_tip_tcc_v_1": "Conta Corrente",
7441
+ "erpx_fin.tesouraria.enum_tip_tcc_v_2": "Conta Poupança",
7442
+ "erpx_fin.tesouraria.enum_tip_tcc_v_3": "Conta Investimento",
7443
+ "erpx_fin.tesouraria.enum_tip_tcc_v_4": "Conta Aplicação Financeira",
7444
+ "erpx_fin.tesouraria.enum_tip_tcc_v_5": "Conta Empréstimo",
7445
+ "erpx_fin.tesouraria.enum_tip_tcc_v_6": "Cota Capital",
7446
+ "erpx_fin.tesouraria.enum_tip_tcc_v_7": "Conta de Retenção",
7447
+ "erpx_fin.tesouraria.enum_tip_tcc_v_8": "Conta da Loja",
7448
+ "erpx_fin.tesouraria.enum_tip_tcc_v_9": "Conta Salário",
7449
+ "erpx_fin.tesouraria.enum_tip_tcc_v_10": "Outros"
7450
+ };
7451
+
7371
7452
  var ErpLookupsModule = /** @class */ (function () {
7372
7453
  function ErpLookupsModule() {
7373
7454
  }
@@ -8611,6 +8692,7 @@ var StorageService = /** @class */ (function () {
8611
8692
  }());
8612
8693
 
8613
8694
  var moment$1 = moment$2; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
8695
+ var ERPX_GLOBAL_FILTER_KEY = 'ERPX_GLOBAL_FILTER';
8614
8696
  var FiltersStorageService = /** @class */ (function (_super) {
8615
8697
  __extends(FiltersStorageService, _super);
8616
8698
  function FiltersStorageService() {
@@ -8636,15 +8718,21 @@ var FiltersStorageService = /** @class */ (function (_super) {
8636
8718
  });
8637
8719
  });
8638
8720
  };
8639
- FiltersStorageService.prototype.getFilters = function (key) {
8721
+ FiltersStorageService.prototype.getFilters = function (key, includeGlobalFilter) {
8722
+ if (includeGlobalFilter === void 0) { includeGlobalFilter = false; }
8640
8723
  return __awaiter(this, void 0, void 0, function () {
8641
- var store;
8724
+ var store, globalStore;
8642
8725
  return __generator(this, function (_a) {
8643
8726
  switch (_a.label) {
8644
8727
  case 0: return [4 /*yield*/, _super.prototype.get.call(this, this.FILTERS_KEY)];
8645
8728
  case 1:
8646
8729
  store = (_a.sent()) || {};
8647
- return [2 /*return*/, store[key] || {}];
8730
+ if (!includeGlobalFilter) return [3 /*break*/, 3];
8731
+ return [4 /*yield*/, _super.prototype.get.call(this, ERPX_GLOBAL_FILTER_KEY)];
8732
+ case 2:
8733
+ globalStore = (_a.sent()) || {};
8734
+ return [2 /*return*/, __assign(__assign({}, globalStore), store[key])];
8735
+ case 3: return [2 /*return*/, store[key] || {}];
8648
8736
  }
8649
8737
  });
8650
8738
  });
@@ -9559,9 +9647,351 @@ var ModulesEnum;
9559
9647
  ModulesEnum["CONTROLADORIA_GERENCIAL"] = "CONTROLADORIA_GERENCIAL";
9560
9648
  })(ModulesEnum || (ModulesEnum = {}));
9561
9649
 
9650
+ var GlobalFilterService = /** @class */ (function () {
9651
+ function GlobalFilterService() {
9652
+ this._showComponent = true;
9653
+ this._excludedRoutes = [];
9654
+ this.filterChangeSubject = new Subject();
9655
+ }
9656
+ /**
9657
+ * Emits a filter change event to all subscribers.
9658
+ * This method should be called whenever the global filter values change
9659
+ * to notify all components listening for filter updates.
9660
+ *
9661
+ * @param event - The filter fields object containing e070emp and e070fil information
9662
+ * @param event.e070emp - e070emp (company) filter value
9663
+ * @param event.e070fil - e070fil (branch) filter value
9664
+ */
9665
+ GlobalFilterService.prototype.onFilterChange = function (event) {
9666
+ this.filterChangeSubject.next(event);
9667
+ };
9668
+ Object.defineProperty(GlobalFilterService.prototype, "filterChange", {
9669
+ /**
9670
+ * Observable stream of filter changes.
9671
+ * Subscribe to this to receive notifications when the filter changes.
9672
+ *
9673
+ * @returns Observable that emits objects containing e070emp and e070fil filter values
9674
+ */
9675
+ get: function () {
9676
+ return this.filterChangeSubject.asObservable();
9677
+ },
9678
+ enumerable: true,
9679
+ configurable: true
9680
+ });
9681
+ Object.defineProperty(GlobalFilterService.prototype, "showComponent", {
9682
+ /**
9683
+ * Gets the visibility state of the global filter component.
9684
+ * Use this to determine whether the global filter should be displayed.
9685
+ *
9686
+ * @returns true if the component should be shown, false otherwise
9687
+ */
9688
+ get: function () {
9689
+ return this._showComponent;
9690
+ },
9691
+ /**
9692
+ * Sets the visibility state of the global filter component.
9693
+ * Use this to programmatically show or hide the global filter.
9694
+ *
9695
+ * @param value - true to show the component, false to hide it
9696
+ */
9697
+ set: function (value) {
9698
+ this._showComponent = value;
9699
+ },
9700
+ enumerable: true,
9701
+ configurable: true
9702
+ });
9703
+ Object.defineProperty(GlobalFilterService.prototype, "excludedRoutes", {
9704
+ /**
9705
+ * Gets the list of routes where the global filter component should not be displayed.
9706
+ * These routes will automatically hide the global filter component.
9707
+ *
9708
+ * @returns Array of route paths to exclude from displaying the global filter
9709
+ */
9710
+ get: function () {
9711
+ return this._excludedRoutes;
9712
+ },
9713
+ /**
9714
+ * Sets the routes where the global filter component should not be displayed.
9715
+ * Use this to configure which pages should not show the global filter.
9716
+ *
9717
+ * @param value - Array of route paths to exclude from displaying the global filter
9718
+ */
9719
+ set: function (value) {
9720
+ this._excludedRoutes = value;
9721
+ },
9722
+ enumerable: true,
9723
+ configurable: true
9724
+ });
9725
+ GlobalFilterService.ɵprov = ɵɵdefineInjectable({ factory: function GlobalFilterService_Factory() { return new GlobalFilterService(); }, token: GlobalFilterService, providedIn: "root" });
9726
+ GlobalFilterService = __decorate([
9727
+ Injectable({ providedIn: 'root' })
9728
+ ], GlobalFilterService);
9729
+ return GlobalFilterService;
9730
+ }());
9731
+
9732
+ var GlobalFilterComponent = /** @class */ (function () {
9733
+ function GlobalFilterComponent(storageService, globalFilterService, router, translate) {
9734
+ this.storageService = storageService;
9735
+ this.globalFilterService = globalFilterService;
9736
+ this.router = router;
9737
+ this.translate = translate;
9738
+ /**
9739
+ * Routes that are excluded from the global filter by default.
9740
+ * These routes will not have the global filter applied to them.
9741
+ */
9742
+ this.defaultExcludedRoutes = ['forbidden', 'main', 'not-found'];
9743
+ this._showComponent = true;
9744
+ this.showModal = false;
9745
+ this.ngUnsubscribe = new Subject();
9746
+ }
9747
+ Object.defineProperty(GlobalFilterComponent.prototype, "mobileTooltip", {
9748
+ /**
9749
+ * Gets a formatted tooltip string for mobile devices.
9750
+ * Concatenates all active field labels and values separated by newlines.
9751
+ */
9752
+ get: function () {
9753
+ var lines = this.fields
9754
+ .filter(function (filterItem) { return filterItem.value; })
9755
+ .map(function (filterItem) { return filterItem.label + ": " + filterItem.displayText; });
9756
+ return lines.length > 0 ? lines.join('\n') : null;
9757
+ },
9758
+ enumerable: true,
9759
+ configurable: true
9760
+ });
9761
+ Object.defineProperty(GlobalFilterComponent.prototype, "fields", {
9762
+ /**
9763
+ * Gets the current filter field configuration array.
9764
+ */
9765
+ get: function () {
9766
+ return [
9767
+ {
9768
+ label: this.translate.instant('erpx_fnd.empresa.e_070_emp'),
9769
+ value: this.e070emp,
9770
+ displayText: this.e070emp ? "" + this.e070emp.label : null
9771
+ },
9772
+ {
9773
+ label: this.translate.instant('erpx_fnd.empresa.e_070_fil'),
9774
+ value: this.e070fil,
9775
+ displayText: this.e070fil ? "" + this.e070fil.label : null
9776
+ }
9777
+ ];
9778
+ },
9779
+ enumerable: true,
9780
+ configurable: true
9781
+ });
9782
+ Object.defineProperty(GlobalFilterComponent.prototype, "showComponent", {
9783
+ /**
9784
+ * Gets the visibility state of the global filter component.
9785
+ * Considers both the service-level visibility setting and the current route.
9786
+ */
9787
+ get: function () {
9788
+ return this.globalFilterService.showComponent && this._showComponent;
9789
+ },
9790
+ enumerable: true,
9791
+ configurable: true
9792
+ });
9793
+ GlobalFilterComponent.prototype.ngOnInit = function () {
9794
+ this.loadFiltersFromStorage();
9795
+ this.initializeRouteListener();
9796
+ };
9797
+ GlobalFilterComponent.prototype.ngOnDestroy = function () {
9798
+ this.ngUnsubscribe.next();
9799
+ this.ngUnsubscribe.complete();
9800
+ };
9801
+ /**
9802
+ * Handles the closing of the filter modal and updates field values.
9803
+ * When fields are provided, updates the component state and notifies the GlobalFilterService.
9804
+ *
9805
+ * @param event - Optional filter field values from the modal
9806
+ */
9807
+ GlobalFilterComponent.prototype.onHide = function (event) {
9808
+ this.showModal = false;
9809
+ if (event) {
9810
+ this.e070emp = event.e070emp;
9811
+ this.e070fil = event.e070fil;
9812
+ this.globalFilterService.onFilterChange(event);
9813
+ }
9814
+ };
9815
+ /**
9816
+ * Loads the previously saved filter values from local storage.
9817
+ * Retrieves the filter data using the ERPX_GLOBAL_FILTER_KEY and applies it
9818
+ * to the component's e070emp and e070fil properties if available.
9819
+ */
9820
+ GlobalFilterComponent.prototype.loadFiltersFromStorage = function () {
9821
+ var _this = this;
9822
+ this.storageService.get(ERPX_GLOBAL_FILTER_KEY).then(function (filterData) {
9823
+ if (filterData && Object.keys(filterData).length > 0) {
9824
+ _this.e070emp = filterData.e070emp;
9825
+ _this.e070fil = filterData.e070fil;
9826
+ }
9827
+ });
9828
+ };
9829
+ /**
9830
+ * Initializes the route change listener to manage component visibility.
9831
+ * Subscribes to router navigation events and sets the component visibility
9832
+ * based on the current route against excluded routes (default and service-configured).
9833
+ */
9834
+ GlobalFilterComponent.prototype.initializeRouteListener = function () {
9835
+ var _this = this;
9836
+ this.router.events.pipe(takeUntil(this.ngUnsubscribe), filter(function (event) { return event instanceof NavigationEnd; })).subscribe(function (event) {
9837
+ var excludedRoutes = new RegExp("^/(" + __spread(_this.defaultExcludedRoutes, _this.globalFilterService.excludedRoutes).join('|') + ")(/|$)");
9838
+ var currentRoute = event.urlAfterRedirects;
9839
+ _this._showComponent = !excludedRoutes.test(currentRoute);
9840
+ });
9841
+ };
9842
+ GlobalFilterComponent.ctorParameters = function () { return [
9843
+ { type: FiltersStorageService },
9844
+ { type: GlobalFilterService },
9845
+ { type: Router },
9846
+ { type: TranslateService }
9847
+ ]; };
9848
+ GlobalFilterComponent = __decorate([
9849
+ Component({
9850
+ selector: 'erpx-global-filter',
9851
+ template: "<ng-container *ngIf=\"showComponent\">\n <div class=\"global-filter-mobile\">\n <small class=\"label-title\">\n {{ 'erpx_fnd.empresa.filters' | translate }}\n </small>\n <div>\n <a (click)=\"showModal = true\" class=\"mobile-trigger\" [attr.title]=\"mobileTooltip\">\n <em class=\"fa fa-pencil-square-o\"></em>\n {{ 'erpx_fnd.empresa.company_and_branch' | translate }}\n </a>\n </div>\n </div>\n <div class=\"global-filter-desktop\">\n <div class=\"ui-g\">\n <div class=\"ui-g-6\" *ngFor=\"let field of fields\">\n <small class=\"label-title\">\n {{ field.label }}\n </small>\n <div>\n <a (click)=\"showModal = true\">\n <ng-container *ngIf=\"field.value; else emptyField\">\n <em class=\"fa fa-pencil-square-o\"></em>\n {{ field.displayText }}\n </ng-container>\n </a>\n </div>\n </div>\n </div>\n </div>\n <ng-template #emptyField>\n <em class=\"fa fa-search\"></em>\n {{ 'erpx_fnd.empresa.click_to_select' | translate }}\n </ng-template>\n\n <global-filter-modal *ngIf=\"showModal\"\n [e070emp]=\"e070emp\"\n [e070fil]=\"e070fil\"\n (hideModal)=\"onHide($event)\"\n ></global-filter-modal>\n</ng-container>",
9852
+ styles: [".label-title{color:#999}.global-filter-desktop,.global-filter-mobile{display:block;padding:8px 0}.global-filter-desktop a:hover,.global-filter-mobile a:hover{text-decoration:underline}.global-filter-desktop a .fa,.global-filter-mobile a .fa{margin-right:4px}.global-filter-desktop{display:none}@media (min-width:768px){.global-filter-mobile{display:none}.global-filter-desktop{display:block;width:480px}.global-filter-desktop a{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}"]
9853
+ })
9854
+ ], GlobalFilterComponent);
9855
+ return GlobalFilterComponent;
9856
+ }());
9857
+
9858
+ var GlobalFilterModalComponent = /** @class */ (function () {
9859
+ function GlobalFilterModalComponent(formBuilder, translate, e070empLookup, e070filLookup, storageService) {
9860
+ this.formBuilder = formBuilder;
9861
+ this.translate = translate;
9862
+ this.e070empLookup = e070empLookup;
9863
+ this.e070filLookup = e070filLookup;
9864
+ this.storageService = storageService;
9865
+ this.hideModal = new EventEmitter();
9866
+ this.isVisible = true;
9867
+ this.ngUnsubscribe = new Subject();
9868
+ }
9869
+ GlobalFilterModalComponent.prototype.ngOnInit = function () {
9870
+ this.createFormGroup();
9871
+ this.createFormField();
9872
+ this.handleFormChanges();
9873
+ };
9874
+ GlobalFilterModalComponent.prototype.ngOnDestroy = function () {
9875
+ this.ngUnsubscribe.next();
9876
+ this.ngUnsubscribe.complete();
9877
+ };
9878
+ /**
9879
+ * Handles the modal closing event.
9880
+ * Hides the modal and emits the optionally provided filter values to the parent component.
9881
+ *
9882
+ * @param value - Optional filter field values to emit when closing the modal
9883
+ */
9884
+ GlobalFilterModalComponent.prototype.onHide = function (value) {
9885
+ this.isVisible = false;
9886
+ this.hideModal.emit(value);
9887
+ };
9888
+ /**
9889
+ * Saves the current form values and closes the modal.
9890
+ * Stores the filter values in local storage and then triggers the hide event
9891
+ * with the saved values.
9892
+ */
9893
+ GlobalFilterModalComponent.prototype.onSave = function () {
9894
+ var _this = this;
9895
+ var value = this.formGroup.getRawValue();
9896
+ this.storageService.store(ERPX_GLOBAL_FILTER_KEY, value).then(function () { return _this.onHide(value); });
9897
+ };
9898
+ GlobalFilterModalComponent.prototype.createFormGroup = function () {
9899
+ this.formGroup = this.formBuilder.group({
9900
+ e070emp: [{ value: this.e070emp, disabled: false }],
9901
+ e070fil: [{ value: this.e070fil, disabled: !this.e070emp }],
9902
+ });
9903
+ };
9904
+ GlobalFilterModalComponent.prototype.createFormField = function () {
9905
+ var _this = this;
9906
+ this.formFields = [
9907
+ new FormField(__assign(__assign({}, this.e070empLookup.mountOptions({
9908
+ multiple: false,
9909
+ queryFields: ['e031moe.sigMoe']
9910
+ })), { appendTo: "body", emptyMessage: this.translate.instant('erpx_fnd.empresa.nothing_found') })),
9911
+ new FormField(__assign(__assign({}, this.e070filLookup.mountOptions({
9912
+ multiple: false,
9913
+ lookupFields: [
9914
+ { name: "codFil", type: FieldType.Integer },
9915
+ { name: "nomFil", type: FieldType.String },
9916
+ ],
9917
+ searchFields: [
9918
+ { name: "codFil", type: FieldType.Integer },
9919
+ { name: "nomFil", type: FieldType.String },
9920
+ ],
9921
+ searchGridFields: [
9922
+ { name: "codFil", type: FieldType.Integer },
9923
+ { name: "nomFil", type: FieldType.String },
9924
+ ],
9925
+ entityDependency: [
9926
+ {
9927
+ name: "e070emp",
9928
+ field: "id",
9929
+ value: function () { return _this.formGroup.get("e070emp").value; }
9930
+ },
9931
+ ],
9932
+ })), { emptyMessage: this.translate.instant('erpx_fnd.empresa.nothing_found'), appendTo: "body" })),
9933
+ ];
9934
+ };
9935
+ GlobalFilterModalComponent.prototype.handleFormChanges = function () {
9936
+ var _this = this;
9937
+ this.formGroup.controls.e070emp.valueChanges
9938
+ .pipe(takeUntil(this.ngUnsubscribe))
9939
+ .subscribe(function (value) {
9940
+ var control = _this.formGroup.get('e070fil');
9941
+ value ? control.enable() : control.disable();
9942
+ control.reset();
9943
+ });
9944
+ };
9945
+ GlobalFilterModalComponent.ctorParameters = function () { return [
9946
+ { type: FormBuilder },
9947
+ { type: TranslateService },
9948
+ { type: E070EmpLookup },
9949
+ { type: E070FilLookup },
9950
+ { type: FiltersStorageService }
9951
+ ]; };
9952
+ __decorate([
9953
+ Input()
9954
+ ], GlobalFilterModalComponent.prototype, "e070emp", void 0);
9955
+ __decorate([
9956
+ Input()
9957
+ ], GlobalFilterModalComponent.prototype, "e070fil", void 0);
9958
+ __decorate([
9959
+ Output()
9960
+ ], GlobalFilterModalComponent.prototype, "hideModal", void 0);
9961
+ GlobalFilterModalComponent = __decorate([
9962
+ Component({
9963
+ selector: 'global-filter-modal',
9964
+ template: "<p-dialog\n [(visible)]=\"isVisible\"\n [modal]=\"true\"\n (onHide)=\"onHide()\"\n [draggable]=\"false\"\n [resizable]=\"false\"\n [focusOnShow]=\"false\"\n>\n <p-header>\n {{ 'erpx_fnd.empresa.global_filter_header' | translate }}\n </p-header>\n <p class=\"description\">\n {{ 'erpx_fnd.empresa.global_filter_description' | translate }}\n </p>\n <br>\n <s-dynamic-form\n [fields]=\"formFields\" [form]=\"formGroup\"\n ></s-dynamic-form>\n <p-footer>\n <s-button\n [label]=\"'erpx_fnd.empresa.save' | translate\"\n priority=\"primary\"\n (onClick)=\"onSave()\"\n ></s-button>\n <s-button\n [label]=\"'erpx_fnd.empresa.cancel' | translate\"\n priority=\"link\"\n (onClick)=\"onHide()\"\n ></s-button>\n </p-footer>\n</p-dialog>\n",
9965
+ styles: ["\n .description {\n padding: 0px 7px;\n }\n "]
9966
+ })
9967
+ ], GlobalFilterModalComponent);
9968
+ return GlobalFilterModalComponent;
9969
+ }());
9970
+
9971
+ var GlobalFilterModule = /** @class */ (function () {
9972
+ function GlobalFilterModule() {
9973
+ }
9974
+ GlobalFilterModule = __decorate([
9975
+ NgModule({
9976
+ imports: [
9977
+ CommonModule,
9978
+ DynamicFormModule,
9979
+ DialogModule,
9980
+ ButtonModule,
9981
+ TranslateModule,
9982
+ ErpLookupsModule,
9983
+ ],
9984
+ providers: [FiltersStorageService],
9985
+ declarations: [GlobalFilterComponent, GlobalFilterModalComponent],
9986
+ exports: [GlobalFilterComponent],
9987
+ })
9988
+ ], GlobalFilterModule);
9989
+ return GlobalFilterModule;
9990
+ }());
9991
+
9562
9992
  /**
9563
9993
  * Generated bundle index. Do not edit.
9564
9994
  */
9565
9995
 
9566
- export { AgreementLookup, BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, CaracteristicaFiscalLookup, ClassificacaoTributariaLookup, ComposicaoBaseCalculoLookup, ContaInternaFilialLookup, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, DfeEventoLookup, DocumentoLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E006PaiLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E034TccLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E041CebLookup, E043MpcLookup, E043PcmLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E069GreLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E076MarLookup, E080SerLookup, E081TabLookup, E082TprLookup, E085PesLookup, E089DocLookup, E090HrpComGerLookup, E090PesLookup, E091PlfLookup, E095HfoSupGerLookup, E095PesLookup, E099UsuComGerLookup, E099UsuSupCprLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E501TcpLookup, E600CcoLookup, E640LotLookup, EntityPersonProductLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsFormField, ErpLookupsModule, ErpLookupsService, ErpObjectCardModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, HTTP_STATUS_CODE, IndOperacaoFornecimentoLookup, LeiComplementar1162003Lookup, LigacaoItemFornecedorLookup, ListaServicoNacionalLookup, LookupValidationUtils, ModulesEnum, NbsLookup, NcmLookup, NotaFiscalEntradaLookup, NpsService, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, OperacoesLookup, OrigemDestinoLookup, OrigemMercadoriaLookup, ParametersLookup, PrimitiveManager, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, SegmentoLookup, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, VerifyModulePermissions, WebsocketService, naturezaReceitaPisCofins, ɵ0, ɵ1, ɵ2, EnumAnaSin as ɵa, EnumNatCtb as ɵb, ThumbnailService as ɵc, BorderButtonModule as ɵd, BorderButtonComponent as ɵe, StorageService as ɵf, UserInformationService as ɵg, VerifyModulePermissionService as ɵh, VerifyModulePermissionsService as ɵi };
9996
+ export { AgreementLookup, BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, CaracteristicaFiscalLookup, ClassificacaoTributariaLookup, ComposicaoBaseCalculoLookup, ContaInternaFilialLookup, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, DfeEventoLookup, DocumentoLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E006PaiLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E034TccLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E041CebLookup, E043MpcLookup, E043PcmLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E069GreLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E076MarLookup, E080SerLookup, E081TabLookup, E082TprLookup, E085PesLookup, E089DocLookup, E090HrpComGerLookup, E090PesLookup, E091PlfLookup, E095HfoSupGerLookup, E095PesLookup, E099UsuComGerLookup, E099UsuSupCprLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E501TcpLookup, E600CcoLookup, E640LotLookup, ERPX_GLOBAL_FILTER_KEY, EntityPersonProductLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsFormField, ErpLookupsModule, ErpLookupsService, ErpObjectCardModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, GlobalFilterComponent, GlobalFilterModule, GlobalFilterService, HTTP_STATUS_CODE, IndOperacaoFornecimentoLookup, LeiComplementar1162003Lookup, LigacaoItemFornecedorLookup, ListaServicoNacionalLookup, LookupValidationUtils, ModulesEnum, NbsLookup, NcmLookup, NotaFiscalEntradaLookup, NpsService, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, OperacoesLookup, OrigemDestinoLookup, OrigemMercadoriaLookup, ParametersLookup, PrimitiveManager, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, SegmentoLookup, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, VerifyModulePermissions, WebsocketService, fallback, naturezaReceitaPisCofins, ɵ0, ɵ1, ɵ2, EnumAnaSin as ɵa, EnumNatCtb as ɵb, ThumbnailService as ɵc, BorderButtonModule as ɵd, BorderButtonComponent as ɵe, StorageService as ɵf, UserInformationService as ɵg, VerifyModulePermissionService as ɵh, VerifyModulePermissionsService as ɵi, FiltersStorageService as ɵj, ErpLookupsModule as ɵk, GlobalFilterModalComponent as ɵl };
9567
9997
  //# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map