lib-portal-angular 0.0.65 → 0.0.67

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,330 +1,21 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Injectable, EventEmitter, forwardRef, Component, ChangeDetectionStrategy, Input, Output, HostListener, ViewChild, Directive, NgModule, createComponent } from '@angular/core';
2
+ import { Component, Input, EventEmitter, ChangeDetectionStrategy, Output, HostListener, Injectable, forwardRef, ViewChild, Directive, NgModule, createComponent } from '@angular/core';
3
+ import * as i2 from '@angular/common';
4
+ import { CommonModule } from '@angular/common';
3
5
  import * as i4 from '@angular/forms';
4
6
  import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import { of, Subject, Subscription, Observable } from 'rxjs';
7
+ import hljs from 'highlight.js';
8
+ import * as i1 from '@ng-bootstrap/ng-bootstrap';
9
+ import { Subject, of, Subscription, Observable } from 'rxjs';
6
10
  import { debounceTime, startWith, switchMap, map, catchError, takeUntil } from 'rxjs/operators';
7
- import * as i2 from '@angular/common/http';
11
+ import * as i2$1 from '@angular/common/http';
8
12
  import { HttpParams } from '@angular/common/http';
9
- import * as i2$1 from '@angular/common';
10
- import { CommonModule } from '@angular/common';
11
13
  import * as i5 from '@ng-select/ng-select';
12
14
  import { NgSelectModule } from '@ng-select/ng-select';
13
- import hljs from 'highlight.js';
14
- import * as i1 from '@ng-bootstrap/ng-bootstrap';
15
15
  import * as i1$1 from 'lucide-angular';
16
16
  import { LucideAngularModule, icons } from 'lucide-angular';
17
17
  import * as CryptoJS from 'crypto-js';
18
18
 
19
- class AuthService {
20
- constructor() {
21
- this.userRoles = [];
22
- this.loadUserRoles();
23
- }
24
- loadUserRoles() {
25
- const storedUser = localStorage.getItem('user');
26
- if (!storedUser) {
27
- throw new Error('User not found in localStorage');
28
- }
29
- const { role } = JSON.parse(storedUser);
30
- if (!role || !Array.isArray(role)) {
31
- throw new Error('Roles not found or invalid in localStorage');
32
- }
33
- this.userRoles = role.map((r) => r.toString());
34
- }
35
- hasPermission(requiredPermissions) {
36
- if (this.userRoles.length === 0) {
37
- throw new Error('No roles found for the user');
38
- }
39
- return requiredPermissions.every(permission => this.userRoles.includes(permission));
40
- }
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
42
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AuthService, providedIn: 'root' }); }
43
- }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AuthService, decorators: [{
45
- type: Injectable,
46
- args: [{
47
- providedIn: 'root'
48
- }]
49
- }], ctorParameters: function () { return []; } });
50
-
51
- class MultiSelectComponent {
52
- constructor(authService, http) {
53
- this.authService = authService;
54
- this.http = http;
55
- this.label = 'Multi Select';
56
- this.data = []; // Accepts an array of generic objects
57
- this.placeholder = 'Select items';
58
- this.id = 'multiSelectId';
59
- this.bindLabel = ''; // Generic dynamic label
60
- this.bindValue = ''; // Generic dynamic value
61
- this.closeOnSelect = false; // New property to control dropdown close behavior
62
- this.searchUrl = ''; // URL for backend search
63
- this.multiple = true; // New property to control single or multiple selection
64
- this.searchParams = {}; // Parâmetros de busca dinâmicos
65
- this.keyupEvent = new EventEmitter();
66
- this.backupData = []; // Backup of the initial data
67
- this.allItems = []; // Store the combined list
68
- this.items = of([]); // Initialization of the property
69
- this.filteredItems = of([]); // Filtered items
70
- this.searchTerms = new Subject(); // For search debounce
71
- this.onChangeCallback = () => { };
72
- this.onTouchedCallback = () => { };
73
- this.isCourseEntered = false;
74
- this.compareFn = (item1, item2) => {
75
- return item1 && item2 ? item1[this.bindValue] === item2[this.bindValue] : item1 === item2;
76
- };
77
- }
78
- ngOnInit() {
79
- this.backupData = [...this.data]; // Backup initial data
80
- this.allItems = [...this.data]; // Initialize allItems with the initial data
81
- this.items = of(this.allItems);
82
- this.fetchInitialData().subscribe(data => {
83
- this.updateData(data);
84
- this.filteredItems = this.searchTerms.pipe(debounceTime(700), startWith(''), // Start with an empty search to load the original list
85
- switchMap(term => this.search(term)));
86
- // Adicionar itens selecionados à lista após buscar dados iniciais
87
- this.addSelectedItemsToData();
88
- });
89
- }
90
- ngOnChanges(changes) {
91
- if (changes['selected'] && !changes['selected'].isFirstChange()) {
92
- this.addSelectedItemsToData();
93
- }
94
- }
95
- fetchInitialData() {
96
- return this.http.get(this.searchUrl).pipe(map((response) => {
97
- if (response && response.length > 0) {
98
- return response.map((item) => ({
99
- [this.bindValue]: item[this.bindValue],
100
- [this.bindLabel]: item[this.bindLabel]
101
- }));
102
- }
103
- return [];
104
- }), catchError((error) => {
105
- console.error('Error fetching initial data from backend:', error);
106
- return of([]);
107
- }));
108
- }
109
- updateData(newData) {
110
- newData.forEach((item) => {
111
- const existsInList = this.allItems.some(listItem => this.compareFn(listItem, item));
112
- if (!existsInList) {
113
- this.allItems.push(item);
114
- }
115
- });
116
- this.items = of(this.allItems);
117
- }
118
- addSelectedItemsToData() {
119
- if (this.selected) {
120
- const selectedItems = this.multiple ? this.selected : [this.selected];
121
- selectedItems.forEach((item) => {
122
- const existsInList = this.allItems.some(listItem => this.compareFn(listItem, item));
123
- if (!existsInList) {
124
- const newItem = {
125
- [this.bindValue]: item[this.bindValue] || item,
126
- [this.bindLabel]: item[this.bindLabel] || item
127
- };
128
- this.data.push(newItem);
129
- this.allItems.push(newItem);
130
- }
131
- });
132
- this.items = of(this.allItems);
133
- }
134
- }
135
- onFocus() {
136
- this.isCourseEntered = true;
137
- }
138
- onBlur() {
139
- this.isCourseEntered = false;
140
- }
141
- onKeyUp(event) {
142
- this.keyupEvent.emit(event);
143
- }
144
- onSelectedChange(event) {
145
- const previousSelected = this.selected;
146
- if (this.multiple) {
147
- this.selected = event;
148
- }
149
- else {
150
- this.selected = event ? event : null;
151
- }
152
- this.onChangeCallback(this.selected);
153
- // Verificar se um item foi removido
154
- if (previousSelected && Array.isArray(previousSelected) && previousSelected.length > event.length) {
155
- const removedItems = previousSelected.filter(item => !event.includes(item));
156
- removedItems.forEach(item => {
157
- const existsInData = this.data.some(dataItem => this.compareFn(dataItem, item));
158
- if (!existsInData) {
159
- this.data.push(item);
160
- this.allItems.push(item); // Adicionar de volta aos itens disponíveis
161
- }
162
- });
163
- }
164
- }
165
- onInputChange(event) {
166
- const input = event.target.value;
167
- this.searchTerms.next(input);
168
- }
169
- search(term) {
170
- if (!term.trim()) {
171
- // Se o termo de busca estiver vazio, retorna a lista completa
172
- return of(this.allItems);
173
- }
174
- // Filtra os itens localmente
175
- const filtered = this.allItems.filter((item) => item[this.bindLabel].toLowerCase().includes(term.toLowerCase()));
176
- if (filtered.length > 0) {
177
- console.log('Items filtered locally.');
178
- return of(filtered);
179
- }
180
- else if (this.searchUrl) {
181
- // Construir os parâmetros de busca dinamicamente
182
- const params = new URLSearchParams(this.searchParams);
183
- params.append('term', term);
184
- return this.http.get(`${this.searchUrl}?${params.toString()}`).pipe(map((response) => {
185
- if (response && response.length > 0) {
186
- // Transforma os itens do backend para o formato esperado pelo componente
187
- const transformedItems = response.map((item) => ({
188
- [this.bindValue]: item[this.bindValue],
189
- [this.bindLabel]: item[this.bindLabel]
190
- }));
191
- // Atualiza os dados com os novos itens buscados
192
- this.updateData(transformedItems);
193
- return this.allItems;
194
- }
195
- else {
196
- console.log('No items found in the backend search.');
197
- return this.allItems;
198
- }
199
- }), catchError((error) => {
200
- console.error('Error fetching from backend:', error);
201
- return of(this.allItems);
202
- }));
203
- }
204
- else {
205
- console.log('No search URL provided and no items found locally.');
206
- return of(this.allItems);
207
- }
208
- }
209
- writeValue(value) {
210
- if (this.multiple) {
211
- this.selected = value || [];
212
- }
213
- else {
214
- this.selected = value || null;
215
- }
216
- this.addSelectedItemsToData();
217
- }
218
- registerOnChange(fn) {
219
- this.onChangeCallback = fn;
220
- }
221
- registerOnTouched(fn) {
222
- this.onTouchedCallback = fn;
223
- }
224
- setDisabledState(isDisabled) {
225
- // No implementation needed for this example
226
- }
227
- hasPermission() {
228
- if (!this.permissions || this.permissions.length === 0) {
229
- return true;
230
- }
231
- try {
232
- return this.authService.hasPermission(this.permissions);
233
- }
234
- catch (error) {
235
- if (error instanceof Error) {
236
- console.error('Permission error:', error.message);
237
- }
238
- else {
239
- console.error('Unknown error occurred during permission check');
240
- }
241
- return true;
242
- }
243
- }
244
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, deps: [{ token: AuthService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
245
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MultiSelectComponent, selector: "argenta-custom-multi-select", inputs: { label: "label", data: "data", placeholder: "placeholder", selected: "selected", id: "id", bindLabel: "bindLabel", bindValue: "bindValue", permissions: "permissions", closeOnSelect: "closeOnSelect", searchUrl: "searchUrl", multiple: "multiple", searchParams: "searchParams" }, outputs: { keyupEvent: "keyupEvent" }, providers: [
246
- {
247
- provide: NG_VALUE_ACCESSOR,
248
- useExisting: forwardRef(() => MultiSelectComponent),
249
- multi: true
250
- }
251
- ], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"hasPermission()\" class=\"form-group\">\n <label [for]=\"id\" class=\"form-label\" style=\"margin-top: 1rem;\">{{ label }}</label>\n <ng-select\n [class.course-entry]=\"isCourseEntered\"\n class=\"ng-select custom-ng-select\"\n [items]=\"filteredItems | async\"\n [multiple]=\"multiple\"\n [closeOnSelect]=\"closeOnSelect\"\n [hideSelected]=\"true\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [(ngModel)]=\"selected\"\n [compareWith]=\"compareFn\"\n (change)=\"onSelectedChange($event)\"\n (keyup)=\"onKeyUp($event)\"\n (input)=\"onInputChange($event)\"\n [id]=\"id\"\n [placeholder]=\"selected && (multiple ? selected.length === 0 : !selected) ? placeholder : ''\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\">\n <ng-template ng-option-tmp let-item=\"item\">\n {{ item[bindLabel] }}\n </ng-template>\n </ng-select>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-select{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;font-weight:400;border:1px solid #ccc;border-radius:4px;appearance:none;-webkit-appearance:none;-moz-appearance:none;padding-right:2rem;background-image:none;background-repeat:no-repeat;background-position:right .5rem center;height:46px}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.2rem}.select-container{position:relative;display:inline-block;width:100%}.select-container lucide-icon{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);pointer-events:none;color:#5e6366}.ng-select{display:block;width:100%;font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem}.ng-select .ng-select-container{display:flex;align-items:center;border:1px solid #ccc;border-radius:4px;padding:.5rem;background-color:#fff;color:#333}.ng-select .ng-select-container .ng-value-container{display:flex;align-items:center;flex-grow:1}.ng-select .ng-select-container .ng-clear{display:none}.ng-select .ng-select-container .ng-input{flex-grow:1;border:none;outline:none}.custom-ng-select.ng-select .ng-select-container .ng-input>input{box-sizing:border-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:.5rem!important;cursor:default;width:100%}.ng-select .ng-dropdown-panel{border:1px solid #ccc;border-radius:4px;background-color:#fff;color:#333;box-shadow:0 2px 4px #0000001a}.ng-select .ng-dropdown-panel .ng-option{padding:8px;cursor:pointer}.ng-select .ng-dropdown-panel .ng-option:hover{background-color:#f1f1f1}.ng-select .ng-dropdown-panel .ng-option.selected{background-color:#007bff;color:#fff}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i5.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "pipe", type: i2$1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
252
- }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, decorators: [{
254
- type: Component,
255
- args: [{ selector: 'argenta-custom-multi-select', providers: [
256
- {
257
- provide: NG_VALUE_ACCESSOR,
258
- useExisting: forwardRef(() => MultiSelectComponent),
259
- multi: true
260
- }
261
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"hasPermission()\" class=\"form-group\">\n <label [for]=\"id\" class=\"form-label\" style=\"margin-top: 1rem;\">{{ label }}</label>\n <ng-select\n [class.course-entry]=\"isCourseEntered\"\n class=\"ng-select custom-ng-select\"\n [items]=\"filteredItems | async\"\n [multiple]=\"multiple\"\n [closeOnSelect]=\"closeOnSelect\"\n [hideSelected]=\"true\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [(ngModel)]=\"selected\"\n [compareWith]=\"compareFn\"\n (change)=\"onSelectedChange($event)\"\n (keyup)=\"onKeyUp($event)\"\n (input)=\"onInputChange($event)\"\n [id]=\"id\"\n [placeholder]=\"selected && (multiple ? selected.length === 0 : !selected) ? placeholder : ''\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\">\n <ng-template ng-option-tmp let-item=\"item\">\n {{ item[bindLabel] }}\n </ng-template>\n </ng-select>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-select{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;font-weight:400;border:1px solid #ccc;border-radius:4px;appearance:none;-webkit-appearance:none;-moz-appearance:none;padding-right:2rem;background-image:none;background-repeat:no-repeat;background-position:right .5rem center;height:46px}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.2rem}.select-container{position:relative;display:inline-block;width:100%}.select-container lucide-icon{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);pointer-events:none;color:#5e6366}.ng-select{display:block;width:100%;font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem}.ng-select .ng-select-container{display:flex;align-items:center;border:1px solid #ccc;border-radius:4px;padding:.5rem;background-color:#fff;color:#333}.ng-select .ng-select-container .ng-value-container{display:flex;align-items:center;flex-grow:1}.ng-select .ng-select-container .ng-clear{display:none}.ng-select .ng-select-container .ng-input{flex-grow:1;border:none;outline:none}.custom-ng-select.ng-select .ng-select-container .ng-input>input{box-sizing:border-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:.5rem!important;cursor:default;width:100%}.ng-select .ng-dropdown-panel{border:1px solid #ccc;border-radius:4px;background-color:#fff;color:#333;box-shadow:0 2px 4px #0000001a}.ng-select .ng-dropdown-panel .ng-option{padding:8px;cursor:pointer}.ng-select .ng-dropdown-panel .ng-option:hover{background-color:#f1f1f1}.ng-select .ng-dropdown-panel .ng-option.selected{background-color:#007bff;color:#fff}\n"] }]
262
- }], ctorParameters: function () { return [{ type: AuthService }, { type: i2.HttpClient }]; }, propDecorators: { label: [{
263
- type: Input
264
- }], data: [{
265
- type: Input
266
- }], placeholder: [{
267
- type: Input
268
- }], selected: [{
269
- type: Input
270
- }], id: [{
271
- type: Input
272
- }], bindLabel: [{
273
- type: Input
274
- }], bindValue: [{
275
- type: Input
276
- }], permissions: [{
277
- type: Input
278
- }], closeOnSelect: [{
279
- type: Input
280
- }], searchUrl: [{
281
- type: Input
282
- }], multiple: [{
283
- type: Input
284
- }], searchParams: [{
285
- type: Input
286
- }], keyupEvent: [{
287
- type: Output
288
- }] } });
289
-
290
- class MultiSelectCategoryComponent {
291
- constructor() {
292
- // Inputs para receber dados dinâmicos de diferentes categorias
293
- this.unidadesOrganizacionais = [];
294
- this.clientes = [];
295
- this.empresas = [];
296
- this.usuarios = [];
297
- // Inputs para permissões específicas de cada categoria
298
- this.permissoesUnidades = [];
299
- this.permissoesClientes = [];
300
- this.permissoesEmpresas = [];
301
- this.permissoesUsuarios = [];
302
- }
303
- ngOnInit() { }
304
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectCategoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
305
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MultiSelectCategoryComponent, selector: "argenta-multi-select-category", inputs: { unidadesOrganizacionais: "unidadesOrganizacionais", clientes: "clientes", empresas: "empresas", usuarios: "usuarios", permissoesUnidades: "permissoesUnidades", permissoesClientes: "permissoesClientes", permissoesEmpresas: "permissoesEmpresas", permissoesUsuarios: "permissoesUsuarios" }, ngImport: i0, template: "<div class=\"multi-select-category\">\n <div class=\"row\">\n <!-- Primeira linha: Usu\u00E1rio e Cliente -->\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Usu\u00E1rios\"\n [data]=\"usuarios\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesUsuarios\"\n placeholder=\"Selecione Usu\u00E1rios\">\n </argenta-custom-multi-select>\n </div>\n\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Clientes\"\n [data]=\"clientes\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesClientes\"\n placeholder=\"Selecione Clientes\">\n </argenta-custom-multi-select>\n </div>\n </div>\n\n <div class=\"row\">\n <!-- Segunda linha: Empresa e Unidade Organizacional -->\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Empresas\"\n [data]=\"empresas\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesEmpresas\"\n placeholder=\"Selecione Empresas\">\n </argenta-custom-multi-select>\n </div>\n\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Unidades Organizacionais\"\n [data]=\"unidadesOrganizacionais\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesUnidades\"\n placeholder=\"Selecione Unidades Organizacionais\">\n </argenta-custom-multi-select>\n </div>\n </div>\n</div>\n", styles: [".multi-select-category{display:flex;flex-direction:column;gap:1rem}.multi-select-category .row{display:flex;gap:1rem}.multi-select-category .col{flex:1}\n"], dependencies: [{ kind: "component", type: MultiSelectComponent, selector: "argenta-custom-multi-select", inputs: ["label", "data", "placeholder", "selected", "id", "bindLabel", "bindValue", "permissions", "closeOnSelect", "searchUrl", "multiple", "searchParams"], outputs: ["keyupEvent"] }] }); }
306
- }
307
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectCategoryComponent, decorators: [{
308
- type: Component,
309
- args: [{ selector: 'argenta-multi-select-category', template: "<div class=\"multi-select-category\">\n <div class=\"row\">\n <!-- Primeira linha: Usu\u00E1rio e Cliente -->\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Usu\u00E1rios\"\n [data]=\"usuarios\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesUsuarios\"\n placeholder=\"Selecione Usu\u00E1rios\">\n </argenta-custom-multi-select>\n </div>\n\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Clientes\"\n [data]=\"clientes\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesClientes\"\n placeholder=\"Selecione Clientes\">\n </argenta-custom-multi-select>\n </div>\n </div>\n\n <div class=\"row\">\n <!-- Segunda linha: Empresa e Unidade Organizacional -->\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Empresas\"\n [data]=\"empresas\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesEmpresas\"\n placeholder=\"Selecione Empresas\">\n </argenta-custom-multi-select>\n </div>\n\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Unidades Organizacionais\"\n [data]=\"unidadesOrganizacionais\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesUnidades\"\n placeholder=\"Selecione Unidades Organizacionais\">\n </argenta-custom-multi-select>\n </div>\n </div>\n</div>\n", styles: [".multi-select-category{display:flex;flex-direction:column;gap:1rem}.multi-select-category .row{display:flex;gap:1rem}.multi-select-category .col{flex:1}\n"] }]
310
- }], ctorParameters: function () { return []; }, propDecorators: { unidadesOrganizacionais: [{
311
- type: Input
312
- }], clientes: [{
313
- type: Input
314
- }], empresas: [{
315
- type: Input
316
- }], usuarios: [{
317
- type: Input
318
- }], permissoesUnidades: [{
319
- type: Input
320
- }], permissoesClientes: [{
321
- type: Input
322
- }], permissoesEmpresas: [{
323
- type: Input
324
- }], permissoesUsuarios: [{
325
- type: Input
326
- }] } });
327
-
328
19
  class AlertComponent {
329
20
  constructor() {
330
21
  this.alerts = [];
@@ -396,7 +87,7 @@ class AlertComponent {
396
87
  }, 2000); // Fechar após 2 segundos
397
88
  }
398
89
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
399
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AlertComponent, selector: "lib-alert", inputs: { alerts: "alerts" }, ngImport: i0, template: "<div *ngFor=\"let alert of alerts\" \n [ngClass]=\"getAlertClass(alert)\" \n role=\"alert\" \n [id]=\"'alert-' + alert.message\"\n (mouseenter)=\"onMouseEnter(alert)\" \n (mouseleave)=\"onMouseLeave(alert)\">\n <button type=\"button\" class=\"close\" (click)=\"closeAlert(alert)\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <div class=\"alert-header\">\n <span [ngClass]=\"getAlertIconClass(alert)\" class=\"alert-icon\"></span>\n <strong>{{ alert.title }}</strong>\n </div>\n <div class=\"alert-body\">\n {{ alert.message }}\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.alert-container{position:fixed;top:20px;right:20px;max-width:400px;margin:10px auto;padding:15px;border-radius:4px;background-color:#f8d7da;color:#721c24;word-wrap:break-word;opacity:0;transform:translateY(-20px);transition:opacity .5s ease,transform .5s ease;display:flex;flex-direction:column;align-items:flex-start;z-index:9999}.alert-container.show{opacity:1;transform:translateY(0)}.alert-container .close{position:absolute;top:10px;right:10px;background:none;border:none;font-size:20px;color:#000;opacity:.5;cursor:pointer;outline:none}.alert-container .close:hover{opacity:1}.alert-container .alert-header{display:flex;align-items:center;margin-bottom:5px}.alert-container .alert-icon{margin-right:10px;font-size:20px}.alert-container .alert-body{margin-left:30px}.alert-container .alert-icon.success-icon:before{content:\"\\2714\\fe0f\"}.alert-container .alert-icon.info-icon:before{content:\"\\2139\\fe0f\"}.alert-container .alert-icon.warning-icon:before{content:\"\\26a0\\fe0f\"}.alert-container .alert-icon.danger-icon:before{content:\"\\274c\"}.alert-success{background-color:#d4edda;color:#155724}.alert-info{background-color:#d8f4f7;color:#0c5460}.alert-warning{background-color:#fff3cd;color:#856404}.alert-danger{background-color:#fdd9d7;color:#721c24}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
90
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: AlertComponent, selector: "lib-alert", inputs: { alerts: "alerts" }, ngImport: i0, template: "<div *ngFor=\"let alert of alerts\" \n [ngClass]=\"getAlertClass(alert)\" \n role=\"alert\" \n [id]=\"'alert-' + alert.message\"\n (mouseenter)=\"onMouseEnter(alert)\" \n (mouseleave)=\"onMouseLeave(alert)\">\n <button type=\"button\" class=\"close\" (click)=\"closeAlert(alert)\" aria-label=\"Close\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n <div class=\"alert-header\">\n <span [ngClass]=\"getAlertIconClass(alert)\" class=\"alert-icon\"></span>\n <strong>{{ alert.title }}</strong>\n </div>\n <div class=\"alert-body\">\n {{ alert.message }}\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";.alert-container{position:fixed;top:20px;right:20px;max-width:400px;margin:10px auto;padding:15px;border-radius:4px;background-color:#f8d7da;color:#721c24;word-wrap:break-word;opacity:0;transform:translateY(-20px);transition:opacity .5s ease,transform .5s ease;display:flex;flex-direction:column;align-items:flex-start;z-index:9999}.alert-container.show{opacity:1;transform:translateY(0)}.alert-container .close{position:absolute;top:10px;right:10px;background:none;border:none;font-size:20px;color:#000;opacity:.5;cursor:pointer;outline:none}.alert-container .close:hover{opacity:1}.alert-container .alert-header{display:flex;align-items:center;margin-bottom:5px}.alert-container .alert-icon{margin-right:10px;font-size:20px}.alert-container .alert-body{margin-left:30px}.alert-container .alert-icon.success-icon:before{content:\"\\2714\\fe0f\"}.alert-container .alert-icon.info-icon:before{content:\"\\2139\\fe0f\"}.alert-container .alert-icon.warning-icon:before{content:\"\\26a0\\fe0f\"}.alert-container .alert-icon.danger-icon:before{content:\"\\274c\"}.alert-success{background-color:#d4edda;color:#155724}.alert-info{background-color:#d8f4f7;color:#0c5460}.alert-warning{background-color:#fff3cd;color:#856404}.alert-danger{background-color:#fdd9d7;color:#721c24}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
400
91
  }
401
92
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AlertComponent, decorators: [{
402
93
  type: Component,
@@ -541,7 +232,7 @@ class BadgeComponent {
541
232
  {{ label }}
542
233
  <span class="badge">{{ badgeContent }}</span>
543
234
  </button>
544
- `, isInline: true, styles: [".notification-button{position:relative;display:inline-block;width:155px;height:58px;padding:14px 29px 14px 36px;border-radius:6px;border:none;font-size:16px;font-weight:700;text-align:center;transition:opacity .3s}.badge{position:absolute;width:52px;height:32px;top:-15px;right:-20px;background-color:#dc3545;color:#fff;border-radius:16px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;font-family:Inter,sans-serif}.notification-button.hovered{opacity:.8}.notification-button.clicked{opacity:.6}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
235
+ `, isInline: true, styles: [".notification-button{position:relative;display:inline-block;width:155px;height:58px;padding:14px 29px 14px 36px;border-radius:6px;border:none;font-size:16px;font-weight:700;text-align:center;transition:opacity .3s}.badge{position:absolute;width:52px;height:32px;top:-15px;right:-20px;background-color:#dc3545;color:#fff;border-radius:16px;display:flex;align-items:center;justify-content:center;font-weight:700;font-size:14px;font-family:Inter,sans-serif}.notification-button.hovered{opacity:.8}.notification-button.clicked{opacity:.6}\n"], dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
545
236
  }
546
237
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BadgeComponent, decorators: [{
547
238
  type: Component,
@@ -590,6 +281,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
590
281
  args: ['mouseup']
591
282
  }] } });
592
283
 
284
+ class AuthService {
285
+ constructor() {
286
+ this.userRoles = [];
287
+ this.loadUserRoles();
288
+ }
289
+ loadUserRoles() {
290
+ const storedUser = localStorage.getItem('user');
291
+ if (!storedUser) {
292
+ throw new Error('User not found in localStorage');
293
+ }
294
+ const { role } = JSON.parse(storedUser);
295
+ if (!role || !Array.isArray(role)) {
296
+ throw new Error('Roles not found or invalid in localStorage');
297
+ }
298
+ this.userRoles = role.map((r) => r.toString());
299
+ }
300
+ hasPermission(requiredPermissions) {
301
+ if (this.userRoles.length === 0) {
302
+ throw new Error('No roles found for the user');
303
+ }
304
+ return requiredPermissions.every(permission => this.userRoles.includes(permission));
305
+ }
306
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
307
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AuthService, providedIn: 'root' }); }
308
+ }
309
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AuthService, decorators: [{
310
+ type: Injectable,
311
+ args: [{
312
+ providedIn: 'root'
313
+ }]
314
+ }], ctorParameters: function () { return []; } });
315
+
593
316
  class ButtonComponent {
594
317
  constructor(authService) {
595
318
  this.authService = authService;
@@ -741,7 +464,7 @@ class ButtonComponent {
741
464
  {{ label }}
742
465
  </button>
743
466
  </ng-container>
744
- `, isInline: true, styles: [".btn{padding:.5rem 1rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:24px;letter-spacing:.005em;text-align:left}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
467
+ `, isInline: true, styles: [".btn{padding:.5rem 1rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:Inter,sans-serif;font-size:16px;font-weight:600;line-height:24px;letter-spacing:.005em;text-align:left}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
745
468
  }
746
469
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, decorators: [{
747
470
  type: Component,
@@ -835,7 +558,7 @@ class BasicRegistrationComponent {
835
558
  this.saveClick.emit(event);
836
559
  }
837
560
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BasicRegistrationComponent, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
838
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BasicRegistrationComponent, selector: "argenta-basic-registration", inputs: { cancelLabel: "cancelLabel", saveLabel: "saveLabel", cancelPermissions: "cancelPermissions", savePermissions: "savePermissions" }, outputs: { cancelClick: "cancelClick", saveClick: "saveClick" }, ngImport: i0, template: "<div class=\"row row-car\">\n <div class=\"card\">\n <div class=\"card-content\" style=\"margin-top: 2.5rem;\">\n <ng-content></ng-content> <!-- Permite a inclus\u00E3o de conte\u00FAdo din\u00E2mico -->\n </div>\n <div class=\"card-footer\">\n <div class=\"button-group\">\n <argenta-custom-button\n *ngIf=\"hasPermission(cancelPermissions)\"\n [type]=\"'button'\"\n [label]=\"cancelLabel\"\n [btnClass]=\"ButtonClasses.Light\"\n (onButtonClick)=\"handleCancel($event)\"\n class=\"argenta-custom-button\">\n </argenta-custom-button>\n <argenta-custom-button\n *ngIf=\"hasPermission(savePermissions)\"\n [type]=\"'submit'\"\n [label]=\"saveLabel\"\n [btnClass]=\"ButtonClasses.Primary\"\n (onButtonClick)=\"handleSave($event)\"\n class=\"argenta-custom-button\">\n </argenta-custom-button>\n </div>\n </div>\n </div> \n</div>\n", styles: ["@charset \"UTF-8\";.card{border-radius:10px;padding:1rem;background-color:#fff;border:none}.card-footer{display:flex;justify-content:flex-end;margin-top:1rem;padding-top:1rem;border-radius:.25rem}.button-group{display:flex;gap:1rem;height:3rem}.argenta-custom-button{height:100%}.row-car{margin-left:-.8rem;margin-right:-.8rem}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "argenta-custom-button", inputs: ["type", "label", "btnClass", "fontSize", "disabled", "autofocus", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "permissions"], outputs: ["onButtonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
561
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BasicRegistrationComponent, selector: "argenta-basic-registration", inputs: { cancelLabel: "cancelLabel", saveLabel: "saveLabel", cancelPermissions: "cancelPermissions", savePermissions: "savePermissions" }, outputs: { cancelClick: "cancelClick", saveClick: "saveClick" }, ngImport: i0, template: "<div class=\"row row-car\">\n <div class=\"card\">\n <div class=\"card-content\" style=\"margin-top: 2.5rem;\">\n <ng-content></ng-content> <!-- Permite a inclus\u00E3o de conte\u00FAdo din\u00E2mico -->\n </div>\n <div class=\"card-footer\">\n <div class=\"button-group\">\n <argenta-custom-button\n *ngIf=\"hasPermission(cancelPermissions)\"\n [type]=\"'button'\"\n [label]=\"cancelLabel\"\n [btnClass]=\"ButtonClasses.Light\"\n (onButtonClick)=\"handleCancel($event)\"\n class=\"argenta-custom-button\">\n </argenta-custom-button>\n <argenta-custom-button\n *ngIf=\"hasPermission(savePermissions)\"\n [type]=\"'submit'\"\n [label]=\"saveLabel\"\n [btnClass]=\"ButtonClasses.Primary\"\n (onButtonClick)=\"handleSave($event)\"\n class=\"argenta-custom-button\">\n </argenta-custom-button>\n </div>\n </div>\n </div> \n</div>\n", styles: ["@charset \"UTF-8\";.card{border-radius:10px;padding:1rem;background-color:#fff;border:none}.card-footer{display:flex;justify-content:flex-end;margin-top:1rem;padding-top:1rem;border-radius:.25rem}.button-group{display:flex;gap:1rem;height:3rem}.argenta-custom-button{height:100%}.row-car{margin-left:-.8rem;margin-right:-.8rem}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: ButtonComponent, selector: "argenta-custom-button", inputs: ["type", "label", "btnClass", "fontSize", "disabled", "autofocus", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "permissions"], outputs: ["onButtonClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
839
562
  }
840
563
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BasicRegistrationComponent, decorators: [{
841
564
  type: Component,
@@ -947,7 +670,7 @@ class CheckboxComponent {
947
670
  />
948
671
  <label class="form-check-label" [for]="id">{{ label }}</label>
949
672
  </div>
950
- `, isInline: true, styles: [".form-check-input{font-family:Arial,sans-serif;color:#333;font-size:1rem}.form-check-label{font-family:Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
673
+ `, isInline: true, styles: [".form-check-input{font-family:Arial,sans-serif;color:#333;font-size:1rem}.form-check-label{font-family:Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
951
674
  }
952
675
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CheckboxComponent, decorators: [{
953
676
  type: Component,
@@ -1133,7 +856,7 @@ class CustomPaginationComponent {
1133
856
  this.destroy$.complete();
1134
857
  }
1135
858
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomPaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1136
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomPaginationComponent, selector: "custom-pagination", inputs: { totalItems: "totalItems", itemsPerPage: "itemsPerPage", currentPage: "currentPage", showPageInfo: "showPageInfo" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<nav *ngIf=\"totalPages > 0\">\n <ul class=\"pagination\">\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"changePage(1)\">&laquo;&laquo;</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"changePage(currentPage - 1)\">&laquo;</a>\n </li>\n <li class=\"page-item\" *ngFor=\"let page of pages\" [class.active]=\"page === currentPage\">\n <a class=\"page-link\" (click)=\"changePage(page)\">{{ page }}</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === totalPages\">\n <a class=\"page-link\" (click)=\"changePage(currentPage + 1)\">&raquo;</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === totalPages\">\n <a class=\"page-link\" (click)=\"changePage(totalPages)\">&raquo;&raquo;</a>\n </li>\n </ul>\n</nav>\n", styles: ["@charset \"UTF-8\";.pagination{display:flex;list-style:none;padding:0;margin:1rem 0;justify-content:center;align-items:center}.page-item{margin:0 .25rem}.page-item.disabled .page-link{cursor:not-allowed;opacity:.5}.page-item.active .page-link{background-color:#00444c;color:#fff}.page-item .page-link{padding:.5rem .75rem;border:1px solid #dee2e6;border-radius:.25rem;text-decoration:none;color:#00444c;cursor:pointer;transition:background-color .2s}.page-item .page-link:hover{background-color:#e5e5e5}.page-info{margin-left:1rem;font-size:1rem;color:#00444c;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
859
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomPaginationComponent, selector: "custom-pagination", inputs: { totalItems: "totalItems", itemsPerPage: "itemsPerPage", currentPage: "currentPage", showPageInfo: "showPageInfo" }, outputs: { pageChange: "pageChange" }, ngImport: i0, template: "<nav *ngIf=\"totalPages > 0\">\n <ul class=\"pagination\">\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"changePage(1)\">&laquo;&laquo;</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === 1\">\n <a class=\"page-link\" (click)=\"changePage(currentPage - 1)\">&laquo;</a>\n </li>\n <li class=\"page-item\" *ngFor=\"let page of pages\" [class.active]=\"page === currentPage\">\n <a class=\"page-link\" (click)=\"changePage(page)\">{{ page }}</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === totalPages\">\n <a class=\"page-link\" (click)=\"changePage(currentPage + 1)\">&raquo;</a>\n </li>\n <li class=\"page-item\" [class.disabled]=\"currentPage === totalPages\">\n <a class=\"page-link\" (click)=\"changePage(totalPages)\">&raquo;&raquo;</a>\n </li>\n </ul>\n</nav>\n", styles: ["@charset \"UTF-8\";.pagination{display:flex;list-style:none;padding:0;margin:1rem 0;justify-content:center;align-items:center}.page-item{margin:0 .25rem}.page-item.disabled .page-link{cursor:not-allowed;opacity:.5}.page-item.active .page-link{background-color:#00444c;color:#fff}.page-item .page-link{padding:.5rem .75rem;border:1px solid #dee2e6;border-radius:.25rem;text-decoration:none;color:#00444c;cursor:pointer;transition:background-color .2s}.page-item .page-link:hover{background-color:#e5e5e5}.page-info{margin-left:1rem;font-size:1rem;color:#00444c;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
1137
860
  }
1138
861
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomPaginationComponent, decorators: [{
1139
862
  type: Component,
@@ -1180,7 +903,7 @@ class CustomSwitchComponent {
1180
903
  }
1181
904
  }
1182
905
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomSwitchComponent, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
1183
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomSwitchComponent, selector: "argenta-custom-switch", inputs: { checked: "checked", label: "label", permissions: "permissions" }, outputs: { switchChange: "switchChange" }, ngImport: i0, template: "<ng-container *ngIf=\"hasPermission()\">\n <div class=\"form-check form-switch\">\n <input \n class=\"form-check-input\" \n type=\"checkbox\" \n [checked]=\"checked\" \n (change)=\"toggleSwitch()\" \n id=\"flexSwitchCheckDefault\" \n />\n <label class=\"form-check-label\" for=\"flexSwitchCheckDefault\">\n {{ label }}\n </label>\n </div>\n</ng-container>\n", styles: ["@charset \"UTF-8\";.form-check{display:flex;align-items:center}.form-check-input{width:60px;height:34px;margin-right:10px;cursor:pointer;position:relative;appearance:none;background-color:#e5e5e5;border:2px solid #00444C;border-radius:34px;outline:none;transition:background-color .3s,border-color .3s}.form-check-input:focus{outline:none;box-shadow:none}.form-check-input:checked{background-color:#00444c;border-color:#00444c}.form-check-input:before{content:\"\";position:absolute;width:26px;height:26px;background-color:#00444c;border-radius:50%;top:3px;left:3px;transition:transform .3s,background-color .3s}.form-check-input:checked:before{transform:translate(26px);background-color:#fff}.form-check-label{color:#00444c;font-family:Inter,sans-serif;font-size:16px;font-weight:600;height:24px;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
906
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CustomSwitchComponent, selector: "argenta-custom-switch", inputs: { checked: "checked", label: "label", permissions: "permissions" }, outputs: { switchChange: "switchChange" }, ngImport: i0, template: "<ng-container *ngIf=\"hasPermission()\">\n <div class=\"form-check form-switch\">\n <input \n class=\"form-check-input\" \n type=\"checkbox\" \n [checked]=\"checked\" \n (change)=\"toggleSwitch()\" \n id=\"flexSwitchCheckDefault\" \n />\n <label class=\"form-check-label\" for=\"flexSwitchCheckDefault\">\n {{ label }}\n </label>\n </div>\n</ng-container>\n", styles: ["@charset \"UTF-8\";.form-check{display:flex;align-items:center}.form-check-input{width:60px;height:34px;margin-right:10px;cursor:pointer;position:relative;appearance:none;background-color:#e5e5e5;border:2px solid #00444C;border-radius:34px;outline:none;transition:background-color .3s,border-color .3s}.form-check-input:focus{outline:none;box-shadow:none}.form-check-input:checked{background-color:#00444c;border-color:#00444c}.form-check-input:before{content:\"\";position:absolute;width:26px;height:26px;background-color:#00444c;border-radius:50%;top:3px;left:3px;transition:transform .3s,background-color .3s}.form-check-input:checked:before{transform:translate(26px);background-color:#fff}.form-check-label{color:#00444c;font-family:Inter,sans-serif;font-size:16px;font-weight:600;height:24px;line-height:24px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1184
907
  }
1185
908
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CustomSwitchComponent, decorators: [{
1186
909
  type: Component,
@@ -1242,7 +965,7 @@ class FileUploadComponent {
1242
965
  this.destroy$.complete();
1243
966
  }
1244
967
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FileUploadComponent, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
1245
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FileUploadComponent, selector: "argenta-file-upload", inputs: { accept: "accept", multiple: "multiple", maxFileSize: "maxFileSize", labelText: "labelText", permissions: "permissions" }, outputs: { fileUploaded: "fileUploaded" }, ngImport: i0, template: "<div *ngIf=\"hasPermission()\" class=\"file-upload-container\">\n <label for=\"fileUpload\" class=\"form-label\">{{ labelText }}</label> \n <input\n type=\"file\"\n id=\"fileUpload\"\n class=\"form-control\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileChange($event)\" \n />\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.file-upload-container{margin-top:10px;font-family:Inter,Arial,sans-serif}.file-upload-container .form-label{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.5rem;color:#333}.file-upload-container .form-control[type=file]{padding:10px;border-radius:5px;border:1px solid #ced4da;font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.file-upload-container .form-control[type=file]::file-selector-button{padding:.5rem 1rem;margin-right:10px;border:1px solid #ced4da;border-radius:5px;background-color:#f8f9fa;color:#000;cursor:pointer;transition:background-color .2s}.file-upload-container .form-control[type=file]::file-selector-button:hover{background-color:#e2e6ea}.file-upload-container .form-text{color:#6c757d;font-size:.875rem}\n"], dependencies: [{ kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
968
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FileUploadComponent, selector: "argenta-file-upload", inputs: { accept: "accept", multiple: "multiple", maxFileSize: "maxFileSize", labelText: "labelText", permissions: "permissions" }, outputs: { fileUploaded: "fileUploaded" }, ngImport: i0, template: "<div *ngIf=\"hasPermission()\" class=\"file-upload-container\">\n <label for=\"fileUpload\" class=\"form-label\">{{ labelText }}</label> \n <input\n type=\"file\"\n id=\"fileUpload\"\n class=\"form-control\"\n [accept]=\"accept\"\n [multiple]=\"multiple\"\n (change)=\"onFileChange($event)\" \n />\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.file-upload-container{margin-top:10px;font-family:Inter,Arial,sans-serif}.file-upload-container .form-label{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.5rem;color:#333}.file-upload-container .form-control[type=file]{padding:10px;border-radius:5px;border:1px solid #ced4da;font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.file-upload-container .form-control[type=file]::file-selector-button{padding:.5rem 1rem;margin-right:10px;border:1px solid #ced4da;border-radius:5px;background-color:#f8f9fa;color:#000;cursor:pointer;transition:background-color .2s}.file-upload-container .form-control[type=file]::file-selector-button:hover{background-color:#e2e6ea}.file-upload-container .form-text{color:#6c757d;font-size:.875rem}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1246
969
  }
1247
970
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FileUploadComponent, decorators: [{
1248
971
  type: Component,
@@ -1429,6 +1152,9 @@ class InputComponent {
1429
1152
  this.onlyNumbers = false;
1430
1153
  this.validateInput = false;
1431
1154
  this.labelFontWeight = 400;
1155
+ this.useMoneyMask = false; // Para ativar/desativar a máscara de moeda
1156
+ this.currencyCode = 'BRL'; // Código da moeda
1157
+ this.displayCurrencySymbol = true; // Exibir ou não o símbolo da moeda
1432
1158
  this.inputEvent = new EventEmitter();
1433
1159
  this.changeEvent = new EventEmitter();
1434
1160
  this.focusEvent = new EventEmitter();
@@ -1449,14 +1175,12 @@ class InputComponent {
1449
1175
  onInput(event) {
1450
1176
  const inputElement = event.target;
1451
1177
  let inputValue = inputElement.value;
1452
- if ((this.onlyNumbers) && !(this.useCpfMask || this.useCnpjMask || this.useCepMask)) {
1453
- inputValue = inputValue.replace(/\D/g, '');
1178
+ // Aplica máscara de números se necessário
1179
+ if (this.onlyNumbers && !(this.useCpfMask || this.useCnpjMask || this.useCepMask || this.useMoneyMask)) {
1180
+ inputValue = inputValue.replace(/\D/g, ''); // Remove todos os não numéricos
1454
1181
  }
1455
- this.value = inputValue;
1456
- this.onChangeCallback(this.value);
1457
- this.inputEvent.emit(event);
1458
- // Validar imediatamente após o último caractere numérico para CPF, CNPJ ou CEP
1459
- const numericValue = this.value.replace(/\D/g, ''); // Remove todos os caracteres não numéricos
1182
+ // Validação imediata para CPF, CNPJ ou CEP
1183
+ const numericValue = inputValue.replace(/\D/g, ''); // Remove todos os caracteres não numéricos
1460
1184
  if (this.validateInput) {
1461
1185
  if (this.useCpfMask && numericValue.length === 11 && !this.validateCpf(numericValue)) {
1462
1186
  this.clearAndShowValidationError('CPF inválido. Por favor, insira um CPF correto.');
@@ -1468,6 +1192,40 @@ class InputComponent {
1468
1192
  this.clearAndShowValidationError('CEP inválido. Por favor, insira um CEP correto.');
1469
1193
  }
1470
1194
  }
1195
+ // Máscara de moeda
1196
+ if (this.useMoneyMask) {
1197
+ const numericValue = inputValue.replace(/\D/g, ''); // Remove todos os não numéricos
1198
+ const formattedValue = this.formatMoney(numericValue); // Formata como dinheiro ou número decimal
1199
+ inputElement.value = formattedValue;
1200
+ this.value = formattedValue;
1201
+ }
1202
+ else {
1203
+ this.value = inputValue;
1204
+ }
1205
+ // Atualiza o valor e emite o evento de mudança
1206
+ this.onChangeCallback(this.value);
1207
+ this.inputEvent.emit(event);
1208
+ }
1209
+ formatMoney(value) {
1210
+ if (!value)
1211
+ return ''; // Se o valor estiver vazio, retorna uma string vazia
1212
+ const numericValue = parseFloat(value) / 100;
1213
+ // Verifica se deve exibir o símbolo da moeda ou não
1214
+ if (this.displayCurrencySymbol) {
1215
+ // Formata como moeda
1216
+ return new Intl.NumberFormat('pt-BR', {
1217
+ style: 'currency',
1218
+ currency: this.currencyCode
1219
+ }).format(numericValue);
1220
+ }
1221
+ else {
1222
+ // Formata como número decimal, sem o símbolo da moeda
1223
+ return new Intl.NumberFormat('pt-BR', {
1224
+ style: 'decimal',
1225
+ minimumFractionDigits: 2,
1226
+ maximumFractionDigits: 2
1227
+ }).format(numericValue);
1228
+ }
1471
1229
  }
1472
1230
  onKeyDown(event) {
1473
1231
  if (this.onlyNumbers && !/^\d$/.test(event.key) && event.key !== 'Backspace' && event.key !== 'ArrowLeft' && event.key !== 'ArrowRight') {
@@ -1487,77 +1245,392 @@ class InputComponent {
1487
1245
  else if (this.useCepMask && !this.validateCep(numericValue)) {
1488
1246
  this.clearAndShowValidationError('CEP inválido. Por favor, insira um CEP correto.');
1489
1247
  }
1490
- }
1491
- this.changeEvent.emit(event);
1248
+ }
1249
+ this.changeEvent.emit(event);
1250
+ }
1251
+ validateCpf(cpf) {
1252
+ if (cpf.length !== 11 || /^(\d)\1+$/.test(cpf))
1253
+ return false;
1254
+ let sum = 0, remainder;
1255
+ for (let i = 1; i <= 9; i++)
1256
+ sum += parseInt(cpf.substring(i - 1, i)) * (11 - i);
1257
+ remainder = (sum * 10) % 11;
1258
+ if (remainder === 10 || remainder === 11)
1259
+ remainder = 0;
1260
+ if (remainder !== parseInt(cpf.substring(9, 10)))
1261
+ return false;
1262
+ sum = 0;
1263
+ for (let i = 1; i <= 10; i++)
1264
+ sum += parseInt(cpf.substring(i - 1, i)) * (12 - i);
1265
+ remainder = (sum * 10) % 11;
1266
+ if (remainder === 10 || remainder === 11)
1267
+ remainder = 0;
1268
+ return remainder === parseInt(cpf.substring(10, 11));
1269
+ }
1270
+ validateCnpj(cnpj) {
1271
+ if (cnpj.length !== 14)
1272
+ return false;
1273
+ let length = cnpj.length - 2;
1274
+ let numbers = cnpj.substring(0, length);
1275
+ let digits = cnpj.substring(length);
1276
+ let sum = 0, pos = length - 7;
1277
+ for (let i = length; i >= 1; i--) {
1278
+ sum += parseInt(numbers.charAt(length - i)) * pos--;
1279
+ if (pos < 2)
1280
+ pos = 9;
1281
+ }
1282
+ let result = sum % 11 < 2 ? 0 : 11 - sum % 11;
1283
+ if (result !== parseInt(digits.charAt(0)))
1284
+ return false;
1285
+ length = length + 1;
1286
+ numbers = cnpj.substring(0, length);
1287
+ sum = 0;
1288
+ pos = length - 7;
1289
+ for (let i = length; i >= 1; i--) {
1290
+ sum += parseInt(numbers.charAt(length - i)) * pos--;
1291
+ if (pos < 2)
1292
+ pos = 9;
1293
+ }
1294
+ result = sum % 11 < 2 ? 0 : 11 - sum % 11;
1295
+ return result === parseInt(digits.charAt(1));
1296
+ }
1297
+ validateCep(cep) {
1298
+ return /^\d{8}$/.test(cep); // Valida apenas números, sem considerar a máscara
1299
+ }
1300
+ clearAndShowValidationError(message) {
1301
+ this.value = ''; // Limpa o valor do ngModel
1302
+ this.onChangeCallback(this.value); // Atualiza o ngModel com o valor limpo
1303
+ this.errorMessage = message;
1304
+ this.showErrorModal = true;
1305
+ }
1306
+ closeModal() {
1307
+ this.showErrorModal = false;
1308
+ this.errorMessage = '';
1309
+ }
1310
+ onFocus(event) {
1311
+ this.focusEvent.emit(event);
1312
+ }
1313
+ onBlur(event) {
1314
+ this.onTouchedCallback();
1315
+ this.blurEvent.emit(event);
1316
+ }
1317
+ writeValue(value) {
1318
+ this.value = value;
1319
+ }
1320
+ registerOnChange(fn) {
1321
+ this.onChangeCallback = fn;
1322
+ }
1323
+ registerOnTouched(fn) {
1324
+ this.onTouchedCallback = fn;
1325
+ }
1326
+ setDisabledState(isDisabled) {
1327
+ this.disabled = isDisabled;
1328
+ }
1329
+ hasPermission() {
1330
+ if (!this.permissions || this.permissions.length === 0) {
1331
+ return true;
1332
+ }
1333
+ try {
1334
+ return this.authService.hasPermission(this.permissions);
1335
+ }
1336
+ catch (error) {
1337
+ if (error instanceof Error) {
1338
+ console.error('Permission error:', error.message);
1339
+ }
1340
+ else {
1341
+ console.error('Unknown error occurred during permission check');
1342
+ }
1343
+ return true;
1344
+ }
1345
+ }
1346
+ ngOnDestroy() {
1347
+ this.subscriptions.forEach(sub => sub.unsubscribe());
1348
+ }
1349
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputComponent, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
1350
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InputComponent, selector: "argenta-custom-input", inputs: { label: "label", placeholder: "placeholder", id: "id", type: "type", disabled: "disabled", readonly: "readonly", maxlength: "maxlength", minlength: "minlength", required: "required", pattern: "pattern", autofocus: "autofocus", useCpfMask: "useCpfMask", useCnpjMask: "useCnpjMask", useCepMask: "useCepMask", onlyNumbers: "onlyNumbers", validateInput: "validateInput", labelFontWeight: "labelFontWeight", permissions: "permissions", useMoneyMask: "useMoneyMask", currencyCode: "currencyCode", displayCurrencySymbol: "displayCurrencySymbol" }, outputs: { inputEvent: "inputEvent", changeEvent: "changeEvent", focusEvent: "focusEvent", blurEvent: "blurEvent", keyupEvent: "keyupEvent", keydownEvent: "keydownEvent", keypressEvent: "keypressEvent" }, providers: [
1351
+ {
1352
+ provide: NG_VALUE_ACCESSOR,
1353
+ useExisting: forwardRef(() => InputComponent),
1354
+ multi: true
1355
+ }
1356
+ ], ngImport: i0, template: "<div *ngIf=\"hasPermission()\" class=\"form-group\">\n <label [for]=\"id\" [ngClass]=\"'label-styles'\">{{ label }}</label>\n <input [type]=\"getInputType()\"\n class=\"form-control custom-input\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"value\"\n (input)=\"onInput($event)\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"keyupEvent.emit($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keypress)=\"keypressEvent.emit($event)\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [required]=\"required\"\n [attr.pattern]=\"pattern\"\n [autofocus]=\"autofocus\"\n [cpfMask]=\"useCpfMask\" \n [cnpjMask]=\"useCnpjMask\" \n [cepMask]=\"useCepMask\">\n\n <!-- Modal para exibir mensagens de erro -->\n <div class=\"modal-overlay\" *ngIf=\"showErrorModal\">\n <div class=\"modal-content\">\n <span class=\"close\" (click)=\"closeModal()\">&times;</span>\n <p>{{ errorMessage }}</p>\n <button class=\"btn-ok\" (click)=\"closeModal()\">OK</button>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem;font-weight:700}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.5rem}.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#0009;display:flex;align-items:center;justify-content:center;z-index:1000}.modal-content{background:#fff;padding:25px 30px;border-radius:8px;width:360px;text-align:center;position:relative;box-shadow:0 4px 12px #0003}.close{position:absolute;top:10px;right:15px;cursor:pointer;font-size:20px;color:#555;transition:color .3s}.close:hover{color:#f44336}.btn-ok{margin-top:20px;padding:8px 20px;border:none;background-color:#00444c;color:#fff;border-radius:4px;cursor:pointer;font-size:14px;transition:background-color .3s,transform .2s}.btn-ok:hover{background-color:#00363d;transform:scale(1.05)}.btn-ok:active{transform:scale(.98)}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CepMaskDirective, selector: "[cepMask]", inputs: ["cepMask"] }, { kind: "directive", type: CnpjMaskDirective, selector: "[cnpjMask]", inputs: ["cnpjMask"] }, { kind: "directive", type: CpfMaskDirective, selector: "[cpfMask]", inputs: ["cpfMask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1357
+ }
1358
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputComponent, decorators: [{
1359
+ type: Component,
1360
+ args: [{ selector: 'argenta-custom-input', providers: [
1361
+ {
1362
+ provide: NG_VALUE_ACCESSOR,
1363
+ useExisting: forwardRef(() => InputComponent),
1364
+ multi: true
1365
+ }
1366
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"hasPermission()\" class=\"form-group\">\n <label [for]=\"id\" [ngClass]=\"'label-styles'\">{{ label }}</label>\n <input [type]=\"getInputType()\"\n class=\"form-control custom-input\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"value\"\n (input)=\"onInput($event)\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"keyupEvent.emit($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keypress)=\"keypressEvent.emit($event)\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [required]=\"required\"\n [attr.pattern]=\"pattern\"\n [autofocus]=\"autofocus\"\n [cpfMask]=\"useCpfMask\" \n [cnpjMask]=\"useCnpjMask\" \n [cepMask]=\"useCepMask\">\n\n <!-- Modal para exibir mensagens de erro -->\n <div class=\"modal-overlay\" *ngIf=\"showErrorModal\">\n <div class=\"modal-content\">\n <span class=\"close\" (click)=\"closeModal()\">&times;</span>\n <p>{{ errorMessage }}</p>\n <button class=\"btn-ok\" (click)=\"closeModal()\">OK</button>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem;font-weight:700}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.5rem}.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#0009;display:flex;align-items:center;justify-content:center;z-index:1000}.modal-content{background:#fff;padding:25px 30px;border-radius:8px;width:360px;text-align:center;position:relative;box-shadow:0 4px 12px #0003}.close{position:absolute;top:10px;right:15px;cursor:pointer;font-size:20px;color:#555;transition:color .3s}.close:hover{color:#f44336}.btn-ok{margin-top:20px;padding:8px 20px;border:none;background-color:#00444c;color:#fff;border-radius:4px;cursor:pointer;font-size:14px;transition:background-color .3s,transform .2s}.btn-ok:hover{background-color:#00363d;transform:scale(1.05)}.btn-ok:active{transform:scale(.98)}\n"] }]
1367
+ }], ctorParameters: function () { return [{ type: AuthService }]; }, propDecorators: { label: [{
1368
+ type: Input
1369
+ }], placeholder: [{
1370
+ type: Input
1371
+ }], id: [{
1372
+ type: Input
1373
+ }], type: [{
1374
+ type: Input
1375
+ }], disabled: [{
1376
+ type: Input
1377
+ }], readonly: [{
1378
+ type: Input
1379
+ }], maxlength: [{
1380
+ type: Input
1381
+ }], minlength: [{
1382
+ type: Input
1383
+ }], required: [{
1384
+ type: Input
1385
+ }], pattern: [{
1386
+ type: Input
1387
+ }], autofocus: [{
1388
+ type: Input
1389
+ }], useCpfMask: [{
1390
+ type: Input
1391
+ }], useCnpjMask: [{
1392
+ type: Input
1393
+ }], useCepMask: [{
1394
+ type: Input
1395
+ }], onlyNumbers: [{
1396
+ type: Input
1397
+ }], validateInput: [{
1398
+ type: Input
1399
+ }], labelFontWeight: [{
1400
+ type: Input
1401
+ }], permissions: [{
1402
+ type: Input
1403
+ }], useMoneyMask: [{
1404
+ type: Input
1405
+ }], currencyCode: [{
1406
+ type: Input
1407
+ }], displayCurrencySymbol: [{
1408
+ type: Input
1409
+ }], inputEvent: [{
1410
+ type: Output
1411
+ }], changeEvent: [{
1412
+ type: Output
1413
+ }], focusEvent: [{
1414
+ type: Output
1415
+ }], blurEvent: [{
1416
+ type: Output
1417
+ }], keyupEvent: [{
1418
+ type: Output
1419
+ }], keydownEvent: [{
1420
+ type: Output
1421
+ }], keypressEvent: [{
1422
+ type: Output
1423
+ }] } });
1424
+
1425
+ class JsonViewerComponent {
1426
+ constructor() {
1427
+ this.isRoot = true;
1428
+ this.allExpanded = true;
1429
+ this.expandedMap = new Map();
1430
+ }
1431
+ toggleAll() {
1432
+ this.allExpanded = !this.allExpanded;
1433
+ this.expandedMap.clear();
1434
+ }
1435
+ toggleExpand(key) {
1436
+ const currentState = this.isExpanded(key);
1437
+ this.expandedMap.set(key, !currentState);
1438
+ }
1439
+ isObject(val) {
1440
+ return val !== null && typeof val === 'object';
1441
+ }
1442
+ objectKeys(obj) {
1443
+ return Object.keys(obj);
1444
+ }
1445
+ isExpanded(key) {
1446
+ return this.expandedMap.has(key) ? this.expandedMap.get(key) : this.allExpanded;
1447
+ }
1448
+ copyJson() {
1449
+ const jsonString = JSON.stringify(this.jsonData, null, 2);
1450
+ navigator.clipboard.writeText(jsonString).then(() => {
1451
+ alert('JSON copiado com sucesso!');
1452
+ }).catch(err => {
1453
+ console.error('Error copying JSON to clipboard:', err);
1454
+ });
1455
+ }
1456
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: JsonViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1457
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: JsonViewerComponent, selector: "argenta-json-viewer", inputs: { jsonData: "jsonData", isRoot: "isRoot" }, ngImport: i0, template: "<div class=\"json-viewer-box\">\n <div class=\"toolbar\">\n <button *ngIf=\"isRoot\" class=\"action-button copy-button\" (click)=\"copyJson()\">Copiar</button>\n <button *ngIf=\"isRoot\" class=\"action-button toggle-button\" (click)=\"toggleAll()\">\n {{ allExpanded ? '\u25BC Ocultar Tudo' : '\u25BA Exibir Tudo' }}\n </button>\n </div>\n \n <div class=\"json-content\">\n <div *ngIf=\"isObject(jsonData)\">\n <div class=\"json-pair\" *ngFor=\"let key of objectKeys(jsonData)\">\n <span class=\"key\">\n {{ key }}:\n <button class=\"minimal-toggle-button\" (click)=\"toggleExpand(key)\">\n {{ isExpanded(key) ? '\u25BC' : '\u25BA' }}\n </button>\n </span>\n \n <div class=\"nested-json\" *ngIf=\"isExpanded(key)\">\n <argenta-json-viewer [jsonData]=\"jsonData[key]\" [isRoot]=\"false\"></argenta-json-viewer>\n </div>\n <span *ngIf=\"!isExpanded(key) && isObject(jsonData[key])\">[...]</span>\n </div>\n </div>\n <span *ngIf=\"!isObject(jsonData)\">\n {{ jsonData }}\n </span>\n </div>\n </div>\n ", styles: [".json-viewer-box{border:1px solid #ccc;padding:10px;border-radius:8px;font-family:Arial,sans-serif;background-color:#f9f9f9}.json-viewer-box .toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding-bottom:5px;border-bottom:1px solid #ddd}.json-viewer-box .action-button{background-color:#4caf50;color:#fff;border:none;padding:8px 16px;font-size:14px;border-radius:4px;cursor:pointer;transition:background-color .3s ease}.json-viewer-box .action-button:hover{background-color:#45a049}.json-viewer-box .minimal-toggle-button{background:none;border:none;color:#007bff;cursor:pointer;font-size:12px;margin-left:5px;padding:0;line-height:1}.json-viewer-box .minimal-toggle-button:hover{color:#0056b3}.json-viewer-box .json-content{margin-top:10px}.json-viewer-box .json-content .json-pair{margin-bottom:5px}.json-viewer-box .json-content .json-pair .key{font-weight:700;margin-right:5px;display:flex;align-items:center}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: JsonViewerComponent, selector: "argenta-json-viewer", inputs: ["jsonData", "isRoot"] }] }); }
1458
+ }
1459
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: JsonViewerComponent, decorators: [{
1460
+ type: Component,
1461
+ args: [{ selector: 'argenta-json-viewer', template: "<div class=\"json-viewer-box\">\n <div class=\"toolbar\">\n <button *ngIf=\"isRoot\" class=\"action-button copy-button\" (click)=\"copyJson()\">Copiar</button>\n <button *ngIf=\"isRoot\" class=\"action-button toggle-button\" (click)=\"toggleAll()\">\n {{ allExpanded ? '\u25BC Ocultar Tudo' : '\u25BA Exibir Tudo' }}\n </button>\n </div>\n \n <div class=\"json-content\">\n <div *ngIf=\"isObject(jsonData)\">\n <div class=\"json-pair\" *ngFor=\"let key of objectKeys(jsonData)\">\n <span class=\"key\">\n {{ key }}:\n <button class=\"minimal-toggle-button\" (click)=\"toggleExpand(key)\">\n {{ isExpanded(key) ? '\u25BC' : '\u25BA' }}\n </button>\n </span>\n \n <div class=\"nested-json\" *ngIf=\"isExpanded(key)\">\n <argenta-json-viewer [jsonData]=\"jsonData[key]\" [isRoot]=\"false\"></argenta-json-viewer>\n </div>\n <span *ngIf=\"!isExpanded(key) && isObject(jsonData[key])\">[...]</span>\n </div>\n </div>\n <span *ngIf=\"!isObject(jsonData)\">\n {{ jsonData }}\n </span>\n </div>\n </div>\n ", styles: [".json-viewer-box{border:1px solid #ccc;padding:10px;border-radius:8px;font-family:Arial,sans-serif;background-color:#f9f9f9}.json-viewer-box .toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;padding-bottom:5px;border-bottom:1px solid #ddd}.json-viewer-box .action-button{background-color:#4caf50;color:#fff;border:none;padding:8px 16px;font-size:14px;border-radius:4px;cursor:pointer;transition:background-color .3s ease}.json-viewer-box .action-button:hover{background-color:#45a049}.json-viewer-box .minimal-toggle-button{background:none;border:none;color:#007bff;cursor:pointer;font-size:12px;margin-left:5px;padding:0;line-height:1}.json-viewer-box .minimal-toggle-button:hover{color:#0056b3}.json-viewer-box .json-content{margin-top:10px}.json-viewer-box .json-content .json-pair{margin-bottom:5px}.json-viewer-box .json-content .json-pair .key{font-weight:700;margin-right:5px;display:flex;align-items:center}\n"] }]
1462
+ }], propDecorators: { jsonData: [{
1463
+ type: Input
1464
+ }], isRoot: [{
1465
+ type: Input
1466
+ }] } });
1467
+
1468
+ class MultiSelectComponent {
1469
+ constructor(authService, http) {
1470
+ this.authService = authService;
1471
+ this.http = http;
1472
+ this.label = 'Multi Select';
1473
+ this.data = []; // Accepts an array of generic objects
1474
+ this.placeholder = 'Select items';
1475
+ this.id = 'multiSelectId';
1476
+ this.bindLabel = ''; // Generic dynamic label
1477
+ this.bindValue = ''; // Generic dynamic value
1478
+ this.closeOnSelect = false; // New property to control dropdown close behavior
1479
+ this.searchUrl = ''; // URL for backend search
1480
+ this.multiple = true; // New property to control single or multiple selection
1481
+ this.searchParams = {}; // Parâmetros de busca dinâmicos
1482
+ this.keyupEvent = new EventEmitter();
1483
+ this.backupData = []; // Backup of the initial data
1484
+ this.allItems = []; // Store the combined list
1485
+ this.items = of([]); // Initialization of the property
1486
+ this.filteredItems = of([]); // Filtered items
1487
+ this.searchTerms = new Subject(); // For search debounce
1488
+ this.onChangeCallback = () => { };
1489
+ this.onTouchedCallback = () => { };
1490
+ this.isCourseEntered = false;
1491
+ this.compareFn = (item1, item2) => {
1492
+ return item1 && item2 ? item1[this.bindValue] === item2[this.bindValue] : item1 === item2;
1493
+ };
1494
+ }
1495
+ ngOnInit() {
1496
+ this.backupData = [...this.data]; // Backup initial data
1497
+ this.allItems = [...this.data]; // Initialize allItems with the initial data
1498
+ this.items = of(this.allItems);
1499
+ this.fetchInitialData().subscribe(data => {
1500
+ this.updateData(data);
1501
+ this.filteredItems = this.searchTerms.pipe(debounceTime(700), startWith(''), // Start with an empty search to load the original list
1502
+ switchMap(term => this.search(term)));
1503
+ // Adicionar itens selecionados à lista após buscar dados iniciais
1504
+ this.addSelectedItemsToData();
1505
+ });
1506
+ }
1507
+ ngOnChanges(changes) {
1508
+ if (changes['selected'] && !changes['selected'].isFirstChange()) {
1509
+ this.addSelectedItemsToData();
1510
+ }
1511
+ }
1512
+ fetchInitialData() {
1513
+ return this.http.get(this.searchUrl).pipe(map((response) => {
1514
+ if (response && response.length > 0) {
1515
+ return response.map((item) => ({
1516
+ [this.bindValue]: item[this.bindValue],
1517
+ [this.bindLabel]: item[this.bindLabel]
1518
+ }));
1519
+ }
1520
+ return [];
1521
+ }), catchError((error) => {
1522
+ console.error('Error fetching initial data from backend:', error);
1523
+ return of([]);
1524
+ }));
1492
1525
  }
1493
- validateCpf(cpf) {
1494
- if (cpf.length !== 11 || /^(\d)\1+$/.test(cpf))
1495
- return false;
1496
- let sum = 0, remainder;
1497
- for (let i = 1; i <= 9; i++)
1498
- sum += parseInt(cpf.substring(i - 1, i)) * (11 - i);
1499
- remainder = (sum * 10) % 11;
1500
- if (remainder === 10 || remainder === 11)
1501
- remainder = 0;
1502
- if (remainder !== parseInt(cpf.substring(9, 10)))
1503
- return false;
1504
- sum = 0;
1505
- for (let i = 1; i <= 10; i++)
1506
- sum += parseInt(cpf.substring(i - 1, i)) * (12 - i);
1507
- remainder = (sum * 10) % 11;
1508
- if (remainder === 10 || remainder === 11)
1509
- remainder = 0;
1510
- return remainder === parseInt(cpf.substring(10, 11));
1526
+ updateData(newData) {
1527
+ newData.forEach((item) => {
1528
+ const existsInList = this.allItems.some(listItem => this.compareFn(listItem, item));
1529
+ if (!existsInList) {
1530
+ this.allItems.push(item);
1531
+ }
1532
+ });
1533
+ this.items = of(this.allItems);
1511
1534
  }
1512
- validateCnpj(cnpj) {
1513
- if (cnpj.length !== 14)
1514
- return false;
1515
- let length = cnpj.length - 2;
1516
- let numbers = cnpj.substring(0, length);
1517
- let digits = cnpj.substring(length);
1518
- let sum = 0, pos = length - 7;
1519
- for (let i = length; i >= 1; i--) {
1520
- sum += parseInt(numbers.charAt(length - i)) * pos--;
1521
- if (pos < 2)
1522
- pos = 9;
1523
- }
1524
- let result = sum % 11 < 2 ? 0 : 11 - sum % 11;
1525
- if (result !== parseInt(digits.charAt(0)))
1526
- return false;
1527
- length = length + 1;
1528
- numbers = cnpj.substring(0, length);
1529
- sum = 0;
1530
- pos = length - 7;
1531
- for (let i = length; i >= 1; i--) {
1532
- sum += parseInt(numbers.charAt(length - i)) * pos--;
1533
- if (pos < 2)
1534
- pos = 9;
1535
+ addSelectedItemsToData() {
1536
+ if (this.selected) {
1537
+ const selectedItems = this.multiple ? this.selected : [this.selected];
1538
+ selectedItems.forEach((item) => {
1539
+ const existsInList = this.allItems.some(listItem => this.compareFn(listItem, item));
1540
+ if (!existsInList) {
1541
+ const newItem = {
1542
+ [this.bindValue]: item[this.bindValue] || item,
1543
+ [this.bindLabel]: item[this.bindLabel] || item
1544
+ };
1545
+ this.data.push(newItem);
1546
+ this.allItems.push(newItem);
1547
+ }
1548
+ });
1549
+ this.items = of(this.allItems);
1535
1550
  }
1536
- result = sum % 11 < 2 ? 0 : 11 - sum % 11;
1537
- return result === parseInt(digits.charAt(1));
1538
1551
  }
1539
- validateCep(cep) {
1540
- return /^\d{8}$/.test(cep); // Valida apenas números, sem considerar a máscara
1552
+ onFocus() {
1553
+ this.isCourseEntered = true;
1541
1554
  }
1542
- clearAndShowValidationError(message) {
1543
- this.value = ''; // Limpa o valor do ngModel
1544
- this.onChangeCallback(this.value); // Atualiza o ngModel com o valor limpo
1545
- this.errorMessage = message;
1546
- this.showErrorModal = true;
1555
+ onBlur() {
1556
+ this.isCourseEntered = false;
1547
1557
  }
1548
- closeModal() {
1549
- this.showErrorModal = false;
1550
- this.errorMessage = '';
1558
+ onKeyUp(event) {
1559
+ this.keyupEvent.emit(event);
1551
1560
  }
1552
- onFocus(event) {
1553
- this.focusEvent.emit(event);
1561
+ onSelectedChange(event) {
1562
+ const previousSelected = this.selected;
1563
+ if (this.multiple) {
1564
+ this.selected = event;
1565
+ }
1566
+ else {
1567
+ this.selected = event ? event : null;
1568
+ }
1569
+ this.onChangeCallback(this.selected);
1570
+ // Verificar se um item foi removido
1571
+ if (previousSelected && Array.isArray(previousSelected) && previousSelected.length > event.length) {
1572
+ const removedItems = previousSelected.filter(item => !event.includes(item));
1573
+ removedItems.forEach(item => {
1574
+ const existsInData = this.data.some(dataItem => this.compareFn(dataItem, item));
1575
+ if (!existsInData) {
1576
+ this.data.push(item);
1577
+ this.allItems.push(item); // Adicionar de volta aos itens disponíveis
1578
+ }
1579
+ });
1580
+ }
1554
1581
  }
1555
- onBlur(event) {
1556
- this.onTouchedCallback();
1557
- this.blurEvent.emit(event);
1582
+ onInputChange(event) {
1583
+ const input = event.target.value;
1584
+ this.searchTerms.next(input);
1585
+ }
1586
+ search(term) {
1587
+ if (!term.trim()) {
1588
+ // Se o termo de busca estiver vazio, retorna a lista completa
1589
+ return of(this.allItems);
1590
+ }
1591
+ // Filtra os itens localmente
1592
+ const filtered = this.allItems.filter((item) => item[this.bindLabel].toLowerCase().includes(term.toLowerCase()));
1593
+ if (filtered.length > 0) {
1594
+ console.log('Items filtered locally.');
1595
+ return of(filtered);
1596
+ }
1597
+ else if (this.searchUrl) {
1598
+ // Construir os parâmetros de busca dinamicamente
1599
+ const params = new URLSearchParams(this.searchParams);
1600
+ params.append('term', term);
1601
+ return this.http.get(`${this.searchUrl}?${params.toString()}`).pipe(map((response) => {
1602
+ if (response && response.length > 0) {
1603
+ // Transforma os itens do backend para o formato esperado pelo componente
1604
+ const transformedItems = response.map((item) => ({
1605
+ [this.bindValue]: item[this.bindValue],
1606
+ [this.bindLabel]: item[this.bindLabel]
1607
+ }));
1608
+ // Atualiza os dados com os novos itens buscados
1609
+ this.updateData(transformedItems);
1610
+ return this.allItems;
1611
+ }
1612
+ else {
1613
+ console.log('No items found in the backend search.');
1614
+ return this.allItems;
1615
+ }
1616
+ }), catchError((error) => {
1617
+ console.error('Error fetching from backend:', error);
1618
+ return of(this.allItems);
1619
+ }));
1620
+ }
1621
+ else {
1622
+ console.log('No search URL provided and no items found locally.');
1623
+ return of(this.allItems);
1624
+ }
1558
1625
  }
1559
1626
  writeValue(value) {
1560
- this.value = value;
1627
+ if (this.multiple) {
1628
+ this.selected = value || [];
1629
+ }
1630
+ else {
1631
+ this.selected = value || null;
1632
+ }
1633
+ this.addSelectedItemsToData();
1561
1634
  }
1562
1635
  registerOnChange(fn) {
1563
1636
  this.onChangeCallback = fn;
@@ -1566,7 +1639,7 @@ class InputComponent {
1566
1639
  this.onTouchedCallback = fn;
1567
1640
  }
1568
1641
  setDisabledState(isDisabled) {
1569
- this.disabled = isDisabled;
1642
+ // No implementation needed for this example
1570
1643
  }
1571
1644
  hasPermission() {
1572
1645
  if (!this.permissions || this.permissions.length === 0) {
@@ -1585,77 +1658,88 @@ class InputComponent {
1585
1658
  return true;
1586
1659
  }
1587
1660
  }
1588
- ngOnDestroy() {
1589
- this.subscriptions.forEach(sub => sub.unsubscribe());
1590
- }
1591
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputComponent, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
1592
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InputComponent, selector: "argenta-custom-input", inputs: { label: "label", placeholder: "placeholder", id: "id", type: "type", disabled: "disabled", readonly: "readonly", maxlength: "maxlength", minlength: "minlength", required: "required", pattern: "pattern", autofocus: "autofocus", useCpfMask: "useCpfMask", useCnpjMask: "useCnpjMask", useCepMask: "useCepMask", onlyNumbers: "onlyNumbers", validateInput: "validateInput", labelFontWeight: "labelFontWeight", permissions: "permissions" }, outputs: { inputEvent: "inputEvent", changeEvent: "changeEvent", focusEvent: "focusEvent", blurEvent: "blurEvent", keyupEvent: "keyupEvent", keydownEvent: "keydownEvent", keypressEvent: "keypressEvent" }, providers: [
1661
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, deps: [{ token: AuthService }, { token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Component }); }
1662
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MultiSelectComponent, selector: "argenta-custom-multi-select", inputs: { label: "label", data: "data", placeholder: "placeholder", selected: "selected", id: "id", bindLabel: "bindLabel", bindValue: "bindValue", permissions: "permissions", closeOnSelect: "closeOnSelect", searchUrl: "searchUrl", multiple: "multiple", searchParams: "searchParams" }, outputs: { keyupEvent: "keyupEvent" }, providers: [
1593
1663
  {
1594
1664
  provide: NG_VALUE_ACCESSOR,
1595
- useExisting: forwardRef(() => InputComponent),
1665
+ useExisting: forwardRef(() => MultiSelectComponent),
1596
1666
  multi: true
1597
1667
  }
1598
- ], ngImport: i0, template: "<div *ngIf=\"hasPermission()\" class=\"form-group\">\n <label [for]=\"id\" [ngClass]=\"'label-styles'\">{{ label }}</label>\n <input [type]=\"getInputType()\"\n class=\"form-control custom-input\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"value\"\n (input)=\"onInput($event)\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"keyupEvent.emit($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keypress)=\"keypressEvent.emit($event)\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [required]=\"required\"\n [attr.pattern]=\"pattern\"\n [autofocus]=\"autofocus\"\n [cpfMask]=\"useCpfMask\" \n [cnpjMask]=\"useCnpjMask\" \n [cepMask]=\"useCepMask\">\n\n <!-- Modal para exibir mensagens de erro -->\n <div class=\"modal-overlay\" *ngIf=\"showErrorModal\">\n <div class=\"modal-content\">\n <span class=\"close\" (click)=\"closeModal()\">&times;</span>\n <p>{{ errorMessage }}</p>\n <button class=\"btn-ok\" (click)=\"closeModal()\">OK</button>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem;font-weight:700}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.5rem}.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#0009;display:flex;align-items:center;justify-content:center;z-index:1000}.modal-content{background:#fff;padding:25px 30px;border-radius:8px;width:360px;text-align:center;position:relative;box-shadow:0 4px 12px #0003}.close{position:absolute;top:10px;right:15px;cursor:pointer;font-size:20px;color:#555;transition:color .3s}.close:hover{color:#f44336}.btn-ok{margin-top:20px;padding:8px 20px;border:none;background-color:#00444c;color:#fff;border-radius:4px;cursor:pointer;font-size:14px;transition:background-color .3s,transform .2s}.btn-ok:hover{background-color:#00363d;transform:scale(1.05)}.btn-ok:active{transform:scale(.98)}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: CepMaskDirective, selector: "[cepMask]", inputs: ["cepMask"] }, { kind: "directive", type: CnpjMaskDirective, selector: "[cnpjMask]", inputs: ["cnpjMask"] }, { kind: "directive", type: CpfMaskDirective, selector: "[cpfMask]", inputs: ["cpfMask"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1668
+ ], usesOnChanges: true, ngImport: i0, template: "<div *ngIf=\"hasPermission()\" class=\"form-group\">\n <label [for]=\"id\" class=\"form-label\" style=\"margin-top: 1rem;\">{{ label }}</label>\n <ng-select\n [class.course-entry]=\"isCourseEntered\"\n class=\"ng-select custom-ng-select\"\n [items]=\"filteredItems | async\"\n [multiple]=\"multiple\"\n [closeOnSelect]=\"closeOnSelect\"\n [hideSelected]=\"true\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [(ngModel)]=\"selected\"\n [compareWith]=\"compareFn\"\n (change)=\"onSelectedChange($event)\"\n (keyup)=\"onKeyUp($event)\"\n (input)=\"onInputChange($event)\"\n [id]=\"id\"\n [placeholder]=\"selected && (multiple ? selected.length === 0 : !selected) ? placeholder : ''\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\">\n <ng-template ng-option-tmp let-item=\"item\">\n {{ item[bindLabel] }}\n </ng-template>\n </ng-select>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-select{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;font-weight:400;border:1px solid #ccc;border-radius:4px;appearance:none;-webkit-appearance:none;-moz-appearance:none;padding-right:2rem;background-image:none;background-repeat:no-repeat;background-position:right .5rem center;height:46px}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.2rem}.select-container{position:relative;display:inline-block;width:100%}.select-container lucide-icon{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);pointer-events:none;color:#5e6366}.ng-select{display:block;width:100%;font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem}.ng-select .ng-select-container{display:flex;align-items:center;border:1px solid #ccc;border-radius:4px;padding:.5rem;background-color:#fff;color:#333}.ng-select .ng-select-container .ng-value-container{display:flex;align-items:center;flex-grow:1}.ng-select .ng-select-container .ng-clear{display:none}.ng-select .ng-select-container .ng-input{flex-grow:1;border:none;outline:none}.custom-ng-select.ng-select .ng-select-container .ng-input>input{box-sizing:border-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:.5rem!important;cursor:default;width:100%}.ng-select .ng-dropdown-panel{border:1px solid #ccc;border-radius:4px;background-color:#fff;color:#333;box-shadow:0 2px 4px #0000001a}.ng-select .ng-dropdown-panel .ng-option{padding:8px;cursor:pointer}.ng-select .ng-dropdown-panel .ng-option:hover{background-color:#f1f1f1}.ng-select .ng-dropdown-panel .ng-option.selected{background-color:#007bff;color:#fff}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i5.NgSelectComponent, selector: "ng-select", inputs: ["bindLabel", "bindValue", "markFirst", "placeholder", "notFoundText", "typeToSearchText", "addTagText", "loadingText", "clearAllText", "appearance", "dropdownPosition", "appendTo", "loading", "closeOnSelect", "hideSelected", "selectOnTab", "openOnEnter", "maxSelectedItems", "groupBy", "groupValue", "bufferAmount", "virtualScroll", "selectableGroup", "selectableGroupAsModel", "searchFn", "trackByFn", "clearOnBackspace", "labelForId", "inputAttrs", "tabIndex", "readonly", "searchWhileComposing", "minTermLength", "editableSearchTerm", "keyDownFn", "typeahead", "multiple", "addTag", "searchable", "clearable", "isOpen", "items", "compareWith", "clearSearchOnAdd", "deselectOnClick"], outputs: ["blur", "focus", "change", "open", "close", "search", "clear", "add", "remove", "scroll", "scrollToEnd"] }, { kind: "directive", type: i5.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1599
1669
  }
1600
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputComponent, decorators: [{
1670
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, decorators: [{
1601
1671
  type: Component,
1602
- args: [{ selector: 'argenta-custom-input', providers: [
1672
+ args: [{ selector: 'argenta-custom-multi-select', providers: [
1603
1673
  {
1604
1674
  provide: NG_VALUE_ACCESSOR,
1605
- useExisting: forwardRef(() => InputComponent),
1675
+ useExisting: forwardRef(() => MultiSelectComponent),
1606
1676
  multi: true
1607
1677
  }
1608
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"hasPermission()\" class=\"form-group\">\n <label [for]=\"id\" [ngClass]=\"'label-styles'\">{{ label }}</label>\n <input [type]=\"getInputType()\"\n class=\"form-control custom-input\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"value\"\n (input)=\"onInput($event)\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"keyupEvent.emit($event)\"\n (keydown)=\"onKeyDown($event)\"\n (keypress)=\"keypressEvent.emit($event)\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [required]=\"required\"\n [attr.pattern]=\"pattern\"\n [autofocus]=\"autofocus\"\n [cpfMask]=\"useCpfMask\" \n [cnpjMask]=\"useCnpjMask\" \n [cepMask]=\"useCepMask\">\n\n <!-- Modal para exibir mensagens de erro -->\n <div class=\"modal-overlay\" *ngIf=\"showErrorModal\">\n <div class=\"modal-content\">\n <span class=\"close\" (click)=\"closeModal()\">&times;</span>\n <p>{{ errorMessage }}</p>\n <button class=\"btn-ok\" (click)=\"closeModal()\">OK</button>\n </div>\n </div>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem;font-weight:700}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.5rem}.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:#0009;display:flex;align-items:center;justify-content:center;z-index:1000}.modal-content{background:#fff;padding:25px 30px;border-radius:8px;width:360px;text-align:center;position:relative;box-shadow:0 4px 12px #0003}.close{position:absolute;top:10px;right:15px;cursor:pointer;font-size:20px;color:#555;transition:color .3s}.close:hover{color:#f44336}.btn-ok{margin-top:20px;padding:8px 20px;border:none;background-color:#00444c;color:#fff;border-radius:4px;cursor:pointer;font-size:14px;transition:background-color .3s,transform .2s}.btn-ok:hover{background-color:#00363d;transform:scale(1.05)}.btn-ok:active{transform:scale(.98)}\n"] }]
1609
- }], ctorParameters: function () { return [{ type: AuthService }]; }, propDecorators: { label: [{
1678
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"hasPermission()\" class=\"form-group\">\n <label [for]=\"id\" class=\"form-label\" style=\"margin-top: 1rem;\">{{ label }}</label>\n <ng-select\n [class.course-entry]=\"isCourseEntered\"\n class=\"ng-select custom-ng-select\"\n [items]=\"filteredItems | async\"\n [multiple]=\"multiple\"\n [closeOnSelect]=\"closeOnSelect\"\n [hideSelected]=\"true\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [(ngModel)]=\"selected\"\n [compareWith]=\"compareFn\"\n (change)=\"onSelectedChange($event)\"\n (keyup)=\"onKeyUp($event)\"\n (input)=\"onInputChange($event)\"\n [id]=\"id\"\n [placeholder]=\"selected && (multiple ? selected.length === 0 : !selected) ? placeholder : ''\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\">\n <ng-template ng-option-tmp let-item=\"item\">\n {{ item[bindLabel] }}\n </ng-template>\n </ng-select>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-select{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;font-weight:400;border:1px solid #ccc;border-radius:4px;appearance:none;-webkit-appearance:none;-moz-appearance:none;padding-right:2rem;background-image:none;background-repeat:no-repeat;background-position:right .5rem center;height:46px}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.2rem}.select-container{position:relative;display:inline-block;width:100%}.select-container lucide-icon{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);pointer-events:none;color:#5e6366}.ng-select{display:block;width:100%;font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem}.ng-select .ng-select-container{display:flex;align-items:center;border:1px solid #ccc;border-radius:4px;padding:.5rem;background-color:#fff;color:#333}.ng-select .ng-select-container .ng-value-container{display:flex;align-items:center;flex-grow:1}.ng-select .ng-select-container .ng-clear{display:none}.ng-select .ng-select-container .ng-input{flex-grow:1;border:none;outline:none}.custom-ng-select.ng-select .ng-select-container .ng-input>input{box-sizing:border-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:.5rem!important;cursor:default;width:100%}.ng-select .ng-dropdown-panel{border:1px solid #ccc;border-radius:4px;background-color:#fff;color:#333;box-shadow:0 2px 4px #0000001a}.ng-select .ng-dropdown-panel .ng-option{padding:8px;cursor:pointer}.ng-select .ng-dropdown-panel .ng-option:hover{background-color:#f1f1f1}.ng-select .ng-dropdown-panel .ng-option.selected{background-color:#007bff;color:#fff}\n"] }]
1679
+ }], ctorParameters: function () { return [{ type: AuthService }, { type: i2$1.HttpClient }]; }, propDecorators: { label: [{
1680
+ type: Input
1681
+ }], data: [{
1610
1682
  type: Input
1611
1683
  }], placeholder: [{
1612
1684
  type: Input
1685
+ }], selected: [{
1686
+ type: Input
1613
1687
  }], id: [{
1614
1688
  type: Input
1615
- }], type: [{
1689
+ }], bindLabel: [{
1616
1690
  type: Input
1617
- }], disabled: [{
1691
+ }], bindValue: [{
1618
1692
  type: Input
1619
- }], readonly: [{
1693
+ }], permissions: [{
1620
1694
  type: Input
1621
- }], maxlength: [{
1695
+ }], closeOnSelect: [{
1622
1696
  type: Input
1623
- }], minlength: [{
1697
+ }], searchUrl: [{
1624
1698
  type: Input
1625
- }], required: [{
1699
+ }], multiple: [{
1626
1700
  type: Input
1627
- }], pattern: [{
1701
+ }], searchParams: [{
1628
1702
  type: Input
1629
- }], autofocus: [{
1703
+ }], keyupEvent: [{
1704
+ type: Output
1705
+ }] } });
1706
+
1707
+ class MultiSelectCategoryComponent {
1708
+ constructor() {
1709
+ // Inputs para receber dados dinâmicos de diferentes categorias
1710
+ this.unidadesOrganizacionais = [];
1711
+ this.clientes = [];
1712
+ this.empresas = [];
1713
+ this.usuarios = [];
1714
+ // Inputs para permissões específicas de cada categoria
1715
+ this.permissoesUnidades = [];
1716
+ this.permissoesClientes = [];
1717
+ this.permissoesEmpresas = [];
1718
+ this.permissoesUsuarios = [];
1719
+ }
1720
+ ngOnInit() { }
1721
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectCategoryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1722
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: MultiSelectCategoryComponent, selector: "argenta-multi-select-category", inputs: { unidadesOrganizacionais: "unidadesOrganizacionais", clientes: "clientes", empresas: "empresas", usuarios: "usuarios", permissoesUnidades: "permissoesUnidades", permissoesClientes: "permissoesClientes", permissoesEmpresas: "permissoesEmpresas", permissoesUsuarios: "permissoesUsuarios" }, ngImport: i0, template: "<div class=\"multi-select-category\">\n <div class=\"row\">\n <!-- Primeira linha: Usu\u00E1rio e Cliente -->\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Usu\u00E1rios\"\n [data]=\"usuarios\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesUsuarios\"\n placeholder=\"Selecione Usu\u00E1rios\">\n </argenta-custom-multi-select>\n </div>\n\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Clientes\"\n [data]=\"clientes\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesClientes\"\n placeholder=\"Selecione Clientes\">\n </argenta-custom-multi-select>\n </div>\n </div>\n\n <div class=\"row\">\n <!-- Segunda linha: Empresa e Unidade Organizacional -->\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Empresas\"\n [data]=\"empresas\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesEmpresas\"\n placeholder=\"Selecione Empresas\">\n </argenta-custom-multi-select>\n </div>\n\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Unidades Organizacionais\"\n [data]=\"unidadesOrganizacionais\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesUnidades\"\n placeholder=\"Selecione Unidades Organizacionais\">\n </argenta-custom-multi-select>\n </div>\n </div>\n</div>\n", styles: [".multi-select-category{display:flex;flex-direction:column;gap:1rem}.multi-select-category .row{display:flex;gap:1rem}.multi-select-category .col{flex:1}\n"], dependencies: [{ kind: "component", type: MultiSelectComponent, selector: "argenta-custom-multi-select", inputs: ["label", "data", "placeholder", "selected", "id", "bindLabel", "bindValue", "permissions", "closeOnSelect", "searchUrl", "multiple", "searchParams"], outputs: ["keyupEvent"] }] }); }
1723
+ }
1724
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectCategoryComponent, decorators: [{
1725
+ type: Component,
1726
+ args: [{ selector: 'argenta-multi-select-category', template: "<div class=\"multi-select-category\">\n <div class=\"row\">\n <!-- Primeira linha: Usu\u00E1rio e Cliente -->\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Usu\u00E1rios\"\n [data]=\"usuarios\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesUsuarios\"\n placeholder=\"Selecione Usu\u00E1rios\">\n </argenta-custom-multi-select>\n </div>\n\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Clientes\"\n [data]=\"clientes\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesClientes\"\n placeholder=\"Selecione Clientes\">\n </argenta-custom-multi-select>\n </div>\n </div>\n\n <div class=\"row\">\n <!-- Segunda linha: Empresa e Unidade Organizacional -->\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Empresas\"\n [data]=\"empresas\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesEmpresas\"\n placeholder=\"Selecione Empresas\">\n </argenta-custom-multi-select>\n </div>\n\n <div class=\"col\">\n <argenta-custom-multi-select\n label=\"Unidades Organizacionais\"\n [data]=\"unidadesOrganizacionais\"\n bindLabel=\"nome\"\n bindValue=\"id\"\n [permissions]=\"permissoesUnidades\"\n placeholder=\"Selecione Unidades Organizacionais\">\n </argenta-custom-multi-select>\n </div>\n </div>\n</div>\n", styles: [".multi-select-category{display:flex;flex-direction:column;gap:1rem}.multi-select-category .row{display:flex;gap:1rem}.multi-select-category .col{flex:1}\n"] }]
1727
+ }], ctorParameters: function () { return []; }, propDecorators: { unidadesOrganizacionais: [{
1630
1728
  type: Input
1631
- }], useCpfMask: [{
1729
+ }], clientes: [{
1632
1730
  type: Input
1633
- }], useCnpjMask: [{
1731
+ }], empresas: [{
1634
1732
  type: Input
1635
- }], useCepMask: [{
1733
+ }], usuarios: [{
1636
1734
  type: Input
1637
- }], onlyNumbers: [{
1735
+ }], permissoesUnidades: [{
1638
1736
  type: Input
1639
- }], validateInput: [{
1737
+ }], permissoesClientes: [{
1640
1738
  type: Input
1641
- }], labelFontWeight: [{
1739
+ }], permissoesEmpresas: [{
1642
1740
  type: Input
1643
- }], permissions: [{
1741
+ }], permissoesUsuarios: [{
1644
1742
  type: Input
1645
- }], inputEvent: [{
1646
- type: Output
1647
- }], changeEvent: [{
1648
- type: Output
1649
- }], focusEvent: [{
1650
- type: Output
1651
- }], blurEvent: [{
1652
- type: Output
1653
- }], keyupEvent: [{
1654
- type: Output
1655
- }], keydownEvent: [{
1656
- type: Output
1657
- }], keypressEvent: [{
1658
- type: Output
1659
1743
  }] } });
1660
1744
 
1661
1745
  class RadioComponent {
@@ -1716,7 +1800,7 @@ class RadioComponent {
1716
1800
  [disabled]="disabled">
1717
1801
  <label class="form-check-label" [for]="id">{{ label }}</label>
1718
1802
  </div>
1719
- `, isInline: true, styles: [".form-check{font-family:Arial,sans-serif;font-size:1rem}.form-check-input{font-family:Arial,sans-serif;color:#333;font-size:1rem;margin-right:.5rem}.form-check-label{font-family:Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1803
+ `, isInline: true, styles: [".form-check{font-family:Arial,sans-serif;font-size:1rem}.form-check-input{font-family:Arial,sans-serif;color:#333;font-size:1rem;margin-right:.5rem}.form-check-label{font-family:Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1720
1804
  }
1721
1805
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: RadioComponent, decorators: [{
1722
1806
  type: Component,
@@ -1893,7 +1977,7 @@ class SearchInputComponent {
1893
1977
  useExisting: forwardRef(() => SearchInputComponent),
1894
1978
  multi: true
1895
1979
  }
1896
- ], ngImport: i0, template: "<div class=\"form-group\">\n <label [for]=\"id\" [ngStyle]=\"getLabelStyles()\">{{ label }}</label>\n <input [type]=\"type\"\n class=\"form-control custom-input\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"value\"\n (input)=\"onInput($event)\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"onKeyup($event)\"\n (keydown)=\"onKeydown($event)\"\n (keypress)=\"onKeypress($event)\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [required]=\"required\"\n [attr.pattern]=\"pattern\"\n [autofocus]=\"autofocus\">\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem;font-weight:700}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;width:227px;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}label{font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
1980
+ ], ngImport: i0, template: "<div class=\"form-group\">\n <label [for]=\"id\" [ngStyle]=\"getLabelStyles()\">{{ label }}</label>\n <input [type]=\"type\"\n class=\"form-control custom-input\"\n [id]=\"id\"\n [placeholder]=\"placeholder\"\n [(ngModel)]=\"value\"\n (input)=\"onInput($event)\"\n (change)=\"onChange($event)\"\n (focus)=\"onFocus($event)\"\n (blur)=\"onBlur($event)\"\n (keyup)=\"onKeyup($event)\"\n (keydown)=\"onKeydown($event)\"\n (keypress)=\"onKeypress($event)\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n [attr.maxlength]=\"maxlength\"\n [attr.minlength]=\"minlength\"\n [required]=\"required\"\n [attr.pattern]=\"pattern\"\n [autofocus]=\"autofocus\">\n</div>\n", styles: ["@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem;font-weight:700}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem;width:227px;height:46px}.custom-input::placeholder{font-size:14px;color:#d3d3d3}label{font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}\n"], dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
1897
1981
  }
1898
1982
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SearchInputComponent, decorators: [{
1899
1983
  type: Component,
@@ -2028,7 +2112,7 @@ class SelectComponent {
2028
2112
  <lucide-icon name="chevron-down" [size]="16" color="#5E6366" [strokeWidth]="1.75"></lucide-icon>
2029
2113
  </div>
2030
2114
  </div>
2031
- `, isInline: true, styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem;font-weight:700}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-select{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:400;border:1px solid #ccc;border-radius:4px;padding:.5rem 2rem .5rem .5rem;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:none;background-repeat:no-repeat;background-position:right .5rem center}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:400;border:1px solid #ccc;border-radius:4px;padding:.5rem}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.5rem}.select-container{position:relative;display:inline-block;width:100%}.select-container lucide-icon{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);pointer-events:none;color:#5e6366}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "component", type: i1$1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2115
+ `, isInline: true, styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.form-group{font-family:Inter,Arial,sans-serif;font-size:1rem;font-weight:700}.form-check-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left}.custom-select{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:400;border:1px solid #ccc;border-radius:4px;padding:.5rem 2rem .5rem .5rem;appearance:none;-webkit-appearance:none;-moz-appearance:none;background-image:none;background-repeat:no-repeat;background-position:right .5rem center}.custom-input{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:400;border:1px solid #ccc;border-radius:4px;padding:.5rem}.form-label{font-family:Inter,Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}.label-styles{font-weight:400;font-family:Inter,Arial,sans-serif;font-size:16px;line-height:19.36px;text-align:left;margin-top:1rem;margin-bottom:.5rem}.select-container{position:relative;display:inline-block;width:100%}.select-container lucide-icon{position:absolute;right:.75rem;top:50%;transform:translateY(-50%);pointer-events:none;color:#5e6366}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "component", type: i1$1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2032
2116
  }
2033
2117
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: SelectComponent, decorators: [{
2034
2118
  type: Component,
@@ -2113,7 +2197,7 @@ class TabComponent {
2113
2197
  }
2114
2198
  }
2115
2199
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Component }); }
2116
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TabComponent, selector: "argenta-tab", inputs: { tabs: "tabs", activeTabIndex: "activeTabIndex", componentPermissions: "componentPermissions" }, outputs: { tabChanged: "tabChanged" }, ngImport: i0, template: "<ng-container *ngIf=\"hasComponentPermission()\">\n <ul class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let tab of tabs; let i = index\">\n <li class=\"nav-item\" *ngIf=\"hasPermission(tab.permissions)\">\n <a\n class=\"nav-link\"\n [class.active]=\"i === activeTabIndex\"\n (click)=\"selectTab(i, $event)\"\n href=\"#\"\n >{{ tab.label }}</a\n >\n </li>\n </ng-container>\n </ul>\n <div class=\"tab-content\">\n <div\n *ngFor=\"let tab of tabs; let i = index\"\n class=\"tab-pane fade\"\n [ngClass]=\"{ 'show active': i === activeTabIndex }\"\n >\n <ng-container *ngTemplateOutlet=\"tab.content\"></ng-container>\n </div>\n </div>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.nav-tabs .nav-item .nav-link{cursor:pointer;font-family:Inter,Arial,sans-serif;border-top-left-radius:.3rem;border-top-right-radius:.3rem;font-size:14px;color:#00444c;border:1px solid #ddd;transition:background-color .3s ease,color .3s ease}.nav-tabs .nav-item .nav-link.active{background-color:#00444c;color:#fff;border-color:transparent}.nav-tabs .nav-item .nav-link:hover{background-color:#2ca58d;color:#fff}.tab-content .tab-pane{padding:1rem;border:1px solid #ddd;border-top:none}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2200
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TabComponent, selector: "argenta-tab", inputs: { tabs: "tabs", activeTabIndex: "activeTabIndex", componentPermissions: "componentPermissions" }, outputs: { tabChanged: "tabChanged" }, ngImport: i0, template: "<ng-container *ngIf=\"hasComponentPermission()\">\n <ul class=\"nav nav-tabs\">\n <ng-container *ngFor=\"let tab of tabs; let i = index\">\n <li class=\"nav-item\" *ngIf=\"hasPermission(tab.permissions)\">\n <a\n class=\"nav-link\"\n [class.active]=\"i === activeTabIndex\"\n (click)=\"selectTab(i, $event)\"\n href=\"#\"\n >{{ tab.label }}</a\n >\n </li>\n </ng-container>\n </ul>\n <div class=\"tab-content\">\n <div\n *ngFor=\"let tab of tabs; let i = index\"\n class=\"tab-pane fade\"\n [ngClass]=\"{ 'show active': i === activeTabIndex }\"\n >\n <ng-container *ngTemplateOutlet=\"tab.content\"></ng-container>\n </div>\n </div>\n</ng-container>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.nav-tabs .nav-item .nav-link{cursor:pointer;font-family:Inter,Arial,sans-serif;border-top-left-radius:.3rem;border-top-right-radius:.3rem;font-size:14px;color:#00444c;border:1px solid #ddd;transition:background-color .3s ease,color .3s ease}.nav-tabs .nav-item .nav-link.active{background-color:#00444c;color:#fff;border-color:transparent}.nav-tabs .nav-item .nav-link:hover{background-color:#2ca58d;color:#fff}.tab-content .tab-pane{padding:1rem;border:1px solid #ddd;border-top:none}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2117
2201
  }
2118
2202
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TabComponent, decorators: [{
2119
2203
  type: Component,
@@ -2170,7 +2254,7 @@ class DataTableComponent {
2170
2254
  this.pageText = 'Page';
2171
2255
  this.ofText = 'of';
2172
2256
  this.filterDescription = '';
2173
- this.buttonLabel = 'Novo perfil'; // Adicionando o Input para o label do botão
2257
+ this.buttonLabel = ''; // Adicionando o Input para o label do botão
2174
2258
  this.sortChange = new EventEmitter();
2175
2259
  this.pageChange = new EventEmitter();
2176
2260
  this.itemsPerPageChange = new EventEmitter();
@@ -2307,11 +2391,11 @@ class DataTableComponent {
2307
2391
  this.onButtonClick.emit(); // Emitindo o evento
2308
2392
  }
2309
2393
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataTableComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: AuthService }, { token: RefreshService }], target: i0.ɵɵFactoryTarget.Component }); }
2310
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DataTableComponent, selector: "argenta-list-data-table", inputs: { columns: "columns", hiddenColumns: "hiddenColumns", defaultItemsPerPage: "defaultItemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", showActionColumn: "showActionColumn", actionColumnLabel: "actionColumnLabel", totalItems: "totalItems", fetchDataFunction: "fetchDataFunction", editPermissions: "editPermissions", deletePermissions: "deletePermissions", viewPermissions: "viewPermissions", showPageInfo: "showPageInfo", pageText: "pageText", ofText: "ofText", filterDescription: "filterDescription", buttonLabel: "buttonLabel" }, outputs: { sortChange: "sortChange", pageChange: "pageChange", itemsPerPageChange: "itemsPerPageChange", onEditTable: "onEditTable", onDeleteTable: "onDeleteTable", onViewTable: "onViewTable", onButtonClick: "onButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"data-table-header\" style=\"margin-top: 2.5rem;\">\n <div class=\"left-section\">\n <div class=\"form-group\">\n <label for=\"itemsPerPageSelect\" class=\"items-per-page-label\">{{ itemsPerPageLabel }}</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto custom-select\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange()\">\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">{{ option }}</option>\n </select>\n </div>\n </div>\n <div class=\"right-section\">\n <button class=\"custom-button\" (click)=\"onNewButtonClick()\">\n <lucide-icon name=\"plus\" [size]=\"28\" [strokeWidth]=\"1.75\"></lucide-icon>\n {{ buttonLabel }}\n </button>\n </div>\n</div>\n\n<div class=\"search-input-container\">\n <argenta-search-input id=\"search\" label=\"\" placeholder=\"Buscar\" [(ngModel)]=\"filterDescription\" (search)=\"onSearch($event)\"></argenta-search-input>\n</div>\n\n<div class=\"table-responsive\" style=\"margin-top: 1rem;\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let column of columns\">\n <th *ngIf=\"!isColumnHidden(column.prop)\" (click)=\"onSort(column.prop)\">\n {{ column.label }}\n </th>\n </ng-container>\n <th *ngIf=\"showActionColumn\" class=\"text-end\" style=\"padding-right: 6.3rem;\">{{ actionColumnLabel }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of pagedData; let i = index\">\n <ng-container *ngFor=\"let column of columns\">\n <td *ngIf=\"!isColumnHidden(column.prop)\">\n {{ getNestedProperty(item, column.prop) }}\n </td>\n </ng-container>\n <td *ngIf=\"showActionColumn\" class=\"text-end\">\n <div class=\"d-flex justify-content-end\">\n <div *ngIf=\"hasPermission(editPermissions) && onEditTable.observers.length > 0\" (click)=\"handleAction('edit', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <lucide-icon name=\"square-pen\" [size]=\"20\" color=\"#2CA58D\" [strokeWidth]=\"1.75\"></lucide-icon>\n </div>\n <div *ngIf=\"hasPermission(viewPermissions) && onViewTable.observers.length > 0\" (click)=\"handleAction('view', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <lucide-icon name=\"user-round\" [size]=\"20\" color=\"#2CA58D\" [strokeWidth]=\"1.75\"></lucide-icon>\n </div>\n <div *ngIf=\"hasPermission(deletePermissions) && onDeleteTable.observers.length > 0\" (click)=\"handleAction('delete', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <i-lucide name=\"trash-2\" [size]=\"20\" color=\"#F26E6E\" [strokeWidth]=\"1.75\"></i-lucide>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center pagination-controls\">\n <custom-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"defaultItemsPerPage\"\n [currentPage]=\"currentPage\"\n [showPageInfo]=\"showPageInfo\"\n (pageChange)=\"onPageChange($event)\">\n </custom-pagination>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.clickable-icon{cursor:pointer}:host{font-family:Inter,Arial,sans-serif}.data-table-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:-.2rem}.left-section,.right-section{display:flex;align-items:center}.search-input-container{display:flex;justify-content:flex-start}.left-section .form-group{display:flex;align-items:center}.items-per-page-label{font-family:Inter,Arial,sans-serif;font-size:14px;color:#666;margin-right:.2rem}.custom-select{font-family:Inter,Arial,sans-serif;font-size:14px;color:#666;background:#fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 5\"><path fill=\"#666\" d=\"M2 0L0 2h4L2 0zM2 5l2-2H0l2 2z\"/></svg>') no-repeat right .75rem center/8px 10px;border:1px solid #ccc;border-radius:.25rem;padding:.375rem 1.75rem .375rem .75rem;appearance:none;-webkit-appearance:none;-moz-appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem #007bff40}.table{font-family:Inter,Arial,sans-serif;font-size:var(--table-font-size, 14px);color:var(--table-font-color, #737B7B);border-collapse:separate;border-spacing:0;border-radius:8px;overflow:hidden}.table thead tr{height:60px}.table thead th{background-color:#00444c;color:#fff;font-family:Inter,Arial,sans-serif;font-size:13px;font-weight:600;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center;line-height:2.5}.table thead th:first-child{text-align:left;padding-left:1.4rem}.table tbody td{font-family:Inter,Arial,sans-serif;font-size:14px;color:#737b7b;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center}.table tbody td:first-child{text-align:left;padding-left:1.4rem}.table tbody tr:last-child td{border-bottom:.1rem solid #dcdcdc}.table tbody td{border-right:none;border-left:none}.table thead th:first-child{border-top-left-radius:0}.table thead th:last-child{border-top-right-radius:0}.table tbody tr:last-child td:first-child{border-bottom-left-radius:0}.table tbody tr:last-child td:last-child{border-bottom-right-radius:0}.btn-icon{width:24px;height:24px;background-size:cover;display:inline-block;cursor:pointer;margin-right:16px}.pagination-controls{display:flex;justify-content:center;align-items:center;margin-top:1rem}.custom-button{display:flex;align-items:center;padding:.5rem 1rem .5rem .5rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:Inter,sans-serif;font-size:16px;font-weight:600;height:40px;letter-spacing:.005em;text-align:left;color:#fff;background-color:#2ca58d;border:none;cursor:pointer}.custom-button lucide-icon{margin-right:.5rem}.custom-button:hover{background-color:#217d6b}.custom-button:active{background-color:#3acaae}.custom-button:focus{outline:none;box-shadow:0 0 0 .2rem #2ca58d40}\n"], dependencies: [{ kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }, { kind: "component", type: CustomPaginationComponent, selector: "custom-pagination", inputs: ["totalItems", "itemsPerPage", "currentPage", "showPageInfo"], outputs: ["pageChange"] }, { kind: "component", type: SearchInputComponent, selector: "argenta-search-input", inputs: ["id", "label", "type", "placeholder", "value", "disabled", "readonly", "autofocus", "maxlength", "minlength", "required", "pattern", "debounceTime"], outputs: ["search", "inputChange", "change", "focus", "blur", "keyup", "keydown", "keypress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2394
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DataTableComponent, selector: "argenta-list-data-table", inputs: { columns: "columns", hiddenColumns: "hiddenColumns", defaultItemsPerPage: "defaultItemsPerPage", itemsPerPageLabel: "itemsPerPageLabel", showActionColumn: "showActionColumn", actionColumnLabel: "actionColumnLabel", totalItems: "totalItems", fetchDataFunction: "fetchDataFunction", editPermissions: "editPermissions", deletePermissions: "deletePermissions", viewPermissions: "viewPermissions", showPageInfo: "showPageInfo", pageText: "pageText", ofText: "ofText", filterDescription: "filterDescription", buttonLabel: "buttonLabel" }, outputs: { sortChange: "sortChange", pageChange: "pageChange", itemsPerPageChange: "itemsPerPageChange", onEditTable: "onEditTable", onDeleteTable: "onDeleteTable", onViewTable: "onViewTable", onButtonClick: "onButtonClick" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"data-table-header\" style=\"margin-top: 2.5rem;\">\n <div class=\"left-section\">\n <div class=\"form-group\">\n <label for=\"itemsPerPageSelect\" class=\"items-per-page-label\">{{ itemsPerPageLabel }}</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto custom-select\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange()\">\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">{{ option }}</option>\n </select>\n </div>\n </div>\n <div *ngIf=\"buttonLabel && buttonLabel.length > 0\" class=\"right-section\">\n <button class=\"custom-button\" (click)=\"onNewButtonClick()\">\n <lucide-icon name=\"plus\" [size]=\"28\" [strokeWidth]=\"1.75\"></lucide-icon>\n {{ buttonLabel }}\n </button>\n </div>\n</div>\n\n<div class=\"search-input-container\">\n <argenta-search-input id=\"search\" label=\"\" placeholder=\"Buscar\" [(ngModel)]=\"filterDescription\" (search)=\"onSearch($event)\"></argenta-search-input>\n</div>\n\n<div class=\"table-responsive\" style=\"margin-top: 1rem;\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let column of columns\">\n <th *ngIf=\"!isColumnHidden(column.prop)\" (click)=\"onSort(column.prop)\">\n {{ column.label }}\n </th>\n </ng-container>\n <th *ngIf=\"showActionColumn\" class=\"text-end\" style=\"padding-right: 6.3rem;\">{{ actionColumnLabel }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of pagedData; let i = index\">\n <ng-container *ngFor=\"let column of columns\">\n <td *ngIf=\"!isColumnHidden(column.prop)\">\n {{ getNestedProperty(item, column.prop) }}\n </td>\n </ng-container>\n <td *ngIf=\"showActionColumn\" class=\"text-end\">\n <div class=\"d-flex justify-content-end\">\n <div *ngIf=\"hasPermission(editPermissions) && onEditTable.observers.length > 0\" (click)=\"handleAction('edit', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <lucide-icon name=\"square-pen\" [size]=\"20\" color=\"#2CA58D\" [strokeWidth]=\"1.75\"></lucide-icon>\n </div>\n <div *ngIf=\"hasPermission(viewPermissions) && onViewTable.observers.length > 0\" (click)=\"handleAction('view', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <lucide-icon name=\"user-round\" [size]=\"20\" color=\"#2CA58D\" [strokeWidth]=\"1.75\"></lucide-icon>\n </div>\n <div *ngIf=\"hasPermission(deletePermissions) && onDeleteTable.observers.length > 0\" (click)=\"handleAction('delete', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <i-lucide name=\"trash-2\" [size]=\"20\" color=\"#F26E6E\" [strokeWidth]=\"1.75\"></i-lucide>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center pagination-controls\">\n <custom-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"defaultItemsPerPage\"\n [currentPage]=\"currentPage\"\n [showPageInfo]=\"showPageInfo\"\n (pageChange)=\"onPageChange($event)\">\n </custom-pagination>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.clickable-icon{cursor:pointer}:host{font-family:Inter,Arial,sans-serif}.data-table-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:-.2rem}.left-section,.right-section{display:flex;align-items:center}.search-input-container{display:flex;justify-content:flex-start}.left-section .form-group{display:flex;align-items:center}.items-per-page-label{font-family:Inter,Arial,sans-serif;font-size:14px;color:#666;margin-right:.2rem}.custom-select{font-family:Inter,Arial,sans-serif;font-size:14px;color:#666;background:#fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 5\"><path fill=\"#666\" d=\"M2 0L0 2h4L2 0zM2 5l2-2H0l2 2z\"/></svg>') no-repeat right .75rem center/8px 10px;border:1px solid #ccc;border-radius:.25rem;padding:.375rem 1.75rem .375rem .75rem;appearance:none;-webkit-appearance:none;-moz-appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem #007bff40}.table{font-family:Inter,Arial,sans-serif;font-size:var(--table-font-size, 14px);color:var(--table-font-color, #737B7B);border-collapse:separate;border-spacing:0;border-radius:8px;overflow:hidden}.table thead tr{height:60px}.table thead th{background-color:#00444c;color:#fff;font-family:Inter,Arial,sans-serif;font-size:13px;font-weight:600;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center;line-height:2.5}.table thead th:first-child{text-align:left;padding-left:1.4rem}.table tbody td{font-family:Inter,Arial,sans-serif;font-size:14px;color:#737b7b;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center}.table tbody td:first-child{text-align:left;padding-left:1.4rem}.table tbody tr:last-child td{border-bottom:.1rem solid #dcdcdc}.table tbody td{border-right:none;border-left:none}.table thead th:first-child{border-top-left-radius:0}.table thead th:last-child{border-top-right-radius:0}.table tbody tr:last-child td:first-child{border-bottom-left-radius:0}.table tbody tr:last-child td:last-child{border-bottom-right-radius:0}.btn-icon{width:24px;height:24px;background-size:cover;display:inline-block;cursor:pointer;margin-right:16px}.pagination-controls{display:flex;justify-content:center;align-items:center;margin-top:1rem}.custom-button{display:flex;align-items:center;padding:.5rem 1rem .5rem .5rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:Inter,sans-serif;font-size:16px;font-weight:600;height:40px;letter-spacing:.005em;text-align:left;color:#fff;background-color:#2ca58d;border:none;cursor:pointer}.custom-button lucide-icon{margin-right:.5rem}.custom-button:hover{background-color:#217d6b}.custom-button:active{background-color:#3acaae}.custom-button:focus{outline:none;box-shadow:0 0 0 .2rem #2ca58d40}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i4.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i1$1.LucideAngularComponent, selector: "lucide-angular, lucide-icon, i-lucide, span-lucide", inputs: ["class", "name", "img", "color", "absoluteStrokeWidth", "size", "strokeWidth"] }, { kind: "component", type: CustomPaginationComponent, selector: "custom-pagination", inputs: ["totalItems", "itemsPerPage", "currentPage", "showPageInfo"], outputs: ["pageChange"] }, { kind: "component", type: SearchInputComponent, selector: "argenta-search-input", inputs: ["id", "label", "type", "placeholder", "value", "disabled", "readonly", "autofocus", "maxlength", "minlength", "required", "pattern", "debounceTime"], outputs: ["search", "inputChange", "change", "focus", "blur", "keyup", "keydown", "keypress"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2311
2395
  }
2312
2396
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataTableComponent, decorators: [{
2313
2397
  type: Component,
2314
- args: [{ selector: 'argenta-list-data-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"data-table-header\" style=\"margin-top: 2.5rem;\">\n <div class=\"left-section\">\n <div class=\"form-group\">\n <label for=\"itemsPerPageSelect\" class=\"items-per-page-label\">{{ itemsPerPageLabel }}</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto custom-select\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange()\">\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">{{ option }}</option>\n </select>\n </div>\n </div>\n <div class=\"right-section\">\n <button class=\"custom-button\" (click)=\"onNewButtonClick()\">\n <lucide-icon name=\"plus\" [size]=\"28\" [strokeWidth]=\"1.75\"></lucide-icon>\n {{ buttonLabel }}\n </button>\n </div>\n</div>\n\n<div class=\"search-input-container\">\n <argenta-search-input id=\"search\" label=\"\" placeholder=\"Buscar\" [(ngModel)]=\"filterDescription\" (search)=\"onSearch($event)\"></argenta-search-input>\n</div>\n\n<div class=\"table-responsive\" style=\"margin-top: 1rem;\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let column of columns\">\n <th *ngIf=\"!isColumnHidden(column.prop)\" (click)=\"onSort(column.prop)\">\n {{ column.label }}\n </th>\n </ng-container>\n <th *ngIf=\"showActionColumn\" class=\"text-end\" style=\"padding-right: 6.3rem;\">{{ actionColumnLabel }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of pagedData; let i = index\">\n <ng-container *ngFor=\"let column of columns\">\n <td *ngIf=\"!isColumnHidden(column.prop)\">\n {{ getNestedProperty(item, column.prop) }}\n </td>\n </ng-container>\n <td *ngIf=\"showActionColumn\" class=\"text-end\">\n <div class=\"d-flex justify-content-end\">\n <div *ngIf=\"hasPermission(editPermissions) && onEditTable.observers.length > 0\" (click)=\"handleAction('edit', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <lucide-icon name=\"square-pen\" [size]=\"20\" color=\"#2CA58D\" [strokeWidth]=\"1.75\"></lucide-icon>\n </div>\n <div *ngIf=\"hasPermission(viewPermissions) && onViewTable.observers.length > 0\" (click)=\"handleAction('view', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <lucide-icon name=\"user-round\" [size]=\"20\" color=\"#2CA58D\" [strokeWidth]=\"1.75\"></lucide-icon>\n </div>\n <div *ngIf=\"hasPermission(deletePermissions) && onDeleteTable.observers.length > 0\" (click)=\"handleAction('delete', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <i-lucide name=\"trash-2\" [size]=\"20\" color=\"#F26E6E\" [strokeWidth]=\"1.75\"></i-lucide>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center pagination-controls\">\n <custom-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"defaultItemsPerPage\"\n [currentPage]=\"currentPage\"\n [showPageInfo]=\"showPageInfo\"\n (pageChange)=\"onPageChange($event)\">\n </custom-pagination>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.clickable-icon{cursor:pointer}:host{font-family:Inter,Arial,sans-serif}.data-table-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:-.2rem}.left-section,.right-section{display:flex;align-items:center}.search-input-container{display:flex;justify-content:flex-start}.left-section .form-group{display:flex;align-items:center}.items-per-page-label{font-family:Inter,Arial,sans-serif;font-size:14px;color:#666;margin-right:.2rem}.custom-select{font-family:Inter,Arial,sans-serif;font-size:14px;color:#666;background:#fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 5\"><path fill=\"#666\" d=\"M2 0L0 2h4L2 0zM2 5l2-2H0l2 2z\"/></svg>') no-repeat right .75rem center/8px 10px;border:1px solid #ccc;border-radius:.25rem;padding:.375rem 1.75rem .375rem .75rem;appearance:none;-webkit-appearance:none;-moz-appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem #007bff40}.table{font-family:Inter,Arial,sans-serif;font-size:var(--table-font-size, 14px);color:var(--table-font-color, #737B7B);border-collapse:separate;border-spacing:0;border-radius:8px;overflow:hidden}.table thead tr{height:60px}.table thead th{background-color:#00444c;color:#fff;font-family:Inter,Arial,sans-serif;font-size:13px;font-weight:600;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center;line-height:2.5}.table thead th:first-child{text-align:left;padding-left:1.4rem}.table tbody td{font-family:Inter,Arial,sans-serif;font-size:14px;color:#737b7b;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center}.table tbody td:first-child{text-align:left;padding-left:1.4rem}.table tbody tr:last-child td{border-bottom:.1rem solid #dcdcdc}.table tbody td{border-right:none;border-left:none}.table thead th:first-child{border-top-left-radius:0}.table thead th:last-child{border-top-right-radius:0}.table tbody tr:last-child td:first-child{border-bottom-left-radius:0}.table tbody tr:last-child td:last-child{border-bottom-right-radius:0}.btn-icon{width:24px;height:24px;background-size:cover;display:inline-block;cursor:pointer;margin-right:16px}.pagination-controls{display:flex;justify-content:center;align-items:center;margin-top:1rem}.custom-button{display:flex;align-items:center;padding:.5rem 1rem .5rem .5rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:Inter,sans-serif;font-size:16px;font-weight:600;height:40px;letter-spacing:.005em;text-align:left;color:#fff;background-color:#2ca58d;border:none;cursor:pointer}.custom-button lucide-icon{margin-right:.5rem}.custom-button:hover{background-color:#217d6b}.custom-button:active{background-color:#3acaae}.custom-button:focus{outline:none;box-shadow:0 0 0 .2rem #2ca58d40}\n"] }]
2398
+ args: [{ selector: 'argenta-list-data-table', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"data-table-header\" style=\"margin-top: 2.5rem;\">\n <div class=\"left-section\">\n <div class=\"form-group\">\n <label for=\"itemsPerPageSelect\" class=\"items-per-page-label\">{{ itemsPerPageLabel }}</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto custom-select\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange()\">\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">{{ option }}</option>\n </select>\n </div>\n </div>\n <div *ngIf=\"buttonLabel && buttonLabel.length > 0\" class=\"right-section\">\n <button class=\"custom-button\" (click)=\"onNewButtonClick()\">\n <lucide-icon name=\"plus\" [size]=\"28\" [strokeWidth]=\"1.75\"></lucide-icon>\n {{ buttonLabel }}\n </button>\n </div>\n</div>\n\n<div class=\"search-input-container\">\n <argenta-search-input id=\"search\" label=\"\" placeholder=\"Buscar\" [(ngModel)]=\"filterDescription\" (search)=\"onSearch($event)\"></argenta-search-input>\n</div>\n\n<div class=\"table-responsive\" style=\"margin-top: 1rem;\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <ng-container *ngFor=\"let column of columns\">\n <th *ngIf=\"!isColumnHidden(column.prop)\" (click)=\"onSort(column.prop)\">\n {{ column.label }}\n </th>\n </ng-container>\n <th *ngIf=\"showActionColumn\" class=\"text-end\" style=\"padding-right: 6.3rem;\">{{ actionColumnLabel }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of pagedData; let i = index\">\n <ng-container *ngFor=\"let column of columns\">\n <td *ngIf=\"!isColumnHidden(column.prop)\">\n {{ getNestedProperty(item, column.prop) }}\n </td>\n </ng-container>\n <td *ngIf=\"showActionColumn\" class=\"text-end\">\n <div class=\"d-flex justify-content-end\">\n <div *ngIf=\"hasPermission(editPermissions) && onEditTable.observers.length > 0\" (click)=\"handleAction('edit', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <lucide-icon name=\"square-pen\" [size]=\"20\" color=\"#2CA58D\" [strokeWidth]=\"1.75\"></lucide-icon>\n </div>\n <div *ngIf=\"hasPermission(viewPermissions) && onViewTable.observers.length > 0\" (click)=\"handleAction('view', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <lucide-icon name=\"user-round\" [size]=\"20\" color=\"#2CA58D\" [strokeWidth]=\"1.75\"></lucide-icon>\n </div>\n <div *ngIf=\"hasPermission(deletePermissions) && onDeleteTable.observers.length > 0\" (click)=\"handleAction('delete', item, i)\" class=\"clickable-icon\" style=\"margin-right: 1.5rem;\">\n <i-lucide name=\"trash-2\" [size]=\"20\" color=\"#F26E6E\" [strokeWidth]=\"1.75\"></i-lucide>\n </div>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center pagination-controls\">\n <custom-pagination\n [totalItems]=\"totalItems\"\n [itemsPerPage]=\"defaultItemsPerPage\"\n [currentPage]=\"currentPage\"\n [showPageInfo]=\"showPageInfo\"\n (pageChange)=\"onPageChange($event)\">\n </custom-pagination>\n</div>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap\";body{font-family:Inter,sans-serif}.clickable-icon{cursor:pointer}:host{font-family:Inter,Arial,sans-serif}.data-table-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:-.2rem}.left-section,.right-section{display:flex;align-items:center}.search-input-container{display:flex;justify-content:flex-start}.left-section .form-group{display:flex;align-items:center}.items-per-page-label{font-family:Inter,Arial,sans-serif;font-size:14px;color:#666;margin-right:.2rem}.custom-select{font-family:Inter,Arial,sans-serif;font-size:14px;color:#666;background:#fff url('data:image/svg+xml;charset=US-ASCII,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 4 5\"><path fill=\"#666\" d=\"M2 0L0 2h4L2 0zM2 5l2-2H0l2 2z\"/></svg>') no-repeat right .75rem center/8px 10px;border:1px solid #ccc;border-radius:.25rem;padding:.375rem 1.75rem .375rem .75rem;appearance:none;-webkit-appearance:none;-moz-appearance:none}.custom-select:focus{border-color:#80bdff;outline:0;box-shadow:0 0 0 .2rem #007bff40}.table{font-family:Inter,Arial,sans-serif;font-size:var(--table-font-size, 14px);color:var(--table-font-color, #737B7B);border-collapse:separate;border-spacing:0;border-radius:8px;overflow:hidden}.table thead tr{height:60px}.table thead th{background-color:#00444c;color:#fff;font-family:Inter,Arial,sans-serif;font-size:13px;font-weight:600;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center;line-height:2.5}.table thead th:first-child{text-align:left;padding-left:1.4rem}.table tbody td{font-family:Inter,Arial,sans-serif;font-size:14px;color:#737b7b;padding:10px;border-bottom:.1rem solid #dcdcdc;text-align:center}.table tbody td:first-child{text-align:left;padding-left:1.4rem}.table tbody tr:last-child td{border-bottom:.1rem solid #dcdcdc}.table tbody td{border-right:none;border-left:none}.table thead th:first-child{border-top-left-radius:0}.table thead th:last-child{border-top-right-radius:0}.table tbody tr:last-child td:first-child{border-bottom-left-radius:0}.table tbody tr:last-child td:last-child{border-bottom-right-radius:0}.btn-icon{width:24px;height:24px;background-size:cover;display:inline-block;cursor:pointer;margin-right:16px}.pagination-controls{display:flex;justify-content:center;align-items:center;margin-top:1rem}.custom-button{display:flex;align-items:center;padding:.5rem 1rem .5rem .5rem;border-radius:.25rem;transition:background-color .3s,border-color .3s,filter .3s;font-family:Inter,sans-serif;font-size:16px;font-weight:600;height:40px;letter-spacing:.005em;text-align:left;color:#fff;background-color:#2ca58d;border:none;cursor:pointer}.custom-button lucide-icon{margin-right:.5rem}.custom-button:hover{background-color:#217d6b}.custom-button:active{background-color:#3acaae}.custom-button:focus{outline:none;box-shadow:0 0 0 .2rem #2ca58d40}\n"] }]
2315
2399
  }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: AuthService }, { type: RefreshService }]; }, propDecorators: { columns: [{
2316
2400
  type: Input
2317
2401
  }], hiddenColumns: [{
@@ -2458,7 +2542,7 @@ class TextareaComponent {
2458
2542
  [readonly]="readonly"
2459
2543
  [autofocus]="autofocus"></textarea>
2460
2544
  </div>
2461
- `, isInline: true, styles: [".form-group{margin-bottom:1rem}.form-label{font-family:Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i2$1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2545
+ `, isInline: true, styles: [".form-group{margin-bottom:1rem}.form-label{font-family:Arial,sans-serif;color:#333;font-size:1rem;font-weight:700}\n"], dependencies: [{ kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2462
2546
  }
2463
2547
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TextareaComponent, decorators: [{
2464
2548
  type: Component,
@@ -2588,7 +2672,7 @@ class TreeNodeComponent {
2588
2672
  node.collapsed = !node.collapsed;
2589
2673
  }
2590
2674
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeNodeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2591
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TreeNodeComponent, selector: "argenta-custom-tree-node", inputs: { title: "title", nodes: "nodes", isRoot: "isRoot" }, outputs: { nodeSelected: "nodeSelected" }, ngImport: i0, template: "<div *ngIf=\"isRoot\" class=\"tree-title\">{{ title || 'Tree Node' }}</div>\n<ul class=\"tree\">\n <li *ngFor=\"let node of nodes\">\n <div class=\"node-content\">\n <!-- Exibir a seta apenas se o n\u00F3 tiver filhos n\u00E3o vazios -->\n <span *ngIf=\"node.children && node.children.length > 0\" class=\"toggle-icon\" (click)=\"toggleCollapse(node)\"\n [ngClass]=\"{'collapsed-icon': node.collapsed, 'expanded-icon': !node.collapsed}\">\n {{ node.collapsed ? '\u25B6' : '\u25BC' }}\n </span>\n <!-- Exibir a bolinha cinza se o n\u00F3 n\u00E3o tiver filhos -->\n <span *ngIf=\"!node.children || node.children.length === 0\" class=\"dot\"></span>\n <label class=\"custom-checkbox\">\n <input type=\"checkbox\" [checked]=\"node.selected\" (change)=\"onNodeSelected(node, $event)\" />\n <span class=\"checkmark\"></span>\n </label>\n <label class=\"node-label\">{{ node.name }}</label>\n </div>\n <!-- Renderizar recursivamente apenas se o n\u00F3 tiver filhos n\u00E3o vazios e n\u00E3o estiver colapsado -->\n <argenta-custom-tree-node *ngIf=\"node.children && node.children.length > 0 && !node.collapsed\" [nodes]=\"node.children\" [isRoot]=\"false\" (nodeSelected)=\"onChildNodeSelected(node)\"></argenta-custom-tree-node>\n </li>\n</ul>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\";.tree{list-style-type:none;margin:0;padding:0;position:relative;font-family:Inter,sans-serif}.tree li{margin:0;padding:0 0 0 2em;line-height:2em;position:relative;font-size:14px;transition:all .3s ease}.tree li:before{content:\"\";position:absolute;top:0;left:0;border-left:1px solid #ccc;bottom:.75em;transition:border-color .3s ease}.tree li:after{content:\"\";position:absolute;top:1em;left:0;border-top:1px solid #ccc;width:1em;transition:border-color .3s ease}.tree li:last-child:before{height:1em}.node-content{display:flex;align-items:center;color:#333;transition:color .3s ease}.node-content:hover .node-label{color:#00444c;box-shadow:0 4px 8px #0000001a}.toggle-icon{cursor:pointer;margin-right:.5em;font-size:1em;transition:transform .3s ease,color .3s ease}.collapsed-icon{color:orange}.expanded-icon{color:green}.node-content input[type=checkbox]{display:none}.custom-checkbox{position:relative;display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.checkmark{position:relative;height:14px;width:14px;background-color:#fff;border:2px solid #00444C;border-radius:3px;transition:background-color .3s ease,border-color .3s ease}.custom-checkbox input:checked+.checkmark{background-color:#00444c;border-color:#00444c;transition:background-color .3s ease,border-color .3s ease}.custom-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:4px;top:1px;width:3px;height:8px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .3s ease}.custom-checkbox input:checked+.checkmark:after{display:block}.node-label{margin-left:.5em;transition:color .3s ease,box-shadow .3s ease}.node-content input{margin-right:.5em;transition:transform .3s ease}.tree-title{font-weight:600;margin-bottom:10px;font-size:18px;color:#00444c;transition:color .3s ease}.dot{width:8px;height:8px;background-color:#828282;border-radius:50%;margin-right:8px;opacity:1}\n"], dependencies: [{ kind: "directive", type: i2$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TreeNodeComponent, selector: "argenta-custom-tree-node", inputs: ["title", "nodes", "isRoot"], outputs: ["nodeSelected"] }] }); }
2675
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: TreeNodeComponent, selector: "argenta-custom-tree-node", inputs: { title: "title", nodes: "nodes", isRoot: "isRoot" }, outputs: { nodeSelected: "nodeSelected" }, ngImport: i0, template: "<div *ngIf=\"isRoot\" class=\"tree-title\">{{ title || 'Tree Node' }}</div>\n<ul class=\"tree\">\n <li *ngFor=\"let node of nodes\">\n <div class=\"node-content\">\n <!-- Exibir a seta apenas se o n\u00F3 tiver filhos n\u00E3o vazios -->\n <span *ngIf=\"node.children && node.children.length > 0\" class=\"toggle-icon\" (click)=\"toggleCollapse(node)\"\n [ngClass]=\"{'collapsed-icon': node.collapsed, 'expanded-icon': !node.collapsed}\">\n {{ node.collapsed ? '\u25B6' : '\u25BC' }}\n </span>\n <!-- Exibir a bolinha cinza se o n\u00F3 n\u00E3o tiver filhos -->\n <span *ngIf=\"!node.children || node.children.length === 0\" class=\"dot\"></span>\n <label class=\"custom-checkbox\">\n <input type=\"checkbox\" [checked]=\"node.selected\" (change)=\"onNodeSelected(node, $event)\" />\n <span class=\"checkmark\"></span>\n </label>\n <label class=\"node-label\">{{ node.name }}</label>\n </div>\n <!-- Renderizar recursivamente apenas se o n\u00F3 tiver filhos n\u00E3o vazios e n\u00E3o estiver colapsado -->\n <argenta-custom-tree-node *ngIf=\"node.children && node.children.length > 0 && !node.collapsed\" [nodes]=\"node.children\" [isRoot]=\"false\" (nodeSelected)=\"onChildNodeSelected(node)\"></argenta-custom-tree-node>\n </li>\n</ul>\n", styles: ["@charset \"UTF-8\";@import\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap\";.tree{list-style-type:none;margin:0;padding:0;position:relative;font-family:Inter,sans-serif}.tree li{margin:0;padding:0 0 0 2em;line-height:2em;position:relative;font-size:14px;transition:all .3s ease}.tree li:before{content:\"\";position:absolute;top:0;left:0;border-left:1px solid #ccc;bottom:.75em;transition:border-color .3s ease}.tree li:after{content:\"\";position:absolute;top:1em;left:0;border-top:1px solid #ccc;width:1em;transition:border-color .3s ease}.tree li:last-child:before{height:1em}.node-content{display:flex;align-items:center;color:#333;transition:color .3s ease}.node-content:hover .node-label{color:#00444c;box-shadow:0 4px 8px #0000001a}.toggle-icon{cursor:pointer;margin-right:.5em;font-size:1em;transition:transform .3s ease,color .3s ease}.collapsed-icon{color:orange}.expanded-icon{color:green}.node-content input[type=checkbox]{display:none}.custom-checkbox{position:relative;display:inline-flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none}.checkmark{position:relative;height:14px;width:14px;background-color:#fff;border:2px solid #00444C;border-radius:3px;transition:background-color .3s ease,border-color .3s ease}.custom-checkbox input:checked+.checkmark{background-color:#00444c;border-color:#00444c;transition:background-color .3s ease,border-color .3s ease}.custom-checkbox .checkmark:after{content:\"\";position:absolute;display:none;left:4px;top:1px;width:3px;height:8px;border:solid white;border-width:0 2px 2px 0;transform:rotate(45deg);transition:transform .3s ease}.custom-checkbox input:checked+.checkmark:after{display:block}.node-label{margin-left:.5em;transition:color .3s ease,box-shadow .3s ease}.node-content input{margin-right:.5em;transition:transform .3s ease}.tree-title{font-weight:600;margin-bottom:10px;font-size:18px;color:#00444c;transition:color .3s ease}.dot{width:8px;height:8px;background-color:#828282;border-radius:50%;margin-right:8px;opacity:1}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: TreeNodeComponent, selector: "argenta-custom-tree-node", inputs: ["title", "nodes", "isRoot"], outputs: ["nodeSelected"] }] }); }
2592
2676
  }
2593
2677
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: TreeNodeComponent, decorators: [{
2594
2678
  type: Component,
@@ -2645,7 +2729,8 @@ class ComponentsModule {
2645
2729
  SearchCustomerComponent,
2646
2730
  TabComponent,
2647
2731
  FileUploadComponent,
2648
- MultiSelectCategoryComponent], imports: [CommonModule,
2732
+ MultiSelectCategoryComponent,
2733
+ JsonViewerComponent], imports: [CommonModule,
2649
2734
  FormsModule,
2650
2735
  ReactiveFormsModule,
2651
2736
  NgSelectModule,
@@ -2679,7 +2764,8 @@ class ComponentsModule {
2679
2764
  SearchCustomerComponent,
2680
2765
  TabComponent,
2681
2766
  FileUploadComponent,
2682
- MultiSelectCategoryComponent] }); }
2767
+ MultiSelectCategoryComponent,
2768
+ JsonViewerComponent] }); }
2683
2769
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentsModule, imports: [CommonModule,
2684
2770
  FormsModule,
2685
2771
  ReactiveFormsModule,
@@ -2720,6 +2806,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2720
2806
  TabComponent,
2721
2807
  FileUploadComponent,
2722
2808
  MultiSelectCategoryComponent,
2809
+ JsonViewerComponent,
2723
2810
  ],
2724
2811
  imports: [
2725
2812
  CommonModule,
@@ -2760,6 +2847,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2760
2847
  TabComponent,
2761
2848
  FileUploadComponent,
2762
2849
  MultiSelectCategoryComponent,
2850
+ JsonViewerComponent,
2763
2851
  ],
2764
2852
  }]
2765
2853
  }] });
@@ -2848,7 +2936,7 @@ class DataPaginateService {
2848
2936
  };
2849
2937
  }));
2850
2938
  }
2851
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataPaginateService, deps: [{ token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
2939
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataPaginateService, deps: [{ token: i2$1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
2852
2940
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataPaginateService, providedIn: 'root' }); }
2853
2941
  }
2854
2942
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DataPaginateService, decorators: [{
@@ -2856,7 +2944,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2856
2944
  args: [{
2857
2945
  providedIn: 'root'
2858
2946
  }]
2859
- }], ctorParameters: function () { return [{ type: i2.HttpClient }]; } });
2947
+ }], ctorParameters: function () { return [{ type: i2$1.HttpClient }]; } });
2860
2948
 
2861
2949
  class RouterParameterService {
2862
2950
  constructor() {
@@ -2921,5 +3009,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
2921
3009
  * Generated bundle index. Do not edit.
2922
3010
  */
2923
3011
 
2924
- export { AlertComponent, AppBackgroundComponent, AutofocusDirective, BadgeComponent, BasicRegistrationComponent, ButtonClasses, ButtonComponent, CardComponent, CepMaskDirective, CheckboxComponent, CnpjMaskDirective, CodeHighlightComponent, ComponentsModule, ConfirmationComponent, ConfirmationService, CpfMaskDirective, CustomPaginationComponent, CustomSwitchComponent, DataPaginateService, DataTableComponent, FileUploadComponent, InputComponent, LibPortalAngularModule, LucideIconsModule, MultiSelectCategoryComponent, MultiSelectComponent, NotificationService, RadioComponent, RefreshService, RouterParameterService, SearchCustomerComponent, SearchInputComponent, SelectComponent, TabComponent, TextareaComponent, TreeNodeComponent };
3012
+ export { AlertComponent, AppBackgroundComponent, AutofocusDirective, BadgeComponent, BasicRegistrationComponent, ButtonClasses, ButtonComponent, CardComponent, CepMaskDirective, CheckboxComponent, CnpjMaskDirective, CodeHighlightComponent, ComponentsModule, ConfirmationComponent, ConfirmationService, CpfMaskDirective, CustomPaginationComponent, CustomSwitchComponent, DataPaginateService, DataTableComponent, FileUploadComponent, InputComponent, JsonViewerComponent, LibPortalAngularModule, LucideIconsModule, MultiSelectCategoryComponent, MultiSelectComponent, NotificationService, RadioComponent, RefreshService, RouterParameterService, SearchCustomerComponent, SearchInputComponent, SelectComponent, TabComponent, TextareaComponent, TreeNodeComponent };
2925
3013
  //# sourceMappingURL=lib-portal-angular.mjs.map