@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';
@@ -6947,6 +6947,87 @@ DfeEventoLookup = __decorate([
6947
6947
  Injectable()
6948
6948
  ], DfeEventoLookup);
6949
6949
 
6950
+ const fallback = {
6951
+ "Entidades": "",
6952
+ "erpx_fnd.empresa.lookup_e070emp": "Empresa",
6953
+ "erpx_fnd.empresa.lookup_e070emp_search_title": "Consultar empresa",
6954
+ "erpx_fnd.empresa.lookup_e070emp_cod_emp": "Código",
6955
+ "erpx_fnd.empresa.lookup_e070emp_nom_emp": "Nome",
6956
+ "erpx_fnd.empresa.lookup_e070fil": "Filial",
6957
+ "erpx_fnd.empresa.lookup_e070fil_search_title": "Consultar filial",
6958
+ "erpx_fnd.empresa.lookup_e070fil_cod_fil": "Código",
6959
+ "erpx_fnd.empresa.lookup_e070fil_nom_fil": "Nome",
6960
+ "erpx_fnd.empresa.lookup_e070fil_sig_fil": "Sigla",
6961
+ "erpx_fnd.empresa.lookup_e070fil_num_cgc": "CNPJ/CPF",
6962
+ "erpx_fnd.empresa.lookup_e070fil_e007ufs.sig_ufs": "Estado",
6963
+ "erpx_fnd.empresa.lookup_e070fil_e008rai.nom_cid": "Cidade",
6964
+ "erpx_fnd.empresa.lookup_e070fil_ins_est": "Inscrição estadual",
6965
+ "erpx_fnd.empresa.lookup_e070fil_e007ufs_sig_ufs.sig_ufs": "Estado",
6966
+ "erpx_fnd.empresa.lookup_e070fil_bai_fil": "Bairro",
6967
+ "erpx_fnd.empresa.lookup_e070fil_fil_mat": "Matriz",
6968
+ "erpx_fnd.empresa.nothing_found": "Nenhum registro foi encontrado",
6969
+ "erpx_fnd.empresa.filter": "Filtrar",
6970
+ "erpx_fnd.empresa.clear": "Limpar",
6971
+ "erpx_fnd.empresa.cancel": "Cancelar",
6972
+ "erpx_fnd.empresa.select": "Selecionar",
6973
+ "erpx_fnd.empresa.yes": "Sim",
6974
+ "erpx_fnd.empresa.no": "Não",
6975
+ "erpx_fnd.empresa.click_to_select": "Clique para selecionar",
6976
+ "erpx_fnd.empresa.company_and_branch": "Empresa/Filial",
6977
+ "erpx_fnd.empresa.global_filter_header": "Filtros para preenchimento automático",
6978
+ "erpx_fnd.empresa.global_filter_description": "Escolha a empresa e filial que serão aplicadas automaticamente nos filtros, reduzindo preenchimentos repetitivos.",
6979
+ "erpx_cpl_ctb.movimentacao_contabil.lookup_e070fil_e070emp.cod_emp": "Código",
6980
+ "erpx_cpl_ctb.movimentacao_contabil.lookup_e070fil_e070emp.sig_emp": "Sigla",
6981
+ "erpx_fnd.financeiro.lookup_e030age": "Agência",
6982
+ "erpx_fnd.financeiro.lookup_e030age_search_title": "Consultar banco",
6983
+ "erpx_fnd.financeiro.lookup_e030age_cod_age": "Código",
6984
+ "erpx_fnd.financeiro.lookup_e030age_nom_age": "Nome",
6985
+ "erpx_fnd.financeiro.nothing_found": "Nenhum registro foi encontrado",
6986
+ "erpx_fnd.financeiro.filter": "Filtrar",
6987
+ "erpx_fnd.financeiro.clear": "Limpar",
6988
+ "erpx_fnd.financeiro.cancel": "Cancelar",
6989
+ "erpx_fnd.financeiro.select": "Selecionar",
6990
+ "erpx_fnd.financeiro.yes": "Sim",
6991
+ "erpx_fnd.financeiro.no": "Não",
6992
+ "erpx_fin.foundation.lookup_e030ban": "Banco",
6993
+ "erpx_fin.foundation.lookup_e030ban_search_title": "Consultar banco",
6994
+ "erpx_fin.foundation.lookup_e030ban_cod_ban": "Código",
6995
+ "erpx_fin.foundation.lookup_e030ban_nom_ban": "Nome",
6996
+ "erpx_fin.foundation.lookup_e600cco": "Conta interna",
6997
+ "erpx_fin.foundation.lookup_e600cco_search_title": "Consultar conta interna",
6998
+ "erpx_fin.foundation.lookup_e600cco_num_cco": "Número",
6999
+ "erpx_fin.foundation.lookup_e600cco_des_cco": "Descrição",
7000
+ "erpx_fin.foundation.nothing_found": "Nenhum registro foi encontrado",
7001
+ "erpx_fin.foundation.filter": "Filtrar",
7002
+ "erpx_fin.foundation.clear": "Limpar",
7003
+ "erpx_fin.foundation.cancel": "Cancelar",
7004
+ "erpx_fin.foundation.select": "Selecionar",
7005
+ "erpx_fin.foundation.yes": "Sim",
7006
+ "erpx_fin.foundation.no": "Não",
7007
+ "erpx_fnd.transacao.lookup_e001tns": "Transação",
7008
+ "erpx_fnd.transacao.lookup_e001tns_search_title": "Consultar transação",
7009
+ "erpx_fnd.transacao.lookup_e001tns_cod_tns": "Código",
7010
+ "erpx_fnd.transacao.lookup_e001tns_des_tns": "Descrição",
7011
+ "erpx_fnd.transacao.nothing_found": "Nenhum registro foi encontrado",
7012
+ "erpx_fnd.transacao.filter": "Filtrar",
7013
+ "erpx_fnd.transacao.clear": "Limpar",
7014
+ "erpx_fnd.transacao.cancel": "Cancelar",
7015
+ "erpx_fnd.transacao.select": "Selecionar",
7016
+ "erpx_fnd.transacao.yes": "Sim",
7017
+ "erpx_fnd.transacao.no": "Não",
7018
+ "Enums": "",
7019
+ "erpx_fin.tesouraria.enum_tip_tcc_v_1": "Conta Corrente",
7020
+ "erpx_fin.tesouraria.enum_tip_tcc_v_2": "Conta Poupança",
7021
+ "erpx_fin.tesouraria.enum_tip_tcc_v_3": "Conta Investimento",
7022
+ "erpx_fin.tesouraria.enum_tip_tcc_v_4": "Conta Aplicação Financeira",
7023
+ "erpx_fin.tesouraria.enum_tip_tcc_v_5": "Conta Empréstimo",
7024
+ "erpx_fin.tesouraria.enum_tip_tcc_v_6": "Cota Capital",
7025
+ "erpx_fin.tesouraria.enum_tip_tcc_v_7": "Conta de Retenção",
7026
+ "erpx_fin.tesouraria.enum_tip_tcc_v_8": "Conta da Loja",
7027
+ "erpx_fin.tesouraria.enum_tip_tcc_v_9": "Conta Salário",
7028
+ "erpx_fin.tesouraria.enum_tip_tcc_v_10": "Outros"
7029
+ };
7030
+
6950
7031
  let ErpLookupsModule = class ErpLookupsModule {
6951
7032
  };
6952
7033
  ErpLookupsModule = __decorate([
@@ -8100,6 +8181,7 @@ class StorageService {
8100
8181
  }
8101
8182
 
8102
8183
  const moment$1 = moment$2; // @HACK Necessary because of https://github.com/rollup/rollup/issues/670
8184
+ const ERPX_GLOBAL_FILTER_KEY = 'ERPX_GLOBAL_FILTER';
8103
8185
  class FiltersStorageService extends StorageService {
8104
8186
  constructor() {
8105
8187
  super(...arguments);
@@ -8117,12 +8199,16 @@ class FiltersStorageService extends StorageService {
8117
8199
  yield _super.store.call(this, this.FILTERS_KEY, store);
8118
8200
  });
8119
8201
  }
8120
- getFilters(key) {
8202
+ getFilters(key, includeGlobalFilter = false) {
8121
8203
  const _super = Object.create(null, {
8122
8204
  get: { get: () => super.get }
8123
8205
  });
8124
8206
  return __awaiter(this, void 0, void 0, function* () {
8125
8207
  const store = (yield _super.get.call(this, this.FILTERS_KEY)) || {};
8208
+ if (includeGlobalFilter) {
8209
+ const globalStore = (yield _super.get.call(this, ERPX_GLOBAL_FILTER_KEY)) || {};
8210
+ return Object.assign(Object.assign({}, globalStore), store[key]);
8211
+ }
8126
8212
  return store[key] || {};
8127
8213
  });
8128
8214
  }
@@ -8893,9 +8979,320 @@ var ModulesEnum;
8893
8979
  ModulesEnum["CONTROLADORIA_GERENCIAL"] = "CONTROLADORIA_GERENCIAL";
8894
8980
  })(ModulesEnum || (ModulesEnum = {}));
8895
8981
 
8982
+ let GlobalFilterService = class GlobalFilterService {
8983
+ constructor() {
8984
+ this._showComponent = true;
8985
+ this._excludedRoutes = [];
8986
+ this.filterChangeSubject = new Subject();
8987
+ }
8988
+ /**
8989
+ * Emits a filter change event to all subscribers.
8990
+ * This method should be called whenever the global filter values change
8991
+ * to notify all components listening for filter updates.
8992
+ *
8993
+ * @param event - The filter fields object containing e070emp and e070fil information
8994
+ * @param event.e070emp - e070emp (company) filter value
8995
+ * @param event.e070fil - e070fil (branch) filter value
8996
+ */
8997
+ onFilterChange(event) {
8998
+ this.filterChangeSubject.next(event);
8999
+ }
9000
+ /**
9001
+ * Observable stream of filter changes.
9002
+ * Subscribe to this to receive notifications when the filter changes.
9003
+ *
9004
+ * @returns Observable that emits objects containing e070emp and e070fil filter values
9005
+ */
9006
+ get filterChange() {
9007
+ return this.filterChangeSubject.asObservable();
9008
+ }
9009
+ /**
9010
+ * Gets the visibility state of the global filter component.
9011
+ * Use this to determine whether the global filter should be displayed.
9012
+ *
9013
+ * @returns true if the component should be shown, false otherwise
9014
+ */
9015
+ get showComponent() {
9016
+ return this._showComponent;
9017
+ }
9018
+ /**
9019
+ * Sets the visibility state of the global filter component.
9020
+ * Use this to programmatically show or hide the global filter.
9021
+ *
9022
+ * @param value - true to show the component, false to hide it
9023
+ */
9024
+ set showComponent(value) {
9025
+ this._showComponent = value;
9026
+ }
9027
+ /**
9028
+ * Gets the list of routes where the global filter component should not be displayed.
9029
+ * These routes will automatically hide the global filter component.
9030
+ *
9031
+ * @returns Array of route paths to exclude from displaying the global filter
9032
+ */
9033
+ get excludedRoutes() {
9034
+ return this._excludedRoutes;
9035
+ }
9036
+ /**
9037
+ * Sets the routes where the global filter component should not be displayed.
9038
+ * Use this to configure which pages should not show the global filter.
9039
+ *
9040
+ * @param value - Array of route paths to exclude from displaying the global filter
9041
+ */
9042
+ set excludedRoutes(value) {
9043
+ this._excludedRoutes = value;
9044
+ }
9045
+ };
9046
+ GlobalFilterService.ɵprov = ɵɵdefineInjectable({ factory: function GlobalFilterService_Factory() { return new GlobalFilterService(); }, token: GlobalFilterService, providedIn: "root" });
9047
+ GlobalFilterService = __decorate([
9048
+ Injectable({ providedIn: 'root' })
9049
+ ], GlobalFilterService);
9050
+
9051
+ let GlobalFilterComponent = class GlobalFilterComponent {
9052
+ constructor(storageService, globalFilterService, router, translate) {
9053
+ this.storageService = storageService;
9054
+ this.globalFilterService = globalFilterService;
9055
+ this.router = router;
9056
+ this.translate = translate;
9057
+ /**
9058
+ * Routes that are excluded from the global filter by default.
9059
+ * These routes will not have the global filter applied to them.
9060
+ */
9061
+ this.defaultExcludedRoutes = ['forbidden', 'main', 'not-found'];
9062
+ this._showComponent = true;
9063
+ this.showModal = false;
9064
+ this.ngUnsubscribe = new Subject();
9065
+ }
9066
+ /**
9067
+ * Gets a formatted tooltip string for mobile devices.
9068
+ * Concatenates all active field labels and values separated by newlines.
9069
+ */
9070
+ get mobileTooltip() {
9071
+ const lines = this.fields
9072
+ .filter(filterItem => filterItem.value)
9073
+ .map(filterItem => `${filterItem.label}: ${filterItem.displayText}`);
9074
+ return lines.length > 0 ? lines.join('\n') : null;
9075
+ }
9076
+ /**
9077
+ * Gets the current filter field configuration array.
9078
+ */
9079
+ get fields() {
9080
+ return [
9081
+ {
9082
+ label: this.translate.instant('erpx_fnd.empresa.e_070_emp'),
9083
+ value: this.e070emp,
9084
+ displayText: this.e070emp ? `${this.e070emp.label}` : null
9085
+ },
9086
+ {
9087
+ label: this.translate.instant('erpx_fnd.empresa.e_070_fil'),
9088
+ value: this.e070fil,
9089
+ displayText: this.e070fil ? `${this.e070fil.label}` : null
9090
+ }
9091
+ ];
9092
+ }
9093
+ /**
9094
+ * Gets the visibility state of the global filter component.
9095
+ * Considers both the service-level visibility setting and the current route.
9096
+ */
9097
+ get showComponent() {
9098
+ return this.globalFilterService.showComponent && this._showComponent;
9099
+ }
9100
+ ngOnInit() {
9101
+ this.loadFiltersFromStorage();
9102
+ this.initializeRouteListener();
9103
+ }
9104
+ ngOnDestroy() {
9105
+ this.ngUnsubscribe.next();
9106
+ this.ngUnsubscribe.complete();
9107
+ }
9108
+ /**
9109
+ * Handles the closing of the filter modal and updates field values.
9110
+ * When fields are provided, updates the component state and notifies the GlobalFilterService.
9111
+ *
9112
+ * @param event - Optional filter field values from the modal
9113
+ */
9114
+ onHide(event) {
9115
+ this.showModal = false;
9116
+ if (event) {
9117
+ this.e070emp = event.e070emp;
9118
+ this.e070fil = event.e070fil;
9119
+ this.globalFilterService.onFilterChange(event);
9120
+ }
9121
+ }
9122
+ /**
9123
+ * Loads the previously saved filter values from local storage.
9124
+ * Retrieves the filter data using the ERPX_GLOBAL_FILTER_KEY and applies it
9125
+ * to the component's e070emp and e070fil properties if available.
9126
+ */
9127
+ loadFiltersFromStorage() {
9128
+ this.storageService.get(ERPX_GLOBAL_FILTER_KEY).then((filterData) => {
9129
+ if (filterData && Object.keys(filterData).length > 0) {
9130
+ this.e070emp = filterData.e070emp;
9131
+ this.e070fil = filterData.e070fil;
9132
+ }
9133
+ });
9134
+ }
9135
+ /**
9136
+ * Initializes the route change listener to manage component visibility.
9137
+ * Subscribes to router navigation events and sets the component visibility
9138
+ * based on the current route against excluded routes (default and service-configured).
9139
+ */
9140
+ initializeRouteListener() {
9141
+ this.router.events.pipe(takeUntil(this.ngUnsubscribe), filter(event => event instanceof NavigationEnd)).subscribe((event) => {
9142
+ const excludedRoutes = new RegExp(`^/(${[...this.defaultExcludedRoutes, ...this.globalFilterService.excludedRoutes].join('|')})(/|$)`);
9143
+ const currentRoute = event.urlAfterRedirects;
9144
+ this._showComponent = !excludedRoutes.test(currentRoute);
9145
+ });
9146
+ }
9147
+ };
9148
+ GlobalFilterComponent.ctorParameters = () => [
9149
+ { type: FiltersStorageService },
9150
+ { type: GlobalFilterService },
9151
+ { type: Router },
9152
+ { type: TranslateService }
9153
+ ];
9154
+ GlobalFilterComponent = __decorate([
9155
+ Component({
9156
+ selector: 'erpx-global-filter',
9157
+ 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>",
9158
+ 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}}"]
9159
+ })
9160
+ ], GlobalFilterComponent);
9161
+
9162
+ let GlobalFilterModalComponent = class GlobalFilterModalComponent {
9163
+ constructor(formBuilder, translate, e070empLookup, e070filLookup, storageService) {
9164
+ this.formBuilder = formBuilder;
9165
+ this.translate = translate;
9166
+ this.e070empLookup = e070empLookup;
9167
+ this.e070filLookup = e070filLookup;
9168
+ this.storageService = storageService;
9169
+ this.hideModal = new EventEmitter();
9170
+ this.isVisible = true;
9171
+ this.ngUnsubscribe = new Subject();
9172
+ }
9173
+ ngOnInit() {
9174
+ this.createFormGroup();
9175
+ this.createFormField();
9176
+ this.handleFormChanges();
9177
+ }
9178
+ ngOnDestroy() {
9179
+ this.ngUnsubscribe.next();
9180
+ this.ngUnsubscribe.complete();
9181
+ }
9182
+ /**
9183
+ * Handles the modal closing event.
9184
+ * Hides the modal and emits the optionally provided filter values to the parent component.
9185
+ *
9186
+ * @param value - Optional filter field values to emit when closing the modal
9187
+ */
9188
+ onHide(value) {
9189
+ this.isVisible = false;
9190
+ this.hideModal.emit(value);
9191
+ }
9192
+ /**
9193
+ * Saves the current form values and closes the modal.
9194
+ * Stores the filter values in local storage and then triggers the hide event
9195
+ * with the saved values.
9196
+ */
9197
+ onSave() {
9198
+ const value = this.formGroup.getRawValue();
9199
+ this.storageService.store(ERPX_GLOBAL_FILTER_KEY, value).then(() => this.onHide(value));
9200
+ }
9201
+ createFormGroup() {
9202
+ this.formGroup = this.formBuilder.group({
9203
+ e070emp: [{ value: this.e070emp, disabled: false }],
9204
+ e070fil: [{ value: this.e070fil, disabled: !this.e070emp }],
9205
+ });
9206
+ }
9207
+ createFormField() {
9208
+ this.formFields = [
9209
+ new FormField(Object.assign(Object.assign({}, this.e070empLookup.mountOptions({
9210
+ multiple: false,
9211
+ queryFields: ['e031moe.sigMoe']
9212
+ })), { appendTo: "body", emptyMessage: this.translate.instant('erpx_fnd.empresa.nothing_found') })),
9213
+ new FormField(Object.assign(Object.assign({}, this.e070filLookup.mountOptions({
9214
+ multiple: false,
9215
+ lookupFields: [
9216
+ { name: "codFil", type: FieldType.Integer },
9217
+ { name: "nomFil", type: FieldType.String },
9218
+ ],
9219
+ searchFields: [
9220
+ { name: "codFil", type: FieldType.Integer },
9221
+ { name: "nomFil", type: FieldType.String },
9222
+ ],
9223
+ searchGridFields: [
9224
+ { name: "codFil", type: FieldType.Integer },
9225
+ { name: "nomFil", type: FieldType.String },
9226
+ ],
9227
+ entityDependency: [
9228
+ {
9229
+ name: "e070emp",
9230
+ field: "id",
9231
+ value: () => this.formGroup.get("e070emp").value
9232
+ },
9233
+ ],
9234
+ })), { emptyMessage: this.translate.instant('erpx_fnd.empresa.nothing_found'), appendTo: "body" })),
9235
+ ];
9236
+ }
9237
+ handleFormChanges() {
9238
+ this.formGroup.controls.e070emp.valueChanges
9239
+ .pipe(takeUntil(this.ngUnsubscribe))
9240
+ .subscribe((value) => {
9241
+ const control = this.formGroup.get('e070fil');
9242
+ value ? control.enable() : control.disable();
9243
+ control.reset();
9244
+ });
9245
+ }
9246
+ };
9247
+ GlobalFilterModalComponent.ctorParameters = () => [
9248
+ { type: FormBuilder },
9249
+ { type: TranslateService },
9250
+ { type: E070EmpLookup },
9251
+ { type: E070FilLookup },
9252
+ { type: FiltersStorageService }
9253
+ ];
9254
+ __decorate([
9255
+ Input()
9256
+ ], GlobalFilterModalComponent.prototype, "e070emp", void 0);
9257
+ __decorate([
9258
+ Input()
9259
+ ], GlobalFilterModalComponent.prototype, "e070fil", void 0);
9260
+ __decorate([
9261
+ Output()
9262
+ ], GlobalFilterModalComponent.prototype, "hideModal", void 0);
9263
+ GlobalFilterModalComponent = __decorate([
9264
+ Component({
9265
+ selector: 'global-filter-modal',
9266
+ 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",
9267
+ styles: [`
9268
+ .description {
9269
+ padding: 0px 7px;
9270
+ }
9271
+ `]
9272
+ })
9273
+ ], GlobalFilterModalComponent);
9274
+
9275
+ let GlobalFilterModule = class GlobalFilterModule {
9276
+ };
9277
+ GlobalFilterModule = __decorate([
9278
+ NgModule({
9279
+ imports: [
9280
+ CommonModule,
9281
+ DynamicFormModule,
9282
+ DialogModule,
9283
+ ButtonModule,
9284
+ TranslateModule,
9285
+ ErpLookupsModule,
9286
+ ],
9287
+ providers: [FiltersStorageService],
9288
+ declarations: [GlobalFilterComponent, GlobalFilterModalComponent],
9289
+ exports: [GlobalFilterComponent],
9290
+ })
9291
+ ], GlobalFilterModule);
9292
+
8896
9293
  /**
8897
9294
  * Generated bundle index. Do not edit.
8898
9295
  */
8899
9296
 
8900
- 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 };
9297
+ 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 };
8901
9298
  //# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map