form-dynamic-ajax 7.0.3 → 7.0.4

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.
@@ -0,0 +1,318 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
3
+ import * as i1 from '@ngx-translate/core';
4
+ import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
5
+ import * as i2 from '@angular/forms';
6
+ import { ReactiveFormsModule } from '@angular/forms';
7
+ import * as i3 from 'primeng/inputmask';
8
+ import { InputMaskModule } from 'primeng/inputmask';
9
+ import * as i4 from 'primeng/api';
10
+ import * as i5 from 'primeng/inputnumber';
11
+ import { InputNumberModule } from 'primeng/inputnumber';
12
+ import * as i6 from 'primeng/password';
13
+ import { PasswordModule } from 'primeng/password';
14
+ import * as i7 from 'primeng/button';
15
+ import { ButtonModule } from 'primeng/button';
16
+ import * as i8 from 'primeng/table';
17
+ import { TableModule } from 'primeng/table';
18
+ import * as i9 from 'primeng/multiselect';
19
+ import { MultiSelectModule } from 'primeng/multiselect';
20
+ import * as i10 from '@angular/common';
21
+ import { CommonModule } from '@angular/common';
22
+ import * as i11 from 'primeng/selectbutton';
23
+ import { SelectButtonModule } from 'primeng/selectbutton';
24
+ import * as i12 from 'primeng/inputswitch';
25
+ import { InputSwitchModule } from 'primeng/inputswitch';
26
+ import * as i13 from 'primeng/checkbox';
27
+ import { CheckboxModule } from 'primeng/checkbox';
28
+ import * as i14 from 'primeng/inputtextarea';
29
+ import { InputTextareaModule } from 'primeng/inputtextarea';
30
+ import * as i15 from 'primeng/inputtext';
31
+ import { InputTextModule } from 'primeng/inputtext';
32
+ import * as i16 from 'primeng/divider';
33
+ import { DividerModule } from 'primeng/divider';
34
+ import * as i17 from 'primeng/calendar';
35
+ import { CalendarModule } from 'primeng/calendar';
36
+ import * as i18 from 'primeng/dropdown';
37
+ import { DropdownModule } from 'primeng/dropdown';
38
+ import * as i19 from 'primeng/treeselect';
39
+ import { TreeSelectModule } from 'primeng/treeselect';
40
+ import * as i20 from 'primeng/radiobutton';
41
+ import { RadioButtonModule } from 'primeng/radiobutton';
42
+ import * as i21 from 'primeng/autocomplete';
43
+ import { AutoCompleteModule } from 'primeng/autocomplete';
44
+ import * as i22 from 'primeng/overlaypanel';
45
+ import { OverlayPanelModule } from 'primeng/overlaypanel';
46
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
47
+ import { HttpClientModule, HttpClient } from '@angular/common/http';
48
+ import { FileUploadModule } from 'primeng/fileupload';
49
+
50
+ class FormDynamicAngularComponent {
51
+ constructor(translate, formBuilder) {
52
+ this.translate = translate;
53
+ this.formBuilder = formBuilder;
54
+ this.validateForm = false;
55
+ this.form = [];
56
+ this.files = [];
57
+ this.filesView = [];
58
+ this.filteredAutoComplete = [];
59
+ this.toBase64 = async (file) => {
60
+ return new Promise((resolve, _) => {
61
+ const reader = new FileReader();
62
+ reader.onloadend = () => resolve(reader.result);
63
+ reader.readAsDataURL(file);
64
+ });
65
+ };
66
+ this.control = this.formBuilder.group({});
67
+ }
68
+ ngOnInit() {
69
+ this.files.map(f => {
70
+ this.filesView.push({ ...f, type: f.contentType });
71
+ });
72
+ if (window.location.protocol === "https") {
73
+ navigator.mediaDevices.getUserMedia({ video: true })
74
+ .then(function (mediaStream) {
75
+ const video = document.querySelector('#video');
76
+ if (video) {
77
+ video.srcObject = mediaStream;
78
+ video.play();
79
+ }
80
+ })
81
+ .catch(function (err) { });
82
+ }
83
+ }
84
+ numberOfMonthsDate(numberOfMonthsDate) {
85
+ return numberOfMonthsDate ?? 1;
86
+ }
87
+ selectionMode(selectionMode) {
88
+ return selectionMode ?? "single";
89
+ }
90
+ async capturePhoto(fileName) {
91
+ const canvas = document.querySelector("#canvas");
92
+ const icon = document.querySelector("#icon-remove");
93
+ const video = document.querySelector('#video');
94
+ const button = document.querySelector('#button');
95
+ if (canvas && video) {
96
+ canvas.height = video.videoHeight;
97
+ canvas.width = video.videoWidth;
98
+ const context = canvas.getContext('2d');
99
+ if (context && icon && button) {
100
+ context.drawImage(video, 0, 0);
101
+ video.style.display = "none";
102
+ button.disabled = true;
103
+ canvas.style.display = "block";
104
+ icon.style.visibility = "visible";
105
+ let aux = {
106
+ name: "photo user",
107
+ contentType: "image/png",
108
+ content: canvas.toDataURL("image/png")
109
+ };
110
+ this.control.get(fileName)?.setValue(aux);
111
+ }
112
+ }
113
+ }
114
+ removePhoto() {
115
+ const canvas = document.querySelector("#canvas");
116
+ const icon = document.querySelector("#icon-remove");
117
+ const video = document.querySelector('#video');
118
+ const button = document.querySelector('#button');
119
+ if (canvas && video) {
120
+ const context = canvas.getContext('2d');
121
+ if (context && icon && button) {
122
+ video.style.display = "block";
123
+ button.disabled = false;
124
+ canvas.style.display = "none";
125
+ icon.style.visibility = "collapse";
126
+ }
127
+ }
128
+ }
129
+ getUrl(file) {
130
+ return window.URL.createObjectURL(file);
131
+ }
132
+ async onSelectFile(fileName, event, multiple) {
133
+ const file = event.target.files;
134
+ // if (!multiple) {
135
+ // this.filesView = [];
136
+ // }
137
+ this.filesView.push(...file);
138
+ const newFIles = file;
139
+ let arr = [];
140
+ for (const item of newFIles) {
141
+ let aux = {
142
+ name: item.name,
143
+ contentType: item?.type,
144
+ content: await this.toBase64(item)
145
+ };
146
+ arr.push(aux);
147
+ }
148
+ this.control.get(fileName)?.setValue(arr);
149
+ }
150
+ onRemove(event, fileName) {
151
+ this.filesView.splice(this.filesView.indexOf(event), 1);
152
+ var input = document.getElementById('fileInput');
153
+ if (input) {
154
+ input.value = '';
155
+ }
156
+ }
157
+ filterAutoComplete(event, suggestionsAutoComplete) {
158
+ let filtered = [];
159
+ let query = event.query;
160
+ if (suggestionsAutoComplete) {
161
+ for (let i = 0; i < suggestionsAutoComplete.length; i++) {
162
+ let dados = suggestionsAutoComplete[i];
163
+ if (dados.description.toLowerCase().normalize('NFD').replace(/\p{M}/ug, '').indexOf(query.toLowerCase().normalize('NFD').replace(/\p{M}/ug, '')) != -1) {
164
+ filtered.push(dados);
165
+ }
166
+ }
167
+ this.filteredAutoComplete = filtered;
168
+ }
169
+ }
170
+ onChange(change) {
171
+ if (change) {
172
+ change();
173
+ }
174
+ }
175
+ clickCLear(clear) {
176
+ if (clear) {
177
+ clear();
178
+ }
179
+ }
180
+ onBlur(blur) {
181
+ if (blur) {
182
+ blur();
183
+ }
184
+ }
185
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularComponent, deps: [{ token: i1.TranslateService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
186
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: FormDynamicAngularComponent, selector: "form-dynamic-angular", inputs: { title: "title", subTitle: "subTitle", validateForm: "validateForm", form: "form", control: "control", buttonsStandard: "buttonsStandard", buttonsOptional: "buttonsOptional", files: "files" }, ngImport: i0, template: "<div>\r\n <div *ngIf=\"title\" class=\"div-title\">\r\n <span translate={{title}}></span>\r\n <div *ngIf=\"subTitle\" class=\"flex subtitle\">\r\n <span translate={{subTitle}}></span>\r\n </div>\r\n <p-divider></p-divider>\r\n </div>\r\n <form *ngIf=\"control\" [formGroup]=\"control\">\r\n <div class=\"grid\">\r\n <div *ngFor=\"let item of form\" class=\"{{item.col}} col-12\">\r\n <label *ngIf=\"item.label && !item.hideLabelTop\">{{item.label}}</label>\r\n <label *ngIf=\"item.required && item.label\" class=\"danger-text ml-2\">*</label>\r\n\r\n <div class=\"mt-2\">\r\n <!-- text -->\r\n <input id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" pInputText placeholder={{item.placeholder}} *ngIf=\"item.type == 'text' || item.type == 'number' \"\r\n type={{item.type}} formControlName={{item.formControl}} class=\"w-full\" />\r\n\r\n <!-- select -->\r\n <p-dropdown id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" [filter]=item.search emptyFilterMessage=\"Nenhum dado encontrado\"\r\n emptyMessage=\"Nenhum dado encontrado\" placeholder={{item.placeholder}} styleClass=\"w-full p-0\"\r\n (onChange)=\"onChange(item.onChange)\" *ngIf=\"item.type === 'select'\" [showClear]=\"true\"\r\n [options]=\"item.options\" formControlName={{item.formControl}} optionLabel=\"description\"\r\n (onClear)=\"clickCLear(item.onCLear)\"></p-dropdown>\r\n\r\n <!-- currency -->\r\n <p-inputNumber id={{item.id}} *ngIf=\"item.type === 'currency'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} placeholder={{item.placeholder}} inputStyleClass=\"w-full\"\r\n styleClass=\"w-full\" (onKeyDown)=\"onChange(item.onChange)\" mode=\"currency\" [min]=\"0\"\r\n currency=\"BRL\">\r\n </p-inputNumber>\r\n\r\n <!-- mask -->\r\n <p-inputMask id={{item.id}} *ngIf=\"item.type === 'mask'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} placeholder={{item.placeholder}} styleClass=\"w-full\"\r\n (onComplete)=\"onChange(item.onChange)\" mask={{item.mask}} unmask={{item.unmask}}\r\n (onClear)=\"clickCLear(item.onCLear)\" showClear=\"true\"></p-inputMask>\r\n\r\n <!-- treeSelect -->\r\n <p-treeSelect id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} (onNodeSelect)=\"onChange(item.onChange)\"\r\n *ngIf=\"item.type === 'tree-select'\" containerStyleClass=\"w-full p-0\"\r\n formControlName={{item.formControl}} [options]=\"item.treeSelectOptions\" [filter]=\"true\"\r\n [filterInputAutoFocus]=\"true\" emptyMessage=\"Nenhum dado encontrado\" [showClear]=\"true\"\r\n (onClear)=\"clickCLear(item.onCLear)\"></p-treeSelect>\r\n\r\n <!-- autoComplete -->\r\n <p-autoComplete inputId={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} styleClass=\"w-full p-0\" [inputStyle]=\"{'width':'100%'}\"\r\n *ngIf=\"item.type === 'autocomplete'\" (onSelect)=\" onChange(item.onChange)\"\r\n formControlName={{item.formControl}} [suggestions]=\"filteredAutoComplete\"\r\n (completeMethod)=\"filterAutoComplete($event, item.options)\" [forceSelection]=\"false\"\r\n [showEmptyMessage]=\"true\" emptyMessage=\"Nenhum dado encontrado\" dataKey=\"code\"\r\n field=\"description\" showClear=true (onClear)=\"clickCLear(item.onCLear)\"></p-autoComplete>\r\n\r\n <!-- date -->\r\n <p-calendar id={{item.id}} view=\"{{item.viewDate}}\" *ngIf=\"item.type === 'date'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} styleClass=\"w-full\"\r\n [numberOfMonths]=numberOfMonthsDate(item.numberOfMonthsDate)\r\n [selectionMode]=selectionMode(item.selectionMode) (onFocus)=\"onChange(item.onFocusDate)\"\r\n [maxDate]=\"item.maxDate\" [minDate]=\"item.minDate\" dateFormat=\"{{item.dateFormat}}\"\r\n (onSelect)=\"onChange(item.onChange)\" [iconDisplay]=\"'input'\" placeholder={{item.placeholder}}\r\n [showIcon]=\"true\" [showTime]=\"item.showTime\" [timeOnly]=\"item.timeOnly\"></p-calendar>\r\n\r\n <!-- textarea -->\r\n <div *ngIf=\"item.type === 'text-area'\" class=\"text-right\">\r\n <textarea id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} class=\"w-full\" maxlength=\"{{item.maxlength}}\"\r\n counterTemplate=\"{1} of 50, {0} remaining\" counter=\"display\"\r\n (attr.change)=\"onChange(item.onChange)\" pInputTextarea formControlName={{item.formControl}}\r\n rows={{item.rowsTextArea}}></textarea>\r\n <small *ngIf=\"item.maxlength\" id=\"username-help\">\r\n {{control.controls[item.formControl].value.length}}/{{item.maxlength}}\r\n </small>\r\n </div>\r\n\r\n <!-- checkbox -->\r\n <div *ngIf=\"item.type == 'check-box'\">\r\n <p-checkbox id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" (onChange)=\"onChange(item.onChange)\" binary=\"true\" formControlName={{item.formControl}}\r\n value={{item.formControl}} label={{item.label}}></p-checkbox>\r\n </div>\r\n\r\n <!-- checkbox multiple -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'check-box-multi'\" class=\"flex gap-3\">\r\n <div formArrayName=\"{{item.formControl}}\" *ngFor=\"let list of item.options; let i = index\"\r\n class=\"flex align-items-center gap-2\">\r\n <div [formGroupName]=\"i\">\r\n <p-checkbox id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" (onChange)=\"onChange(item.onChange)\" binary=\"true\" formControlName=\"{{list.code}}\"\r\n label={{list.description}}></p-checkbox>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- button -->\r\n <p-button id={{item.id}} *ngIf=\"item.type == 'button'\" styleClass='{{item.buttonClass}} w-full mt-3'\r\n (click)=\"item.onCLick()\" [disabled]=item.disabled icon={{item.iconButton}}\r\n label={{item.label}}></p-button>\r\n\r\n <!-- can -->\r\n <div id={{item.id}} class=\"area\" *ngIf=\"item.type == 'can'\">\r\n <video autoplay=\"true\" id=\"webCamera\">\r\n </video>\r\n\r\n <input type=\"text\" id=\"base_img\" name=\"base_img\">\r\n <button type=\"button\" onclick=\"takeSnapShot()\">Tirar foto e salvar</button>\r\n\r\n <img id=\"imagemConvertida\">\r\n <p id=\"caminhoImagem\" class=\"caminho-imagem\"><a href=\"\" target=\"_blank\" rel=\"noopener\"></a></p>\r\n <script src=\"script.js\"></script>\r\n </div>\r\n\r\n <!-- upload files -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'upload-files' && !item.disabled \" class=\"drag-image\"\r\n [style.border]=\"validateForm && control.controls[item.formControl].errors ? ' 1px dashed #f18282' : ' 1px dashed #d1d5db'\">\r\n <i *ngIf=\"filesView.length === 0\" class=\"pi pi-cloud-upload\"></i>\r\n <p *ngIf=\"filesView.length === 0\">Clique ou arraste e solte um arquivo para anexar</p>\r\n <span *ngIf=\"filesView.length === 0\">{{item.msgAcceptFiles}}</span>\r\n <input id=\"fileInput\" type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event, item.multileFile)\" />\r\n <div *ngFor=\"let f of filesView\">\r\n <div *ngIf=\"f.type && f.type.includes('image')\">\r\n <label class=\"preview-img\">\r\n <img *ngIf=\"!f.content\" src='{{getUrl(f)}}'>\r\n <img *ngIf=\"f.content\" src='{{f.content}}'>\r\n <span *ngIf=\"item.viewNameFile\">{{ f.name }}</span>\r\n <input type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event,item.multileFile)\" />\r\n <label> <i class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(item.formControl, f)\"></i></label>\r\n </label>\r\n </div>\r\n <div *ngIf=\"f.type && !f.type.includes('image')\">\r\n <label class=\"preview-img h-0 max-w-0 mh-75 m-0\">\r\n <label class=\"mr-3\">{{ f.name }}</label>\r\n <input type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event,item.multileFile)\" />\r\n <label> <i class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(f)\"></i></label>\r\n\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- upload files disabled -->\r\n <!-- <p-fileUpload mode=\"basic\" formControlName=\"{{item.formControl}}\" chooseLabel=\"Choose\"\r\n chooseIcon=\"pi pi-upload\" accept=\"image/*\" maxFileSize=\"1000000\" /> -->\r\n\r\n <div id={{item.id}} *ngIf=\"item.type === 'upload-files' && item.disabled \">\r\n <p-button (click)=\"op.toggle($event)\" icon=\"pi pi-paperclip\"\r\n label=\"Arquivos anexados\"></p-button>\r\n\r\n <p-overlayPanel #op [style]=\"{'width': '450px'}\" [showCloseIcon]=\"true\">\r\n <ng-template pTemplate=\"content\">\r\n <p-table *ngIf=\"files.length > 0\" [value]=\"files\" selectionMode=\"single\"\r\n [(selection)]=\"selectedProduct\" (onRowSelect)=\"onRowSelect($event, op)\"\r\n responsiveLayout=\"scroll\">\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th pSortableColumn=\"name\">Nome<p-sortIcon field=\"name\"></p-sortIcon></th>\r\n <th></th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-file>\r\n <tr>\r\n <td *ngIf=\"item.viewNameFile\">{{file.name}}</td>\r\n <td> <p-button *ngIf=\"item.onCLick\" icon=\"pi pi-download\"\r\n (click)='item.onCLick(file)'></p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div *ngIf=\"files.length === 0\" class=\"p-10\">\r\n <label>Nenhum arquivo anexado</label>\r\n </div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n </div>\r\n\r\n <!-- list -->\r\n <ul id={{item.id}} *ngIf=\"item.type === 'list' && item.options\">\r\n <li *ngFor=\"let list of item.options\">{{list.description}}</li>\r\n </ul>\r\n\r\n <!-- multi -->\r\n <p-multiSelect id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} *ngIf=\"item.type === 'multi'\" [options]=\"item.options\"\r\n formControlName={{item.formControl}} styleClass=\"p-0 w-full\" optionLabel=\"description\"\r\n (onChange)=\"onChange(item.onChange)\" maxSelectedLabels=\"100\"></p-multiSelect>\r\n\r\n <!-- radioButton -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'radio-button'\" class=\"flex gap-3\">\r\n <div *ngFor=\"let listRadioButton of item.options\" class=\"flex align-items-center gap-2\">\r\n <p-radioButton [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" [value]=\"listRadioButton.code\" formControlName={{item.formControl}}\r\n (onClick)=\"onChange(item.onChange)\"></p-radioButton>\r\n <label>{{listRadioButton.description}}</label>\r\n </div>\r\n @if(control.controls[item.formControl].value == 'other'){\r\n <input pInputText type=\"text\" formControlName={{item.formControlOther}} />\r\n }\r\n </div>\r\n\r\n <!-- selectButton -->\r\n <div class=\"d-flex\" *ngIf=\"item.type === 'select-button'\">\r\n <p-selectButton id={{item.id}} (onChange)=\"onChange(item.onChange)\" [options]=\"item.options\"\r\n formControlName={{item.formControl}} optionValue=\"code\">\r\n <ng-template let-item>\r\n <span>{{item.description}}</span>\r\n </ng-template>\r\n </p-selectButton>\r\n <!-- <input type=\"text\" pInputText [attr.disabled]=\"item.disabled\"\r\n formControlName={{item.formControlSecondary}}> -->\r\n </div>\r\n\r\n <!-- table -->\r\n <p-table id={{item.id}} *ngIf=\"item.type === 'table'\" [scrollable]=\"true\"\r\n scrollHeight={{item.scrollHeight}} [columns]=item.colsTable\r\n styleClass=\"p-datatable-striped p-datatable-sm\" [value]=item.rowsTable>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngFor=\"let col of columns\">\r\n <span *ngIf=\"col.filed !== 'action'\">{{ col.header }}</span>\r\n <span *ngIf=\"col.filed === 'action'\">A\u00E7\u00E3o</span>\r\n </th>\r\n\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n <tr>\r\n <td *ngFor=\"let col of columns\">\r\n <div *ngIf=\"col.field !== 'button'\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n <div *ngIf=\"col.field === 'action'\">\r\n <p-button *ngFor=\"let action of item.buttonsTable\"\r\n styleClass={{action.styleClass}} label={{action.label}}\r\n (click)=\"action.onCLick(rowData)\" icon={{action.icon}}></p-button>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" let-columns>\r\n <tr *ngFor=\"let footer of item.rowsFooter\">\r\n <td colspan=12><span class=\"font-normal\">{{footer.text}}:</span> {{footer.value}}</td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- inputSwitch -->\r\n <div class=\"d-flex\" *ngIf=\"item.type === 'switch'\">\r\n <p-inputSwitch id={{item.id}} formControlName={{item.formControl}} class=\"mr-10\"\r\n (onChange)=\"onChange(item.onChange)\"></p-inputSwitch>\r\n <p translate={{item.label}}></p>\r\n </div>\r\n\r\n <!-- password -->\r\n <p-password id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} *ngIf=\"item.type === 'password'\" [feedback]=\"false\"\r\n formControlName={{item.formControl}} (onChange)=\"onChange(item.onChange)\" styleClass=\"w-full\"\r\n [toggleMask]=\"true\"></p-password>\r\n\r\n <!-- photo -->\r\n <div id={{item.id}} class=\"camera\" *ngIf=\"item.type === 'photo'\">\r\n <video id=\"video\" class=\"foto\" autoplay>V\u00EDdeo n\u00E3o dispon\u00EDvel.</video>\r\n <canvas id=\"canvas\" class=\"foto\" style=\"display: none;\"></canvas>\r\n <button pButton icon=\"pi pi-times\" class=\"remove-file\" id=\"icon-remove\" [rounded]=\"true\"\r\n style=\"visibility: collapse;\" (click)=\"removePhoto()\"></button>\r\n <button pButton icon=\"pi pi-camera\" [rounded]=\"true\" (click)=\"capturePhoto(item.formControl)\"\r\n id=\"button\"></button>\r\n </div>\r\n\r\n <!-- likert -->\r\n <p-table id={{item.id}} *ngIf=\"item.type === 'likert'\" [scrollable]=\"true\"\r\n scrollHeight={{item.scrollHeight}} [columns]=item.colsTable\r\n styleClass=\"p-datatable-striped p-datatable-sm\" [value]=item.rowsTable>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th style=\"width: 4rem\"></th>\r\n <th *ngFor=\"let col of columns\">\r\n <span>{{ col.header }}</span>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\" let-columns=\"columns\"\r\n formArrayName=\"{{item.formControl}}\">\r\n <tr>\r\n <td>\r\n {{row}}\r\n </td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td [formGroupName]=\"rowIndex\">\r\n <p-radioButton value=\"{{columns[index].field}}+{{row}}\"\r\n formControlName=\"question{{rowIndex}}\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- editable table -->\r\n <p-table\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'editable-table'\"\r\n [scrollable]=\"true\"\r\n scrollHeight=\"{{ item.scrollHeight }}\"\r\n [columns]=\"item.colsTable\"\r\n styleClass=\"p-datatable-striped p-datatable-sm\"\r\n [value]=\"item.rowsTable\"\r\n editMode=\"cell\">\r\n\r\n <!-- Cabe\u00E7alho da tabela -->\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th></th>\r\n <th *ngFor=\"let col of columns\">\r\n <span>{{ col.header }}</span>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Corpo da tabela -->\r\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\" let-columns=\"columns\"\r\n formArrayName=\"{{ item.formControl }}\" let-editing=\"editing\">\r\n <tr>\r\n <td>{{ row }}</td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td [formGroupName]=\"rowIndex\" [pEditableColumn]=\"row\" pEditableColumnField=\"row\">\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <input class=\"w-full\" pInputText type=\"text\" formControlName=\"_{{control.field}}question{{ rowIndex }}\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <input class=\"w-full\" pInputText type=\"text\" formControlName=\"_{{control.field}}question{{ rowIndex }}\" />\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n\r\n <!-- valida\u00E7\u00E3o de item -->\r\n <div>\r\n <small class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['required']\">\r\n Campo obrigat\u00F3rio\r\n </small>\r\n <small class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['email']\">\r\n Email inv\u00E1lido\r\n </small>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <p-divider\r\n *ngIf=\"(buttonsStandard && buttonsStandard.length > 0) || (buttonsOptional && buttonsOptional.length > 0)\"></p-divider>\r\n\r\n <div class=\"buttons-form\">\r\n <div *ngFor=\"let button of buttonsStandard\">\r\n <p-button *ngIf=\"button.type === 'clean'\" styleClass=\"p-button-warning {{button.styleClass}}\"\r\n label=\"Limpar\" (click)=\"button.onCLick()\" icon=\"pi pi-times\"></p-button>\r\n <p-button *ngIf=\"button.type === 'filter'\" styleClass=\"{{button.styleClass}}\" label=\"Filtrar\"\r\n (click)=\"button.onCLick()\" icon=\"pi pi-search\"></p-button>\r\n <p-button *ngIf=\"button.type === 'save'\" styleClass=\"p-button-success {{button.styleClass}}\"\r\n label=\"Salvar\" (click)=\"button.onCLick()\" icon=\"pi pi-save\"></p-button>\r\n <p-button *ngIf=\"button.type === 'cancel'\" styleClass=\"p-button-danger {{button.styleClass}}\"\r\n label=\"Cancelar\" (click)=\"button.onCLick()\" icon=\"pi pi-times\"></p-button>\r\n </div>\r\n <div *ngFor=\"let button of buttonsOptional\">\r\n <p-button styleClass={{button.styleClass}} label={{button.label}} (click)=\" button.onCLick()\"\r\n icon={{button.icon}}></p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [".div-title span{font-size:20px;font-weight:500}.buttons-form{display:flex;gap:10px;justify-content:flex-end}.danger-text{color:#f18282}.drag-image{height:auto;width:100%;border-radius:10px;font-weight:400;display:flex;align-items:center;flex-direction:column;top:20px;max-height:250px;color:#000;padding:20px;text-align:center;overflow:auto}.drag-image h6{font-size:20px}.drag-image .file-name{font-size:14px}.drag-image i{font-size:3rem}.subtitle span{font-size:14px;margin-right:5px}.subtitle{align-items:baseline}.mh-75{min-height:75px!important}input[type=file]{position:absolute;width:100%;height:100%;inset:0;opacity:0;cursor:pointer}.preview-img{align-items:center;border-radius:5px;display:flex;height:140px;justify-content:center;margin:10px;max-width:180px;min-height:140px;min-width:180px;padding:0 20px;position:relative}.preview-img span{position:absolute;overflow-wrap:break-word}.remove-file{display:flex;justify-content:center;align-items:center;height:22px;width:22px;top:5px;right:5px;border-radius:50%;background:#bbb;color:#333;cursor:pointer;font-size:.8rem!important}.preview-img img{max-width:100%;opacity:.8}.camera{display:flex;flex-direction:column;align-items:center;position:relative}.foto{max-width:186px;min-height:140px;min-width:180px;border:1px dashed #000;border-radius:5px;margin-bottom:1em}.preview-photo{position:relative}.h-0{height:0}\n"], dependencies: [{ kind: "component", type: i3.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i6.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "disabled", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "appendTo", "toggleMask", "inputStyleClass", "styleClass", "style", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "autocomplete", "placeholder", "showClear"], outputs: ["onFocus", "onBlur", "onClear"] }, { kind: "directive", type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "size", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i8.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i9.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i11.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey"], outputs: ["onOptionClick", "onChange"] }, { kind: "component", type: i12.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "component", type: i13.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i14.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "directive", type: i15.InputText, selector: "[pInputText]" }, { kind: "component", type: i16.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "component", type: i17.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i18.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i19.TreeSelect, selector: "p-treeSelect", inputs: ["inputId", "scrollHeight", "disabled", "metaKeySelection", "display", "selectionMode", "tabindex", "ariaLabel", "ariaLabelledBy", "placeholder", "panelClass", "panelStyle", "panelStyleClass", "containerStyle", "containerStyleClass", "labelStyle", "labelStyleClass", "overlayOptions", "emptyMessage", "appendTo", "filter", "filterBy", "filterMode", "filterPlaceholder", "filterLocale", "filterInputAutoFocus", "propagateSelectionDown", "propagateSelectionUp", "showClear", "resetFilterOnHide", "options", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onNodeExpand", "onNodeCollapse", "onShow", "onHide", "onClear", "onFilter", "onNodeUnselect", "onNodeSelect"] }, { kind: "component", type: i20.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i21.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { 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.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i22.OverlayPanel, selector: "p-overlayPanel", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
187
+ }
188
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularComponent, decorators: [{
189
+ type: Component,
190
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'form-dynamic-angular', template: "<div>\r\n <div *ngIf=\"title\" class=\"div-title\">\r\n <span translate={{title}}></span>\r\n <div *ngIf=\"subTitle\" class=\"flex subtitle\">\r\n <span translate={{subTitle}}></span>\r\n </div>\r\n <p-divider></p-divider>\r\n </div>\r\n <form *ngIf=\"control\" [formGroup]=\"control\">\r\n <div class=\"grid\">\r\n <div *ngFor=\"let item of form\" class=\"{{item.col}} col-12\">\r\n <label *ngIf=\"item.label && !item.hideLabelTop\">{{item.label}}</label>\r\n <label *ngIf=\"item.required && item.label\" class=\"danger-text ml-2\">*</label>\r\n\r\n <div class=\"mt-2\">\r\n <!-- text -->\r\n <input id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" pInputText placeholder={{item.placeholder}} *ngIf=\"item.type == 'text' || item.type == 'number' \"\r\n type={{item.type}} formControlName={{item.formControl}} class=\"w-full\" />\r\n\r\n <!-- select -->\r\n <p-dropdown id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" [filter]=item.search emptyFilterMessage=\"Nenhum dado encontrado\"\r\n emptyMessage=\"Nenhum dado encontrado\" placeholder={{item.placeholder}} styleClass=\"w-full p-0\"\r\n (onChange)=\"onChange(item.onChange)\" *ngIf=\"item.type === 'select'\" [showClear]=\"true\"\r\n [options]=\"item.options\" formControlName={{item.formControl}} optionLabel=\"description\"\r\n (onClear)=\"clickCLear(item.onCLear)\"></p-dropdown>\r\n\r\n <!-- currency -->\r\n <p-inputNumber id={{item.id}} *ngIf=\"item.type === 'currency'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} placeholder={{item.placeholder}} inputStyleClass=\"w-full\"\r\n styleClass=\"w-full\" (onKeyDown)=\"onChange(item.onChange)\" mode=\"currency\" [min]=\"0\"\r\n currency=\"BRL\">\r\n </p-inputNumber>\r\n\r\n <!-- mask -->\r\n <p-inputMask id={{item.id}} *ngIf=\"item.type === 'mask'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} placeholder={{item.placeholder}} styleClass=\"w-full\"\r\n (onComplete)=\"onChange(item.onChange)\" mask={{item.mask}} unmask={{item.unmask}}\r\n (onClear)=\"clickCLear(item.onCLear)\" showClear=\"true\"></p-inputMask>\r\n\r\n <!-- treeSelect -->\r\n <p-treeSelect id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} (onNodeSelect)=\"onChange(item.onChange)\"\r\n *ngIf=\"item.type === 'tree-select'\" containerStyleClass=\"w-full p-0\"\r\n formControlName={{item.formControl}} [options]=\"item.treeSelectOptions\" [filter]=\"true\"\r\n [filterInputAutoFocus]=\"true\" emptyMessage=\"Nenhum dado encontrado\" [showClear]=\"true\"\r\n (onClear)=\"clickCLear(item.onCLear)\"></p-treeSelect>\r\n\r\n <!-- autoComplete -->\r\n <p-autoComplete inputId={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} styleClass=\"w-full p-0\" [inputStyle]=\"{'width':'100%'}\"\r\n *ngIf=\"item.type === 'autocomplete'\" (onSelect)=\" onChange(item.onChange)\"\r\n formControlName={{item.formControl}} [suggestions]=\"filteredAutoComplete\"\r\n (completeMethod)=\"filterAutoComplete($event, item.options)\" [forceSelection]=\"false\"\r\n [showEmptyMessage]=\"true\" emptyMessage=\"Nenhum dado encontrado\" dataKey=\"code\"\r\n field=\"description\" showClear=true (onClear)=\"clickCLear(item.onCLear)\"></p-autoComplete>\r\n\r\n <!-- date -->\r\n <p-calendar id={{item.id}} view=\"{{item.viewDate}}\" *ngIf=\"item.type === 'date'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} styleClass=\"w-full\"\r\n [numberOfMonths]=numberOfMonthsDate(item.numberOfMonthsDate)\r\n [selectionMode]=selectionMode(item.selectionMode) (onFocus)=\"onChange(item.onFocusDate)\"\r\n [maxDate]=\"item.maxDate\" [minDate]=\"item.minDate\" dateFormat=\"{{item.dateFormat}}\"\r\n (onSelect)=\"onChange(item.onChange)\" [iconDisplay]=\"'input'\" placeholder={{item.placeholder}}\r\n [showIcon]=\"true\" [showTime]=\"item.showTime\" [timeOnly]=\"item.timeOnly\"></p-calendar>\r\n\r\n <!-- textarea -->\r\n <div *ngIf=\"item.type === 'text-area'\" class=\"text-right\">\r\n <textarea id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} class=\"w-full\" maxlength=\"{{item.maxlength}}\"\r\n counterTemplate=\"{1} of 50, {0} remaining\" counter=\"display\"\r\n (attr.change)=\"onChange(item.onChange)\" pInputTextarea formControlName={{item.formControl}}\r\n rows={{item.rowsTextArea}}></textarea>\r\n <small *ngIf=\"item.maxlength\" id=\"username-help\">\r\n {{control.controls[item.formControl].value.length}}/{{item.maxlength}}\r\n </small>\r\n </div>\r\n\r\n <!-- checkbox -->\r\n <div *ngIf=\"item.type == 'check-box'\">\r\n <p-checkbox id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" (onChange)=\"onChange(item.onChange)\" binary=\"true\" formControlName={{item.formControl}}\r\n value={{item.formControl}} label={{item.label}}></p-checkbox>\r\n </div>\r\n\r\n <!-- checkbox multiple -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'check-box-multi'\" class=\"flex gap-3\">\r\n <div formArrayName=\"{{item.formControl}}\" *ngFor=\"let list of item.options; let i = index\"\r\n class=\"flex align-items-center gap-2\">\r\n <div [formGroupName]=\"i\">\r\n <p-checkbox id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" (onChange)=\"onChange(item.onChange)\" binary=\"true\" formControlName=\"{{list.code}}\"\r\n label={{list.description}}></p-checkbox>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- button -->\r\n <p-button id={{item.id}} *ngIf=\"item.type == 'button'\" styleClass='{{item.buttonClass}} w-full mt-3'\r\n (click)=\"item.onCLick()\" [disabled]=item.disabled icon={{item.iconButton}}\r\n label={{item.label}}></p-button>\r\n\r\n <!-- can -->\r\n <div id={{item.id}} class=\"area\" *ngIf=\"item.type == 'can'\">\r\n <video autoplay=\"true\" id=\"webCamera\">\r\n </video>\r\n\r\n <input type=\"text\" id=\"base_img\" name=\"base_img\">\r\n <button type=\"button\" onclick=\"takeSnapShot()\">Tirar foto e salvar</button>\r\n\r\n <img id=\"imagemConvertida\">\r\n <p id=\"caminhoImagem\" class=\"caminho-imagem\"><a href=\"\" target=\"_blank\" rel=\"noopener\"></a></p>\r\n <script src=\"script.js\"></script>\r\n </div>\r\n\r\n <!-- upload files -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'upload-files' && !item.disabled \" class=\"drag-image\"\r\n [style.border]=\"validateForm && control.controls[item.formControl].errors ? ' 1px dashed #f18282' : ' 1px dashed #d1d5db'\">\r\n <i *ngIf=\"filesView.length === 0\" class=\"pi pi-cloud-upload\"></i>\r\n <p *ngIf=\"filesView.length === 0\">Clique ou arraste e solte um arquivo para anexar</p>\r\n <span *ngIf=\"filesView.length === 0\">{{item.msgAcceptFiles}}</span>\r\n <input id=\"fileInput\" type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event, item.multileFile)\" />\r\n <div *ngFor=\"let f of filesView\">\r\n <div *ngIf=\"f.type && f.type.includes('image')\">\r\n <label class=\"preview-img\">\r\n <img *ngIf=\"!f.content\" src='{{getUrl(f)}}'>\r\n <img *ngIf=\"f.content\" src='{{f.content}}'>\r\n <span *ngIf=\"item.viewNameFile\">{{ f.name }}</span>\r\n <input type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event,item.multileFile)\" />\r\n <label> <i class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(item.formControl, f)\"></i></label>\r\n </label>\r\n </div>\r\n <div *ngIf=\"f.type && !f.type.includes('image')\">\r\n <label class=\"preview-img h-0 max-w-0 mh-75 m-0\">\r\n <label class=\"mr-3\">{{ f.name }}</label>\r\n <input type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event,item.multileFile)\" />\r\n <label> <i class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(f)\"></i></label>\r\n\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- upload files disabled -->\r\n <!-- <p-fileUpload mode=\"basic\" formControlName=\"{{item.formControl}}\" chooseLabel=\"Choose\"\r\n chooseIcon=\"pi pi-upload\" accept=\"image/*\" maxFileSize=\"1000000\" /> -->\r\n\r\n <div id={{item.id}} *ngIf=\"item.type === 'upload-files' && item.disabled \">\r\n <p-button (click)=\"op.toggle($event)\" icon=\"pi pi-paperclip\"\r\n label=\"Arquivos anexados\"></p-button>\r\n\r\n <p-overlayPanel #op [style]=\"{'width': '450px'}\" [showCloseIcon]=\"true\">\r\n <ng-template pTemplate=\"content\">\r\n <p-table *ngIf=\"files.length > 0\" [value]=\"files\" selectionMode=\"single\"\r\n [(selection)]=\"selectedProduct\" (onRowSelect)=\"onRowSelect($event, op)\"\r\n responsiveLayout=\"scroll\">\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th pSortableColumn=\"name\">Nome<p-sortIcon field=\"name\"></p-sortIcon></th>\r\n <th></th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-file>\r\n <tr>\r\n <td *ngIf=\"item.viewNameFile\">{{file.name}}</td>\r\n <td> <p-button *ngIf=\"item.onCLick\" icon=\"pi pi-download\"\r\n (click)='item.onCLick(file)'></p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div *ngIf=\"files.length === 0\" class=\"p-10\">\r\n <label>Nenhum arquivo anexado</label>\r\n </div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n </div>\r\n\r\n <!-- list -->\r\n <ul id={{item.id}} *ngIf=\"item.type === 'list' && item.options\">\r\n <li *ngFor=\"let list of item.options\">{{list.description}}</li>\r\n </ul>\r\n\r\n <!-- multi -->\r\n <p-multiSelect id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} *ngIf=\"item.type === 'multi'\" [options]=\"item.options\"\r\n formControlName={{item.formControl}} styleClass=\"p-0 w-full\" optionLabel=\"description\"\r\n (onChange)=\"onChange(item.onChange)\" maxSelectedLabels=\"100\"></p-multiSelect>\r\n\r\n <!-- radioButton -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'radio-button'\" class=\"flex gap-3\">\r\n <div *ngFor=\"let listRadioButton of item.options\" class=\"flex align-items-center gap-2\">\r\n <p-radioButton [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" [value]=\"listRadioButton.code\" formControlName={{item.formControl}}\r\n (onClick)=\"onChange(item.onChange)\"></p-radioButton>\r\n <label>{{listRadioButton.description}}</label>\r\n </div>\r\n @if(control.controls[item.formControl].value == 'other'){\r\n <input pInputText type=\"text\" formControlName={{item.formControlOther}} />\r\n }\r\n </div>\r\n\r\n <!-- selectButton -->\r\n <div class=\"d-flex\" *ngIf=\"item.type === 'select-button'\">\r\n <p-selectButton id={{item.id}} (onChange)=\"onChange(item.onChange)\" [options]=\"item.options\"\r\n formControlName={{item.formControl}} optionValue=\"code\">\r\n <ng-template let-item>\r\n <span>{{item.description}}</span>\r\n </ng-template>\r\n </p-selectButton>\r\n <!-- <input type=\"text\" pInputText [attr.disabled]=\"item.disabled\"\r\n formControlName={{item.formControlSecondary}}> -->\r\n </div>\r\n\r\n <!-- table -->\r\n <p-table id={{item.id}} *ngIf=\"item.type === 'table'\" [scrollable]=\"true\"\r\n scrollHeight={{item.scrollHeight}} [columns]=item.colsTable\r\n styleClass=\"p-datatable-striped p-datatable-sm\" [value]=item.rowsTable>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngFor=\"let col of columns\">\r\n <span *ngIf=\"col.filed !== 'action'\">{{ col.header }}</span>\r\n <span *ngIf=\"col.filed === 'action'\">A\u00E7\u00E3o</span>\r\n </th>\r\n\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n <tr>\r\n <td *ngFor=\"let col of columns\">\r\n <div *ngIf=\"col.field !== 'button'\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n <div *ngIf=\"col.field === 'action'\">\r\n <p-button *ngFor=\"let action of item.buttonsTable\"\r\n styleClass={{action.styleClass}} label={{action.label}}\r\n (click)=\"action.onCLick(rowData)\" icon={{action.icon}}></p-button>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" let-columns>\r\n <tr *ngFor=\"let footer of item.rowsFooter\">\r\n <td colspan=12><span class=\"font-normal\">{{footer.text}}:</span> {{footer.value}}</td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- inputSwitch -->\r\n <div class=\"d-flex\" *ngIf=\"item.type === 'switch'\">\r\n <p-inputSwitch id={{item.id}} formControlName={{item.formControl}} class=\"mr-10\"\r\n (onChange)=\"onChange(item.onChange)\"></p-inputSwitch>\r\n <p translate={{item.label}}></p>\r\n </div>\r\n\r\n <!-- password -->\r\n <p-password id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} *ngIf=\"item.type === 'password'\" [feedback]=\"false\"\r\n formControlName={{item.formControl}} (onChange)=\"onChange(item.onChange)\" styleClass=\"w-full\"\r\n [toggleMask]=\"true\"></p-password>\r\n\r\n <!-- photo -->\r\n <div id={{item.id}} class=\"camera\" *ngIf=\"item.type === 'photo'\">\r\n <video id=\"video\" class=\"foto\" autoplay>V\u00EDdeo n\u00E3o dispon\u00EDvel.</video>\r\n <canvas id=\"canvas\" class=\"foto\" style=\"display: none;\"></canvas>\r\n <button pButton icon=\"pi pi-times\" class=\"remove-file\" id=\"icon-remove\" [rounded]=\"true\"\r\n style=\"visibility: collapse;\" (click)=\"removePhoto()\"></button>\r\n <button pButton icon=\"pi pi-camera\" [rounded]=\"true\" (click)=\"capturePhoto(item.formControl)\"\r\n id=\"button\"></button>\r\n </div>\r\n\r\n <!-- likert -->\r\n <p-table id={{item.id}} *ngIf=\"item.type === 'likert'\" [scrollable]=\"true\"\r\n scrollHeight={{item.scrollHeight}} [columns]=item.colsTable\r\n styleClass=\"p-datatable-striped p-datatable-sm\" [value]=item.rowsTable>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th style=\"width: 4rem\"></th>\r\n <th *ngFor=\"let col of columns\">\r\n <span>{{ col.header }}</span>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\" let-columns=\"columns\"\r\n formArrayName=\"{{item.formControl}}\">\r\n <tr>\r\n <td>\r\n {{row}}\r\n </td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td [formGroupName]=\"rowIndex\">\r\n <p-radioButton value=\"{{columns[index].field}}+{{row}}\"\r\n formControlName=\"question{{rowIndex}}\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- editable table -->\r\n <p-table\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'editable-table'\"\r\n [scrollable]=\"true\"\r\n scrollHeight=\"{{ item.scrollHeight }}\"\r\n [columns]=\"item.colsTable\"\r\n styleClass=\"p-datatable-striped p-datatable-sm\"\r\n [value]=\"item.rowsTable\"\r\n editMode=\"cell\">\r\n\r\n <!-- Cabe\u00E7alho da tabela -->\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th></th>\r\n <th *ngFor=\"let col of columns\">\r\n <span>{{ col.header }}</span>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Corpo da tabela -->\r\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\" let-columns=\"columns\"\r\n formArrayName=\"{{ item.formControl }}\" let-editing=\"editing\">\r\n <tr>\r\n <td>{{ row }}</td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td [formGroupName]=\"rowIndex\" [pEditableColumn]=\"row\" pEditableColumnField=\"row\">\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <input class=\"w-full\" pInputText type=\"text\" formControlName=\"_{{control.field}}question{{ rowIndex }}\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <input class=\"w-full\" pInputText type=\"text\" formControlName=\"_{{control.field}}question{{ rowIndex }}\" />\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n\r\n <!-- valida\u00E7\u00E3o de item -->\r\n <div>\r\n <small class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['required']\">\r\n Campo obrigat\u00F3rio\r\n </small>\r\n <small class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['email']\">\r\n Email inv\u00E1lido\r\n </small>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <p-divider\r\n *ngIf=\"(buttonsStandard && buttonsStandard.length > 0) || (buttonsOptional && buttonsOptional.length > 0)\"></p-divider>\r\n\r\n <div class=\"buttons-form\">\r\n <div *ngFor=\"let button of buttonsStandard\">\r\n <p-button *ngIf=\"button.type === 'clean'\" styleClass=\"p-button-warning {{button.styleClass}}\"\r\n label=\"Limpar\" (click)=\"button.onCLick()\" icon=\"pi pi-times\"></p-button>\r\n <p-button *ngIf=\"button.type === 'filter'\" styleClass=\"{{button.styleClass}}\" label=\"Filtrar\"\r\n (click)=\"button.onCLick()\" icon=\"pi pi-search\"></p-button>\r\n <p-button *ngIf=\"button.type === 'save'\" styleClass=\"p-button-success {{button.styleClass}}\"\r\n label=\"Salvar\" (click)=\"button.onCLick()\" icon=\"pi pi-save\"></p-button>\r\n <p-button *ngIf=\"button.type === 'cancel'\" styleClass=\"p-button-danger {{button.styleClass}}\"\r\n label=\"Cancelar\" (click)=\"button.onCLick()\" icon=\"pi pi-times\"></p-button>\r\n </div>\r\n <div *ngFor=\"let button of buttonsOptional\">\r\n <p-button styleClass={{button.styleClass}} label={{button.label}} (click)=\" button.onCLick()\"\r\n icon={{button.icon}}></p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [".div-title span{font-size:20px;font-weight:500}.buttons-form{display:flex;gap:10px;justify-content:flex-end}.danger-text{color:#f18282}.drag-image{height:auto;width:100%;border-radius:10px;font-weight:400;display:flex;align-items:center;flex-direction:column;top:20px;max-height:250px;color:#000;padding:20px;text-align:center;overflow:auto}.drag-image h6{font-size:20px}.drag-image .file-name{font-size:14px}.drag-image i{font-size:3rem}.subtitle span{font-size:14px;margin-right:5px}.subtitle{align-items:baseline}.mh-75{min-height:75px!important}input[type=file]{position:absolute;width:100%;height:100%;inset:0;opacity:0;cursor:pointer}.preview-img{align-items:center;border-radius:5px;display:flex;height:140px;justify-content:center;margin:10px;max-width:180px;min-height:140px;min-width:180px;padding:0 20px;position:relative}.preview-img span{position:absolute;overflow-wrap:break-word}.remove-file{display:flex;justify-content:center;align-items:center;height:22px;width:22px;top:5px;right:5px;border-radius:50%;background:#bbb;color:#333;cursor:pointer;font-size:.8rem!important}.preview-img img{max-width:100%;opacity:.8}.camera{display:flex;flex-direction:column;align-items:center;position:relative}.foto{max-width:186px;min-height:140px;min-width:180px;border:1px dashed #000;border-radius:5px;margin-bottom:1em}.preview-photo{position:relative}.h-0{height:0}\n"] }]
191
+ }], ctorParameters: () => [{ type: i1.TranslateService }, { type: i2.FormBuilder }], propDecorators: { title: [{
192
+ type: Input
193
+ }], subTitle: [{
194
+ type: Input
195
+ }], validateForm: [{
196
+ type: Input
197
+ }], form: [{
198
+ type: Input
199
+ }], control: [{
200
+ type: Input
201
+ }], buttonsStandard: [{
202
+ type: Input
203
+ }], buttonsOptional: [{
204
+ type: Input
205
+ }], files: [{
206
+ type: Input
207
+ }] } });
208
+
209
+ function HttpLoaderFactory(http) {
210
+ return new TranslateHttpLoader(http);
211
+ }
212
+ class FormDynamicAngularModule {
213
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
214
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, declarations: [FormDynamicAngularComponent], imports: [InputMaskModule,
215
+ InputNumberModule,
216
+ PasswordModule,
217
+ ButtonModule,
218
+ TableModule,
219
+ FileUploadModule,
220
+ MultiSelectModule,
221
+ CommonModule,
222
+ SelectButtonModule,
223
+ InputSwitchModule,
224
+ CheckboxModule,
225
+ InputTextareaModule,
226
+ InputTextModule,
227
+ DividerModule,
228
+ CalendarModule,
229
+ DropdownModule,
230
+ TreeSelectModule,
231
+ RadioButtonModule,
232
+ AutoCompleteModule,
233
+ ReactiveFormsModule,
234
+ HttpClientModule,
235
+ OverlayPanelModule, i1.TranslateModule], exports: [FormDynamicAngularComponent] }); }
236
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, imports: [InputMaskModule,
237
+ InputNumberModule,
238
+ PasswordModule,
239
+ ButtonModule,
240
+ TableModule,
241
+ FileUploadModule,
242
+ MultiSelectModule,
243
+ CommonModule,
244
+ SelectButtonModule,
245
+ InputSwitchModule,
246
+ CheckboxModule,
247
+ InputTextareaModule,
248
+ InputTextModule,
249
+ DividerModule,
250
+ CalendarModule,
251
+ DropdownModule,
252
+ TreeSelectModule,
253
+ RadioButtonModule,
254
+ AutoCompleteModule,
255
+ ReactiveFormsModule,
256
+ HttpClientModule,
257
+ OverlayPanelModule,
258
+ TranslateModule.forRoot({
259
+ loader: {
260
+ provide: TranslateLoader,
261
+ useFactory: HttpLoaderFactory,
262
+ deps: [HttpClient]
263
+ },
264
+ })] }); }
265
+ }
266
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, decorators: [{
267
+ type: NgModule,
268
+ args: [{
269
+ declarations: [
270
+ FormDynamicAngularComponent
271
+ ],
272
+ imports: [
273
+ InputMaskModule,
274
+ InputNumberModule,
275
+ PasswordModule,
276
+ ButtonModule,
277
+ TableModule,
278
+ FileUploadModule,
279
+ MultiSelectModule,
280
+ CommonModule,
281
+ SelectButtonModule,
282
+ InputSwitchModule,
283
+ CheckboxModule,
284
+ InputTextareaModule,
285
+ InputTextModule,
286
+ DividerModule,
287
+ CalendarModule,
288
+ DropdownModule,
289
+ TreeSelectModule,
290
+ RadioButtonModule,
291
+ AutoCompleteModule,
292
+ ReactiveFormsModule,
293
+ HttpClientModule,
294
+ OverlayPanelModule,
295
+ TranslateModule.forRoot({
296
+ loader: {
297
+ provide: TranslateLoader,
298
+ useFactory: HttpLoaderFactory,
299
+ deps: [HttpClient]
300
+ },
301
+ })
302
+ ],
303
+ exports: [
304
+ FormDynamicAngularComponent
305
+ ]
306
+ }]
307
+ }] });
308
+
309
+ /*
310
+ * Public API Surface of form-dynamic-angular
311
+ */
312
+
313
+ /**
314
+ * Generated bundle index. Do not edit.
315
+ */
316
+
317
+ export { FormDynamicAngularComponent, FormDynamicAngularModule, HttpLoaderFactory };
318
+ //# sourceMappingURL=form-dynamic-ajax.mjs.map