lib-portal-angular 0.0.24 → 0.0.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,361 +1,94 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, Component, ChangeDetectionStrategy, Input, EventEmitter, Output, HostListener, ViewChild, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/forms';
4
- import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
5
- import Brazilian from 'flatpickr/dist/l10n/pt.js';
2
+ import { Component, Input, EventEmitter, ChangeDetectionStrategy, Output, HostListener, forwardRef, ViewChild, NgModule, createComponent, Injectable } from '@angular/core';
6
3
  import * as i1 from '@angular/common';
7
4
  import { CommonModule } from '@angular/common';
8
- import * as i3 from 'angularx-flatpickr';
9
- import { FlatpickrModule } from 'angularx-flatpickr';
5
+ import * as i2 from '@angular/forms';
6
+ import { NG_VALUE_ACCESSOR, FormsModule, ReactiveFormsModule } from '@angular/forms';
10
7
  import hljs from 'highlight.js';
11
- import { of } from 'rxjs';
12
- import * as i3$1 from '@ng-select/ng-select';
8
+ import { of, Subject } from 'rxjs';
9
+ import * as i3 from '@ng-select/ng-select';
13
10
  import { NgSelectModule } from '@ng-select/ng-select';
14
- import * as i3$2 from 'ngx-pagination';
11
+ import * as i3$1 from 'ngx-pagination';
15
12
  import { NgxPaginationModule } from 'ngx-pagination';
16
13
 
17
- class CalendarComponent {
14
+ class AlertComponent {
18
15
  constructor() {
19
- this.inputId = 'startDate';
20
- this.label = 'Event Start Date';
21
- this.placeholder = 'Not set';
22
- this.marginTop = 0;
23
- this.marginBottom = 0;
24
- this.marginLeft = 0;
25
- this.marginRight = 0;
26
- this.altInput = true;
27
- this.convertModelValue = true;
28
- this.enableTime = true;
29
- this.dateFormat = 'd/m/Y H:i';
30
- this.altFormat = 'd/m/Y';
31
- this.locale = Brazilian.pt; // Define o idioma como brasileiro por padrão
32
- this.onChange = (_) => { };
33
- this.onTouched = () => { };
16
+ this.alerts = [];
17
+ this.closeTimeouts = {}; // Armazena os temporizadores para cada alerta
34
18
  }
35
19
  ngOnInit() {
36
- // Any necessary initialization
37
- }
38
- writeValue(value) {
39
- this.value = value;
40
- }
41
- registerOnChange(fn) {
42
- this.onChange = fn;
43
- }
44
- registerOnTouched(fn) {
45
- this.onTouched = fn;
46
- }
47
- onNgModelChange(event) {
48
- this.onChange(event);
49
- this.onTouched();
50
- }
51
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
52
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: CalendarComponent, selector: "sim-advanced-calendar", inputs: { inputId: "inputId", label: "label", placeholder: "placeholder", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight", altInput: "altInput", convertModelValue: "convertModelValue", enableTime: "enableTime", dateFormat: "dateFormat", altFormat: "altFormat", locale: "locale" }, providers: [
53
- {
54
- provide: NG_VALUE_ACCESSOR,
55
- useExisting: forwardRef(() => CalendarComponent),
56
- multi: true
57
- }
58
- ], ngImport: i0, template: `
59
- <div class="form-group" [ngStyle]="{
60
- 'margin-top': marginTop + 'rem',
61
- 'margin-bottom': marginBottom + 'rem',
62
- 'margin-left': marginLeft + 'rem',
63
- 'margin-right': marginRight + 'rem'
64
- }">
65
- <label [for]="inputId" class="form-label">{{ label }}</label>
66
- <input
67
- [id]="inputId"
68
- class="form-control"
69
- type="text"
70
- mwlFlatpickr
71
- [(ngModel)]="value"
72
- (ngModelChange)="onNgModelChange($event)"
73
- [altInput]="altInput"
74
- [convertModelValue]="convertModelValue"
75
- [enableTime]="enableTime"
76
- [dateFormat]="dateFormat"
77
- [altFormat]="altFormat"
78
- [placeholder]="placeholder"
79
- [locale]="locale"
80
- />
81
- </div>
82
- `, isInline: true, styles: [".form-group{font-family:Arial,sans-serif;font-size:1rem}.form-label{font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.FlatpickrDirective, selector: "[mwlFlatpickr]", inputs: ["options", "altFormat", "altInput", "altInputClass", "allowInput", "allowInvalidPreload", "appendTo", "ariaDateFormat", "clickOpens", "dateFormat", "defaultHour", "defaultMinute", "defaultSeconds", "disable", "disableMobile", "enable", "enableTime", "enableSeconds", "formatDate", "hourIncrement", "inline", "maxDate", "minDate", "maxTime", "minTime", "minuteIncrement", "mode", "nextArrow", "noCalendar", "now", "parseDate", "prevArrow", "shorthandCurrentMonth", "showMonths", "static", "time24hr", "weekNumbers", "getWeek", "wrap", "plugins", "locale", "convertModelValue", "monthSelectorType", "ignoredFocusElements"], outputs: ["flatpickrReady", "flatpickrChange", "flatpickrValueUpdate", "flatpickrOpen", "flatpickrClose", "flatpickrMonthChange", "flatpickrYearChange", "flatpickrDayCreate"], exportAs: ["mwlFlatpickr"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
83
- }
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: CalendarComponent, decorators: [{
85
- type: Component,
86
- args: [{ selector: 'sim-advanced-calendar', template: `
87
- <div class="form-group" [ngStyle]="{
88
- 'margin-top': marginTop + 'rem',
89
- 'margin-bottom': marginBottom + 'rem',
90
- 'margin-left': marginLeft + 'rem',
91
- 'margin-right': marginRight + 'rem'
92
- }">
93
- <label [for]="inputId" class="form-label">{{ label }}</label>
94
- <input
95
- [id]="inputId"
96
- class="form-control"
97
- type="text"
98
- mwlFlatpickr
99
- [(ngModel)]="value"
100
- (ngModelChange)="onNgModelChange($event)"
101
- [altInput]="altInput"
102
- [convertModelValue]="convertModelValue"
103
- [enableTime]="enableTime"
104
- [dateFormat]="dateFormat"
105
- [altFormat]="altFormat"
106
- [placeholder]="placeholder"
107
- [locale]="locale"
108
- />
109
- </div>
110
- `, providers: [
111
- {
112
- provide: NG_VALUE_ACCESSOR,
113
- useExisting: forwardRef(() => CalendarComponent),
114
- multi: true
115
- }
116
- ], changeDetection: ChangeDetectionStrategy.OnPush, styles: [".form-group{font-family:Arial,sans-serif;font-size:1rem}.form-label{font-weight:700}\n"] }]
117
- }], propDecorators: { inputId: [{
118
- type: Input
119
- }], label: [{
120
- type: Input
121
- }], placeholder: [{
122
- type: Input
123
- }], marginTop: [{
124
- type: Input
125
- }], marginBottom: [{
126
- type: Input
127
- }], marginLeft: [{
128
- type: Input
129
- }], marginRight: [{
130
- type: Input
131
- }], altInput: [{
132
- type: Input
133
- }], convertModelValue: [{
134
- type: Input
135
- }], enableTime: [{
136
- type: Input
137
- }], dateFormat: [{
138
- type: Input
139
- }], altFormat: [{
140
- type: Input
141
- }], locale: [{
142
- type: Input
143
- }] } });
144
-
145
- class DatePickerComponent {
146
- constructor() {
147
- this.inputId = '';
148
- this.label = '';
149
- this.placeholder = '';
150
- this.marginTop = 0;
151
- this.marginBottom = 0;
152
- this.marginLeft = 0;
153
- this.marginRight = 0;
154
- this.ngModelChange = new EventEmitter();
155
- // ControlValueAccessor interface methods
156
- this.onChange = () => { };
157
- this.onTouched = () => { };
158
- }
159
- get value() {
160
- return this.innerValue;
161
- }
162
- set value(val) {
163
- this.innerValue = val;
164
- this.onChange(val);
165
- this.onTouched();
166
- }
167
- onNgModelChange(event) {
168
- this.value = event;
169
- this.ngModelChange.emit(event);
170
- }
171
- writeValue(value) {
172
- this.value = value;
173
- }
174
- registerOnChange(fn) {
175
- this.onChange = fn;
176
- }
177
- registerOnTouched(fn) {
178
- this.onTouched = fn;
179
- }
180
- setDisabledState(isDisabled) {
181
- // Logic for disabling the component
182
- }
183
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
184
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DatePickerComponent, selector: "sim-date-picker", inputs: { inputId: "inputId", label: "label", placeholder: "placeholder", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight" }, outputs: { ngModelChange: "ngModelChange" }, providers: [
185
- {
186
- provide: NG_VALUE_ACCESSOR,
187
- useExisting: forwardRef(() => DatePickerComponent),
188
- multi: true
189
- }
190
- ], ngImport: i0, template: `
191
- <div class="form-group" [ngStyle]="{
192
- 'margin-top': marginTop + 'rem',
193
- 'margin-bottom': marginBottom + 'rem',
194
- 'margin-left': marginLeft + 'rem',
195
- 'margin-right': marginRight + 'rem'
196
- }">
197
- <label [for]="inputId" class="form-label">{{ label }}</label>
198
- <input
199
- [id]="inputId"
200
- class="form-control"
201
- type="date"
202
- [(ngModel)]="value"
203
- (ngModelChange)="onNgModelChange($event)"
204
- [placeholder]="placeholder"
205
- />
206
- </div>
207
- `, isInline: true, styles: [".form-label{font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] }); }
208
- }
209
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DatePickerComponent, decorators: [{
210
- type: Component,
211
- args: [{ selector: 'sim-date-picker', template: `
212
- <div class="form-group" [ngStyle]="{
213
- 'margin-top': marginTop + 'rem',
214
- 'margin-bottom': marginBottom + 'rem',
215
- 'margin-left': marginLeft + 'rem',
216
- 'margin-right': marginRight + 'rem'
217
- }">
218
- <label [for]="inputId" class="form-label">{{ label }}</label>
219
- <input
220
- [id]="inputId"
221
- class="form-control"
222
- type="date"
223
- [(ngModel)]="value"
224
- (ngModelChange)="onNgModelChange($event)"
225
- [placeholder]="placeholder"
226
- />
227
- </div>
228
- `, providers: [
229
- {
230
- provide: NG_VALUE_ACCESSOR,
231
- useExisting: forwardRef(() => DatePickerComponent),
232
- multi: true
233
- }
234
- ], styles: [".form-label{font-weight:700}\n"] }]
235
- }], propDecorators: { inputId: [{
236
- type: Input
237
- }], label: [{
238
- type: Input
239
- }], placeholder: [{
240
- type: Input
241
- }], marginTop: [{
242
- type: Input
243
- }], marginBottom: [{
244
- type: Input
245
- }], marginLeft: [{
246
- type: Input
247
- }], marginRight: [{
248
- type: Input
249
- }], ngModelChange: [{
250
- type: Output
251
- }] } });
252
-
253
- class DateTimePickerComponent {
254
- constructor() {
255
- this.inputId = '';
256
- this.label = '';
257
- this.placeholder = '';
258
- this.marginTop = 0;
259
- this.marginBottom = 0;
260
- this.marginLeft = 0;
261
- this.marginRight = 0;
262
- this.ngModelChange = new EventEmitter();
263
- // ControlValueAccessor interface methods
264
- this.onChange = () => { };
265
- this.onTouched = () => { };
266
- }
267
- get value() {
268
- return this._value;
269
- }
270
- set value(val) {
271
- this._value = val;
272
- this.onChange(val);
273
- this.onTouched();
20
+ // Inicia o temporizador de fechamento para cada alerta quando a página é carregada
21
+ this.alerts.forEach(alert => {
22
+ this.closeTimeouts[alert.message] = setTimeout(() => {
23
+ this.closeAlert(alert);
24
+ }, 6000); // Fecha após 8 segundos
25
+ });
274
26
  }
275
- onNgModelChange(event) {
276
- this.value = event;
277
- this.ngModelChange.emit(event);
27
+ ngAfterViewInit() {
28
+ // Adiciona a classe 'show' após um curto atraso para acionar a animação
29
+ setTimeout(() => {
30
+ this.alerts.forEach(alert => {
31
+ const element = document.getElementById(`alert-${alert.message}`);
32
+ if (element) {
33
+ element.classList.add('show');
34
+ }
35
+ });
36
+ }, 10); // Pequeno atraso para garantir que o elemento esteja no DOM
37
+ }
38
+ closeAlert(alert) {
39
+ const element = document.getElementById(`alert-${alert.message}`);
40
+ if (element) {
41
+ element.classList.remove('show');
42
+ setTimeout(() => {
43
+ this.alerts = this.alerts.filter(a => a !== alert);
44
+ }, 500); // Duração da animação de saída
45
+ }
46
+ else {
47
+ this.alerts = this.alerts.filter(a => a !== alert);
48
+ }
278
49
  }
279
- writeValue(value) {
280
- this._value = value;
50
+ getAlertClass(alert) {
51
+ return {
52
+ 'alert-container': true,
53
+ 'alert-dismissible': true,
54
+ [`alert-${alert.type}`]: true
55
+ };
281
56
  }
282
- registerOnChange(fn) {
283
- this.onChange = fn;
57
+ getAlertIconClass(alert) {
58
+ switch (alert.type) {
59
+ case 'success':
60
+ return 'success-icon'; // Classe para o ícone de sucesso
61
+ case 'info':
62
+ return 'info-icon'; // Classe para o ícone de informação
63
+ case 'warning':
64
+ return 'warning-icon'; // Classe para o ícone de aviso
65
+ case 'danger':
66
+ return 'danger-icon'; // Classe para o ícone de erro
67
+ default:
68
+ return '';
69
+ }
284
70
  }
285
- registerOnTouched(fn) {
286
- this.onTouched = fn;
71
+ onMouseEnter(alert) {
72
+ // Cancela o temporizador quando o mouse entra no alerta
73
+ if (this.closeTimeouts[alert.message]) {
74
+ clearTimeout(this.closeTimeouts[alert.message]);
75
+ delete this.closeTimeouts[alert.message];
76
+ }
287
77
  }
288
- setDisabledState(isDisabled) {
289
- // Logic for disabling the component
78
+ onMouseLeave(alert) {
79
+ // Inicia um novo temporizador para fechar o alerta após 2 segundos quando o mouse sai do alerta
80
+ this.closeTimeouts[alert.message] = setTimeout(() => {
81
+ this.closeAlert(alert);
82
+ }, 2000); // Fechar após 2 segundos
290
83
  }
291
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateTimePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
292
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: DateTimePickerComponent, selector: "sim-date-time-picker", inputs: { inputId: "inputId", label: "label", placeholder: "placeholder", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight" }, outputs: { ngModelChange: "ngModelChange" }, providers: [
293
- {
294
- provide: NG_VALUE_ACCESSOR,
295
- useExisting: forwardRef(() => DateTimePickerComponent),
296
- multi: true
297
- }
298
- ], ngImport: i0, template: `
299
- <div class="form-group" [ngStyle]="{
300
- 'margin-top': marginTop + 'rem',
301
- 'margin-bottom': marginBottom + 'rem',
302
- 'margin-left': marginLeft + 'rem',
303
- 'margin-right': marginRight + 'rem'
304
- }">
305
- <label [for]="inputId" class="form-label">{{ label }}</label>
306
- <input
307
- [id]="inputId"
308
- class="form-control"
309
- type="datetime-local"
310
- [(ngModel)]="value"
311
- (ngModelChange)="onNgModelChange($event)"
312
- [placeholder]="placeholder"
313
- />
314
- </div>
315
- `, isInline: true, styles: [".form-label{font-weight:700}.custom-input{border:1px solid #9aa4b2;transition:border-color .3s,box-shadow .3s}.custom-input:hover{border-color:#2196f3;border-width:2px}.custom-input:focus{border-color:#2196f3;border-width:2px;box-shadow:0 0 5px #007bff80}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
84
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
85
+ 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}.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: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] }); }
316
86
  }
317
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DateTimePickerComponent, decorators: [{
87
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: AlertComponent, decorators: [{
318
88
  type: Component,
319
- args: [{ selector: 'sim-date-time-picker', template: `
320
- <div class="form-group" [ngStyle]="{
321
- 'margin-top': marginTop + 'rem',
322
- 'margin-bottom': marginBottom + 'rem',
323
- 'margin-left': marginLeft + 'rem',
324
- 'margin-right': marginRight + 'rem'
325
- }">
326
- <label [for]="inputId" class="form-label">{{ label }}</label>
327
- <input
328
- [id]="inputId"
329
- class="form-control"
330
- type="datetime-local"
331
- [(ngModel)]="value"
332
- (ngModelChange)="onNgModelChange($event)"
333
- [placeholder]="placeholder"
334
- />
335
- </div>
336
- `, providers: [
337
- {
338
- provide: NG_VALUE_ACCESSOR,
339
- useExisting: forwardRef(() => DateTimePickerComponent),
340
- multi: true
341
- }
342
- ], changeDetection: ChangeDetectionStrategy.OnPush, styles: [".form-label{font-weight:700}.custom-input{border:1px solid #9aa4b2;transition:border-color .3s,box-shadow .3s}.custom-input:hover{border-color:#2196f3;border-width:2px}.custom-input:focus{border-color:#2196f3;border-width:2px;box-shadow:0 0 5px #007bff80}\n"] }]
343
- }], propDecorators: { inputId: [{
89
+ args: [{ selector: 'lib-alert', 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}.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"] }]
90
+ }], propDecorators: { alerts: [{
344
91
  type: Input
345
- }], label: [{
346
- type: Input
347
- }], placeholder: [{
348
- type: Input
349
- }], marginTop: [{
350
- type: Input
351
- }], marginBottom: [{
352
- type: Input
353
- }], marginLeft: [{
354
- type: Input
355
- }], marginRight: [{
356
- type: Input
357
- }], ngModelChange: [{
358
- type: Output
359
92
  }] } });
360
93
 
361
94
  var ButtonClasses;
@@ -538,6 +271,8 @@ class ButtonComponent {
538
271
  this.marginBottom = 0;
539
272
  this.marginLeft = 0;
540
273
  this.marginRight = 0;
274
+ this.permissions = [];
275
+ this.permissionChecker = null;
541
276
  this.clickEvent = new EventEmitter();
542
277
  this.isHovered = false;
543
278
  this.isActive = false;
@@ -612,47 +347,57 @@ class ButtonComponent {
612
347
  'filter': activeFilter
613
348
  };
614
349
  }
350
+ hasPermission() {
351
+ if (!this.permissionChecker || this.permissions.length === 0) {
352
+ return true;
353
+ }
354
+ return this.permissionChecker(this.permissions);
355
+ }
615
356
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
616
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonComponent, selector: "sim-app-button", inputs: { type: "type", label: "label", btnClass: "btnClass", fontSize: "fontSize", disabled: "disabled", autofocus: "autofocus", form: "form", formaction: "formaction", formenctype: "formenctype", formmethod: "formmethod", formnovalidate: "formnovalidate", formtarget: "formtarget", name: "name", value: "value", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight" }, outputs: { clickEvent: "clickEvent" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "mousedown": "onMouseDown()", "mouseup": "onMouseUp()" } }, ngImport: i0, template: `
617
- <button [type]="type"
618
- class="btn"
619
- [ngClass]="btnClass"
620
- [ngStyle]="getDynamicStyles()"
621
- (click)="onClick($event)"
622
- [disabled]="disabled"
623
- [attr.autofocus]="autofocus ? true : null"
624
- [attr.form]="form"
625
- [attr.formaction]="formaction"
626
- [attr.formenctype]="formenctype"
627
- [attr.formmethod]="formmethod"
628
- [attr.formnovalidate]="formnovalidate"
629
- [attr.formtarget]="formtarget"
630
- [attr.name]="name"
631
- [attr.value]="value">
632
- {{ label }}
633
- </button>
634
- `, 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: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
357
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: ButtonComponent, selector: "sim-app-button", inputs: { type: "type", label: "label", btnClass: "btnClass", fontSize: "fontSize", disabled: "disabled", autofocus: "autofocus", form: "form", formaction: "formaction", formenctype: "formenctype", formmethod: "formmethod", formnovalidate: "formnovalidate", formtarget: "formtarget", name: "name", value: "value", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight", permissions: "permissions", permissionChecker: "permissionChecker" }, outputs: { clickEvent: "clickEvent" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "mousedown": "onMouseDown()", "mouseup": "onMouseUp()" } }, ngImport: i0, template: `
358
+ <ng-container *ngIf="hasPermission()">
359
+ <button [type]="type"
360
+ class="btn"
361
+ [ngClass]="btnClass"
362
+ [ngStyle]="getDynamicStyles()"
363
+ (click)="onClick($event)"
364
+ [disabled]="disabled"
365
+ [attr.autofocus]="autofocus ? true : null"
366
+ [attr.form]="form"
367
+ [attr.formaction]="formaction"
368
+ [attr.formenctype]="formenctype"
369
+ [attr.formmethod]="formmethod"
370
+ [attr.formnovalidate]="formnovalidate"
371
+ [attr.formtarget]="formtarget"
372
+ [attr.name]="name"
373
+ [attr.value]="value">
374
+ {{ label }}
375
+ </button>
376
+ </ng-container>
377
+ `, 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: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
635
378
  }
636
379
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ButtonComponent, decorators: [{
637
380
  type: Component,
638
381
  args: [{ selector: 'sim-app-button', template: `
639
- <button [type]="type"
640
- class="btn"
641
- [ngClass]="btnClass"
642
- [ngStyle]="getDynamicStyles()"
643
- (click)="onClick($event)"
644
- [disabled]="disabled"
645
- [attr.autofocus]="autofocus ? true : null"
646
- [attr.form]="form"
647
- [attr.formaction]="formaction"
648
- [attr.formenctype]="formenctype"
649
- [attr.formmethod]="formmethod"
650
- [attr.formnovalidate]="formnovalidate"
651
- [attr.formtarget]="formtarget"
652
- [attr.name]="name"
653
- [attr.value]="value">
654
- {{ label }}
655
- </button>
382
+ <ng-container *ngIf="hasPermission()">
383
+ <button [type]="type"
384
+ class="btn"
385
+ [ngClass]="btnClass"
386
+ [ngStyle]="getDynamicStyles()"
387
+ (click)="onClick($event)"
388
+ [disabled]="disabled"
389
+ [attr.autofocus]="autofocus ? true : null"
390
+ [attr.form]="form"
391
+ [attr.formaction]="formaction"
392
+ [attr.formenctype]="formenctype"
393
+ [attr.formmethod]="formmethod"
394
+ [attr.formnovalidate]="formnovalidate"
395
+ [attr.formtarget]="formtarget"
396
+ [attr.name]="name"
397
+ [attr.value]="value">
398
+ {{ label }}
399
+ </button>
400
+ </ng-container>
656
401
  `, changeDetection: ChangeDetectionStrategy.OnPush, 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"] }]
657
402
  }], propDecorators: { type: [{
658
403
  type: Input
@@ -690,6 +435,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
690
435
  type: Input
691
436
  }], marginRight: [{
692
437
  type: Input
438
+ }], permissions: [{
439
+ type: Input
440
+ }], permissionChecker: [{
441
+ type: Input
693
442
  }], clickEvent: [{
694
443
  type: Output
695
444
  }], onMouseEnter: [{
@@ -900,40 +649,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
900
649
  class FormComponent {
901
650
  constructor() {
902
651
  this.cardTitle = 'Default Form Title';
652
+ this.colClasses = 'col-12'; // Classes de coluna responsiva
653
+ // Valores de margem dinâmica
654
+ this.marginTop = 0; // Em rem
655
+ this.marginLeft = 0; // Em rem
656
+ this.marginRight = 0; // Em rem
657
+ }
658
+ getRowStyles() {
659
+ return {
660
+ 'margin-top': `${this.marginTop}rem`,
661
+ 'margin-left': `${this.marginLeft}rem`,
662
+ 'margin-right': `${this.marginRight}rem`
663
+ };
903
664
  }
904
665
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
905
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormComponent, selector: "sim-app-form", inputs: { cardTitle: "cardTitle" }, ngImport: i0, template: `
906
- <div class="row mt-2 mx-1">
907
- <div class="col-sm-12">
908
- <sim-app-card [cardTitle]="cardTitle">
909
- <ng-content></ng-content>
910
- </sim-app-card>
666
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: FormComponent, selector: "sim-app-form", inputs: { cardTitle: "cardTitle", colClasses: "colClasses", marginTop: "marginTop", marginLeft: "marginLeft", marginRight: "marginRight" }, ngImport: i0, template: `
667
+ <div class="row" [ngStyle]="getRowStyles()">
668
+ <div [ngClass]="colClasses">
669
+ <div class="card">
670
+ <div class="card-title">
671
+ {{ cardTitle }}
672
+ </div>
673
+ <div class="card-content">
674
+ <ng-content></ng-content>
675
+ </div>
676
+ </div>
911
677
  </div>
912
678
  </div>
913
- `, isInline: true, dependencies: [{ kind: "component", type: CardComponent, selector: "sim-app-card", inputs: ["cardTitle"] }] }); }
679
+ `, isInline: true, styles: [".row{margin-top:.5rem;margin-left:.25rem;margin-right:.25rem}.col-12{padding:0}.card{border:1px solid #ddd;border-radius:.25rem;padding:1rem}.card-title{font-family:Inter,sans-serif;font-size:42px;font-weight:700;line-height:50.83px;text-align:left;width:98%;height:51px;gap:0px;opacity:0px;margin-bottom:1rem}.card-content{font-family:Arial,sans-serif}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }] }); }
914
680
  }
915
681
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: FormComponent, decorators: [{
916
682
  type: Component,
917
- args: [{
918
- selector: 'sim-app-form',
919
- template: `
920
- <div class="row mt-2 mx-1">
921
- <div class="col-sm-12">
922
- <sim-app-card [cardTitle]="cardTitle">
923
- <ng-content></ng-content>
924
- </sim-app-card>
683
+ args: [{ selector: 'sim-app-form', template: `
684
+ <div class="row" [ngStyle]="getRowStyles()">
685
+ <div [ngClass]="colClasses">
686
+ <div class="card">
687
+ <div class="card-title">
688
+ {{ cardTitle }}
689
+ </div>
690
+ <div class="card-content">
691
+ <ng-content></ng-content>
692
+ </div>
693
+ </div>
925
694
  </div>
926
695
  </div>
927
- `
928
- }]
696
+ `, styles: [".row{margin-top:.5rem;margin-left:.25rem;margin-right:.25rem}.col-12{padding:0}.card{border:1px solid #ddd;border-radius:.25rem;padding:1rem}.card-title{font-family:Inter,sans-serif;font-size:42px;font-weight:700;line-height:50.83px;text-align:left;width:98%;height:51px;gap:0px;opacity:0px;margin-bottom:1rem}.card-content{font-family:Arial,sans-serif}\n"] }]
929
697
  }], propDecorators: { cardTitle: [{
930
698
  type: Input
699
+ }], colClasses: [{
700
+ type: Input
701
+ }], marginTop: [{
702
+ type: Input
703
+ }], marginLeft: [{
704
+ type: Input
705
+ }], marginRight: [{
706
+ type: Input
931
707
  }] } });
932
708
 
933
709
  class InputComponent {
934
710
  constructor() {
935
711
  this.label = 'Default Label';
936
- this.placeholder = 'Default Placeholder';
712
+ this.placeholder = '';
937
713
  this.id = 'inputId';
938
714
  this.type = 'text';
939
715
  this.disabled = false;
@@ -947,6 +723,9 @@ class InputComponent {
947
723
  this.marginBottom = 0;
948
724
  this.marginLeft = 0;
949
725
  this.marginRight = 0;
726
+ this.labelFontWeight = 400;
727
+ this.permissions = [];
728
+ this.permissionChecker = null;
950
729
  this.inputEvent = new EventEmitter();
951
730
  this.changeEvent = new EventEmitter();
952
731
  this.focusEvent = new EventEmitter();
@@ -995,26 +774,47 @@ class InputComponent {
995
774
  setDisabledState(isDisabled) {
996
775
  this.disabled = isDisabled;
997
776
  }
777
+ hasPermission() {
778
+ if (!this.permissionChecker || this.permissions.length === 0) {
779
+ return true;
780
+ }
781
+ return this.permissionChecker(this.permissions);
782
+ }
783
+ getLabelStyles() {
784
+ return {
785
+ 'font-weight': this.labelFontWeight,
786
+ 'width': '623px',
787
+ 'height': '19px',
788
+ 'top': '1608px',
789
+ 'left': '133px',
790
+ 'gap': '0px',
791
+ 'opacity': '0px',
792
+ 'font-family': 'Inter',
793
+ 'font-size': '16px',
794
+ 'line-height': '19.36px',
795
+ 'text-align': 'left'
796
+ };
797
+ }
998
798
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
999
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InputComponent, selector: "sim-app-input", inputs: { label: "label", placeholder: "placeholder", id: "id", type: "type", disabled: "disabled", readonly: "readonly", maxlength: "maxlength", minlength: "minlength", required: "required", pattern: "pattern", autofocus: "autofocus", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight" }, outputs: { inputEvent: "inputEvent", changeEvent: "changeEvent", focusEvent: "focusEvent", blurEvent: "blurEvent", keyupEvent: "keyupEvent", keydownEvent: "keydownEvent", keypressEvent: "keypressEvent" }, providers: [
799
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InputComponent, selector: "sim-app-input", inputs: { label: "label", placeholder: "placeholder", id: "id", type: "type", disabled: "disabled", readonly: "readonly", maxlength: "maxlength", minlength: "minlength", required: "required", pattern: "pattern", autofocus: "autofocus", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight", labelFontWeight: "labelFontWeight", permissions: "permissions", permissionChecker: "permissionChecker" }, outputs: { inputEvent: "inputEvent", changeEvent: "changeEvent", focusEvent: "focusEvent", blurEvent: "blurEvent", keyupEvent: "keyupEvent", keydownEvent: "keydownEvent", keypressEvent: "keypressEvent" }, providers: [
1000
800
  {
1001
801
  provide: NG_VALUE_ACCESSOR,
1002
802
  useExisting: forwardRef(() => InputComponent),
1003
803
  multi: true
1004
804
  }
1005
805
  ], ngImport: i0, template: `
1006
- <div class="form-group" [ngStyle]="{
806
+ <div *ngIf="hasPermission()" class="form-group" [ngStyle]="{
1007
807
  'margin-top': marginTop + 'rem',
1008
808
  'margin-bottom': marginBottom + 'rem',
1009
809
  'margin-left': marginLeft + 'rem',
1010
810
  'margin-right': marginRight + 'rem'
1011
811
  }">
1012
- <label [for]="id">{{ label }}</label>
812
+ <label [for]="id" [ngStyle]="getLabelStyles()">{{ label }}</label>
1013
813
  <input [type]="type"
1014
814
  class="form-control custom-input"
1015
815
  [id]="id"
1016
816
  [placeholder]="placeholder"
1017
- [value]="value"
817
+ [(ngModel)]="value"
1018
818
  (input)="onInput($event)"
1019
819
  (change)="onChange($event)"
1020
820
  (focus)="onFocus($event)"
@@ -1030,23 +830,23 @@ class InputComponent {
1030
830
  [attr.pattern]="pattern"
1031
831
  [autofocus]="autofocus">
1032
832
  </div>
1033
- `, isInline: true, styles: [".form-group{font-family:Arial,sans-serif;font-size:1rem;font-weight:700}.form-check-input{font-family:Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{font-family:Arial,sans-serif;color:#333;font-size:1rem}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
833
+ `, isInline: true, styles: [".form-group{font-family:Inter;font-size:1rem;font-weight:700}.form-check-input{font-family:Inter;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter;font-size:16px;line-height:19.36px;text-align:left}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1034
834
  }
1035
835
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InputComponent, decorators: [{
1036
836
  type: Component,
1037
837
  args: [{ selector: 'sim-app-input', template: `
1038
- <div class="form-group" [ngStyle]="{
838
+ <div *ngIf="hasPermission()" class="form-group" [ngStyle]="{
1039
839
  'margin-top': marginTop + 'rem',
1040
840
  'margin-bottom': marginBottom + 'rem',
1041
841
  'margin-left': marginLeft + 'rem',
1042
842
  'margin-right': marginRight + 'rem'
1043
843
  }">
1044
- <label [for]="id">{{ label }}</label>
844
+ <label [for]="id" [ngStyle]="getLabelStyles()">{{ label }}</label>
1045
845
  <input [type]="type"
1046
846
  class="form-control custom-input"
1047
847
  [id]="id"
1048
848
  [placeholder]="placeholder"
1049
- [value]="value"
849
+ [(ngModel)]="value"
1050
850
  (input)="onInput($event)"
1051
851
  (change)="onChange($event)"
1052
852
  (focus)="onFocus($event)"
@@ -1068,7 +868,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1068
868
  useExisting: forwardRef(() => InputComponent),
1069
869
  multi: true
1070
870
  }
1071
- ], changeDetection: ChangeDetectionStrategy.OnPush, styles: [".form-group{font-family:Arial,sans-serif;font-size:1rem;font-weight:700}.form-check-input{font-family:Arial,sans-serif;color:#333;font-size:.9rem}.form-check-label{font-family:Arial,sans-serif;color:#333;font-size:1rem}\n"] }]
871
+ ], changeDetection: ChangeDetectionStrategy.OnPush, styles: [".form-group{font-family:Inter;font-size:1rem;font-weight:700}.form-check-input{font-family:Inter;color:#333;font-size:.9rem}.form-check-label{width:623px;height:19px;top:1608px;left:133px;gap:0px;opacity:0px;font-family:Inter;font-size:16px;line-height:19.36px;text-align:left}\n"] }]
1072
872
  }], propDecorators: { label: [{
1073
873
  type: Input
1074
874
  }], placeholder: [{
@@ -1099,6 +899,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1099
899
  type: Input
1100
900
  }], marginRight: [{
1101
901
  type: Input
902
+ }], labelFontWeight: [{
903
+ type: Input
904
+ }], permissions: [{
905
+ type: Input
906
+ }], permissionChecker: [{
907
+ type: Input
1102
908
  }], inputEvent: [{
1103
909
  type: Output
1104
910
  }], changeEvent: [{
@@ -1192,7 +998,7 @@ class MultiSelectComponent {
1192
998
  </ng-template>
1193
999
  </ng-select>
1194
1000
  </div>
1195
- `, isInline: true, styles: [".form-group{font-family:Arial,sans-serif;font-size:1rem}.form-label{font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.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: i3$1.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1001
+ `, isInline: true, styles: [".form-group{font-family:Arial,sans-serif;font-size:1rem}.form-label{font-weight:700}\n"], dependencies: [{ kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3.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: i3.NgOptionTemplateDirective, selector: "[ng-option-tmp]" }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1196
1002
  }
1197
1003
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: MultiSelectComponent, decorators: [{
1198
1004
  type: Component,
@@ -1538,7 +1344,7 @@ class BootstrapTableComponent {
1538
1344
  }
1539
1345
  }
1540
1346
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BootstrapTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1541
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BootstrapTableComponent, selector: "sim-bootstrap-table", inputs: { columns: "columns", data: "data", itemsPerPageOptions: "itemsPerPageOptions", defaultItemsPerPage: "defaultItemsPerPage", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight", showActionColumn: "showActionColumn", actionColumnLabel: "actionColumnLabel" }, outputs: { sortChange: "sortChange", pageChange: "pageChange", itemsPerPageChange: "itemsPerPageChange", onEditTable: "onEditTable", onDeleteTable: "onDeleteTable", onViewTable: "onViewTable" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group\" [ngStyle]=\"{\n 'margin-top': marginTop + 'rem',\n 'margin-bottom': marginBottom + 'rem',\n 'margin-left': marginLeft + 'rem',\n 'margin-right': marginRight + 'rem'\n}\" style=\"text-align: right;\">\n <label for=\"itemsPerPageSelect\" style=\"margin-right: 0.5rem; margin-bottom: 0.7rem;\">Itens por P\u00E1gina:</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange($event)\">\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">{{ option }}</option>\n </select>\n</div>\n\n<div class=\"table-responsive\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\" (click)=\"onSort(column.prop)\">\n {{ column.label }}\n </th>\n <th *ngIf=\"showActionColumn\">{{ actionColumnLabel }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of data | paginate: config; let i = index\">\n <td *ngFor=\"let column of columns\">\n {{ item[column.prop] }}\n </td>\n <td *ngIf=\"showActionColumn\">\n <div class=\"d-flex justify-content-center\">\n <button *ngIf=\"onEditTable.observers.length > 0\" (click)=\"handleAction('edit', item, i)\" class=\"btn btn-sm btn-primary mx-1\">Edit</button>\n <button *ngIf=\"onDeleteTable.observers.length > 0\" (click)=\"handleAction('delete', item, i)\" class=\"btn btn-sm btn-danger mx-1\">Delete</button>\n <button *ngIf=\"onViewTable.observers.length > 0\" (click)=\"handleAction('view', item, i)\" class=\"btn btn-sm btn-info mx-1\">View</button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center\">\n <pagination-controls id=\"bootstrap-table\" (pageChange)=\"onPageChange($event)\" previousLabel=\"Anterior\" nextLabel=\"Pr\u00F3ximo\" [responsive]=\"true\"></pagination-controls>\n</div>\n\n\n<!-- Estilos CSS diretamente no HTML -->\n<style>\n .table thead th {\n background-color: #343a40; /* Tom de cinza escuro */\n color: #fff;\n }\n</style>\n", styles: ["", "\n .table thead th {\n background-color: #343a40; /* Tom de cinza escuro */\n color: #fff;\n }\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$2.PaginationControlsComponent, selector: "pagination-controls", inputs: ["id", "maxSize", "directionLinks", "autoHide", "responsive", "previousLabel", "nextLabel", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], outputs: ["pageChange", "pageBoundsCorrection"] }, { kind: "pipe", type: i3$2.PaginatePipe, name: "paginate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1347
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: BootstrapTableComponent, selector: "sim-bootstrap-table", inputs: { columns: "columns", data: "data", itemsPerPageOptions: "itemsPerPageOptions", defaultItemsPerPage: "defaultItemsPerPage", marginTop: "marginTop", marginBottom: "marginBottom", marginLeft: "marginLeft", marginRight: "marginRight", showActionColumn: "showActionColumn", actionColumnLabel: "actionColumnLabel" }, outputs: { sortChange: "sortChange", pageChange: "pageChange", itemsPerPageChange: "itemsPerPageChange", onEditTable: "onEditTable", onDeleteTable: "onDeleteTable", onViewTable: "onViewTable" }, usesOnChanges: true, ngImport: i0, template: "<div class=\"form-group\" [ngStyle]=\"{\n 'margin-top': marginTop + 'rem',\n 'margin-bottom': marginBottom + 'rem',\n 'margin-left': marginLeft + 'rem',\n 'margin-right': marginRight + 'rem'\n}\" style=\"text-align: right;\">\n <label for=\"itemsPerPageSelect\" style=\"margin-right: 0.5rem; margin-bottom: 0.7rem;\">Itens por P\u00E1gina:</label>\n <select\n id=\"itemsPerPageSelect\"\n class=\"form-control form-control-sm d-inline-block w-auto\"\n [(ngModel)]=\"defaultItemsPerPage\"\n (ngModelChange)=\"onItemsPerPageChange($event)\">\n <option *ngFor=\"let option of itemsPerPageOptions\" [value]=\"option\">{{ option }}</option>\n </select>\n</div>\n\n<div class=\"table-responsive\">\n <table class=\"table table-hover\">\n <thead>\n <tr>\n <th *ngFor=\"let column of columns\" (click)=\"onSort(column.prop)\">\n {{ column.label }}\n </th>\n <th *ngIf=\"showActionColumn\">{{ actionColumnLabel }}</th>\n </tr>\n </thead>\n <tbody>\n <tr *ngFor=\"let item of data | paginate: config; let i = index\">\n <td *ngFor=\"let column of columns\">\n {{ item[column.prop] }}\n </td>\n <td *ngIf=\"showActionColumn\">\n <div class=\"d-flex justify-content-center\">\n <button *ngIf=\"onEditTable.observers.length > 0\" (click)=\"handleAction('edit', item, i)\" class=\"btn btn-sm btn-primary mx-1\">Edit</button>\n <button *ngIf=\"onDeleteTable.observers.length > 0\" (click)=\"handleAction('delete', item, i)\" class=\"btn btn-sm btn-danger mx-1\">Delete</button>\n <button *ngIf=\"onViewTable.observers.length > 0\" (click)=\"handleAction('view', item, i)\" class=\"btn btn-sm btn-info mx-1\">View</button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n</div>\n\n<div class=\"text-center\">\n <pagination-controls id=\"bootstrap-table\" (pageChange)=\"onPageChange($event)\" previousLabel=\"Anterior\" nextLabel=\"Pr\u00F3ximo\" [responsive]=\"true\"></pagination-controls>\n</div>\n\n\n<!-- Estilos CSS diretamente no HTML -->\n<style>\n .table thead th {\n background-color: #343a40; /* Tom de cinza escuro */\n color: #fff;\n }\n</style>\n", styles: ["", "\n .table thead th {\n background-color: #343a40; /* Tom de cinza escuro */\n color: #fff;\n }\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i2.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i3$1.PaginationControlsComponent, selector: "pagination-controls", inputs: ["id", "maxSize", "directionLinks", "autoHide", "responsive", "previousLabel", "nextLabel", "screenReaderPaginationLabel", "screenReaderPageLabel", "screenReaderCurrentLabel"], outputs: ["pageChange", "pageBoundsCorrection"] }, { kind: "pipe", type: i3$1.PaginatePipe, name: "paginate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
1542
1348
  }
1543
1349
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: BootstrapTableComponent, decorators: [{
1544
1350
  type: Component,
@@ -1768,15 +1574,14 @@ class ComponentsModule {
1768
1574
  SelectComponent,
1769
1575
  RadioComponent,
1770
1576
  MultiSelectComponent,
1771
- CalendarComponent,
1772
- DatePickerComponent,
1773
- DateTimePickerComponent,
1774
1577
  BootstrapTableComponent,
1775
1578
  CodeHighlightComponent,
1776
- BadgeComponent], imports: [CommonModule,
1579
+ BadgeComponent,
1580
+ AlertComponent], imports: [CommonModule,
1777
1581
  FormsModule,
1778
1582
  ReactiveFormsModule,
1779
- NgSelectModule, i3.FlatpickrModule, NgxPaginationModule], exports: [ButtonComponent,
1583
+ NgSelectModule,
1584
+ NgxPaginationModule], exports: [ButtonComponent,
1780
1585
  CardComponent,
1781
1586
  FormComponent,
1782
1587
  InputComponent,
@@ -1788,17 +1593,14 @@ class ComponentsModule {
1788
1593
  FormsModule,
1789
1594
  ReactiveFormsModule,
1790
1595
  NgSelectModule,
1791
- CalendarComponent,
1792
- DatePickerComponent,
1793
- DateTimePickerComponent,
1794
1596
  BootstrapTableComponent,
1795
1597
  CodeHighlightComponent,
1796
- BadgeComponent] }); }
1598
+ BadgeComponent,
1599
+ AlertComponent] }); }
1797
1600
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ComponentsModule, imports: [CommonModule,
1798
1601
  FormsModule,
1799
1602
  ReactiveFormsModule,
1800
1603
  NgSelectModule,
1801
- FlatpickrModule.forRoot(),
1802
1604
  NgxPaginationModule, FormsModule,
1803
1605
  ReactiveFormsModule,
1804
1606
  NgSelectModule] }); }
@@ -1816,20 +1618,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1816
1618
  SelectComponent,
1817
1619
  RadioComponent,
1818
1620
  MultiSelectComponent,
1819
- CalendarComponent,
1820
- DatePickerComponent,
1821
- DateTimePickerComponent,
1822
1621
  BootstrapTableComponent,
1823
1622
  CodeHighlightComponent,
1824
- BadgeComponent
1623
+ BadgeComponent,
1624
+ AlertComponent,
1825
1625
  ],
1826
1626
  imports: [
1827
1627
  CommonModule,
1828
1628
  FormsModule,
1829
1629
  ReactiveFormsModule,
1830
1630
  NgSelectModule,
1831
- FlatpickrModule.forRoot(),
1832
- NgxPaginationModule
1631
+ NgxPaginationModule,
1833
1632
  ],
1834
1633
  exports: [
1835
1634
  ButtonComponent,
@@ -1844,20 +1643,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1844
1643
  FormsModule,
1845
1644
  ReactiveFormsModule,
1846
1645
  NgSelectModule,
1847
- CalendarComponent,
1848
- DatePickerComponent,
1849
- DateTimePickerComponent,
1850
1646
  BootstrapTableComponent,
1851
1647
  CodeHighlightComponent,
1852
- BadgeComponent
1853
- ]
1648
+ BadgeComponent,
1649
+ AlertComponent,
1650
+ ],
1854
1651
  }]
1855
1652
  }] });
1856
1653
 
1654
+ class NotificationService {
1655
+ constructor(appRef, injector) {
1656
+ this.appRef = appRef;
1657
+ this.injector = injector;
1658
+ this.alertsSubject = new Subject();
1659
+ this.alerts$ = this.alertsSubject.asObservable();
1660
+ }
1661
+ showAlert(type, title, message) {
1662
+ const alert = { type, title, message };
1663
+ this.alertsSubject.next(alert);
1664
+ // Create the alert component dynamically
1665
+ const componentRef = createComponent(AlertComponent, { environmentInjector: this.appRef.injector });
1666
+ componentRef.instance.alerts = [alert];
1667
+ this.appRef.attachView(componentRef.hostView);
1668
+ const domElem = componentRef.hostView.rootNodes[0];
1669
+ document.body.appendChild(domElem);
1670
+ }
1671
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NotificationService, deps: [{ token: i0.ApplicationRef }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
1672
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NotificationService, providedIn: 'root' }); }
1673
+ }
1674
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: NotificationService, decorators: [{
1675
+ type: Injectable,
1676
+ args: [{
1677
+ providedIn: 'root'
1678
+ }]
1679
+ }], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i0.Injector }]; } });
1680
+
1857
1681
  class LibPortalAngularModule {
1858
1682
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LibPortalAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1859
1683
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.2.12", ngImport: i0, type: LibPortalAngularModule, imports: [ComponentsModule], exports: [ComponentsModule] }); }
1860
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LibPortalAngularModule, imports: [ComponentsModule, ComponentsModule] }); }
1684
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LibPortalAngularModule, providers: [
1685
+ NotificationService
1686
+ ], imports: [ComponentsModule, ComponentsModule] }); }
1861
1687
  }
1862
1688
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: LibPortalAngularModule, decorators: [{
1863
1689
  type: NgModule,
@@ -1866,8 +1692,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1866
1692
  ComponentsModule,
1867
1693
  ],
1868
1694
  exports: [
1869
- ComponentsModule
1870
- ]
1695
+ ComponentsModule,
1696
+ ],
1697
+ providers: [
1698
+ NotificationService
1699
+ ],
1871
1700
  }]
1872
1701
  }] });
1873
1702
 
@@ -1883,5 +1712,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImpo
1883
1712
  * Generated bundle index. Do not edit.
1884
1713
  */
1885
1714
 
1886
- export { BadgeComponent, BootstrapTableComponent, ButtonClasses, ButtonComponent, CalendarComponent, CardComponent, CheckboxComponent, CodeHighlightComponent, ComponentsModule, DatePickerComponent, DateTimePickerComponent, FormComponent, InputComponent, LibPortalAngularModule, MultiSelectComponent, RadioComponent, SelectComponent, TextareaComponent };
1715
+ export { AlertComponent, BadgeComponent, BootstrapTableComponent, ButtonClasses, ButtonComponent, CardComponent, CheckboxComponent, CodeHighlightComponent, ComponentsModule, FormComponent, InputComponent, LibPortalAngularModule, MultiSelectComponent, NotificationService, RadioComponent, SelectComponent, TextareaComponent };
1887
1716
  //# sourceMappingURL=lib-portal-angular.mjs.map