form-dynamic-ajax 7.0.8 → 8.0.1

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,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, NgModule } from '@angular/core';
2
+ import { Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
3
  import * as i1 from '@ngx-translate/core';
4
4
  import { TranslateModule, TranslateLoader } from '@ngx-translate/core';
5
5
  import * as i2 from '@angular/forms';
@@ -21,32 +21,32 @@ import * as i10 from '@angular/common';
21
21
  import { CommonModule } from '@angular/common';
22
22
  import * as i11 from 'primeng/selectbutton';
23
23
  import { SelectButtonModule } from 'primeng/selectbutton';
24
- import * as i12 from 'primeng/inputswitch';
25
- import { InputSwitchModule } from 'primeng/inputswitch';
24
+ import * as i12 from 'primeng/toggleswitch';
25
+ import { ToggleSwitchModule } from 'primeng/toggleswitch';
26
26
  import * as i13 from 'primeng/checkbox';
27
27
  import { CheckboxModule } from 'primeng/checkbox';
28
- import * as i14 from 'primeng/inputtextarea';
29
- import { InputTextareaModule } from 'primeng/inputtextarea';
28
+ import * as i14 from 'primeng/textarea';
29
+ import { TextareaModule } from 'primeng/textarea';
30
30
  import * as i15 from 'primeng/inputtext';
31
31
  import { InputTextModule } from 'primeng/inputtext';
32
32
  import * as i16 from 'primeng/divider';
33
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';
34
+ import * as i17 from 'primeng/datepicker';
35
+ import { DatePickerModule } from 'primeng/datepicker';
36
+ import * as i18 from 'primeng/select';
37
+ import { SelectModule } from 'primeng/select';
38
38
  import * as i19 from 'primeng/treeselect';
39
39
  import { TreeSelectModule } from 'primeng/treeselect';
40
40
  import * as i20 from 'primeng/radiobutton';
41
41
  import { RadioButtonModule } from 'primeng/radiobutton';
42
42
  import * as i21 from 'primeng/autocomplete';
43
43
  import { AutoCompleteModule } from 'primeng/autocomplete';
44
- import * as i22 from 'primeng/overlaypanel';
45
- import { OverlayPanelModule } from 'primeng/overlaypanel';
44
+ import * as i22 from 'primeng/popover';
45
+ import { PopoverModule } from 'primeng/popover';
46
46
  import * as i23 from 'primeng/editor';
47
47
  import { EditorModule } from 'primeng/editor';
48
48
  import { TranslateHttpLoader } from '@ngx-translate/http-loader';
49
- import { HttpClientModule, HttpClient } from '@angular/common/http';
49
+ import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
50
50
  import { FileUploadModule } from 'primeng/fileupload';
51
51
 
52
52
  class FormDynamicAngularComponent {
@@ -184,12 +184,12 @@ class FormDynamicAngularComponent {
184
184
  blur();
185
185
  }
186
186
  }
187
- 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 }); }
188
- 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\"\r\n >*</label\r\n >\r\n\r\n <div class=\"mt-2\">\r\n <!-- text -->\r\n <input\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n pInputText\r\n placeholder=\"{{ item.placeholder }}\"\r\n *ngIf=\"item.type == 'text' || item.type == 'number'\"\r\n type=\"{{ item.type }}\"\r\n formControlName=\"{{ item.formControl }}\"\r\n class=\"w-full\"\r\n />\r\n\r\n <p-editor\r\n *ngIf=\"item.type == 'editor'\"\r\n formControlName=\"{{ item.formControl }}\"\r\n [style]=\"{ height: '320px' }\"\r\n />\r\n\r\n <!-- select -->\r\n <p-dropdown\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n [filter]=\"item.search\"\r\n emptyFilterMessage=\"Nenhum dado encontrado\"\r\n emptyMessage=\"Nenhum dado encontrado\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n styleClass=\"w-full p-0\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n *ngIf=\"item.type === 'select'\"\r\n [showClear]=\"true\"\r\n [options]=\"item.options\"\r\n formControlName=\"{{ item.formControl }}\"\r\n optionLabel=\"description\"\r\n (onClear)=\"clickCLear(item.onCLear)\"\r\n ></p-dropdown>\r\n\r\n <!-- currency -->\r\n <p-inputNumber\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'currency'\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n inputStyleClass=\"w-full\"\r\n styleClass=\"w-full\"\r\n (onKeyDown)=\"onChange(item.onChange)\"\r\n mode=\"currency\"\r\n [min]=\"0\"\r\n currency=\"BRL\"\r\n >\r\n </p-inputNumber>\r\n\r\n <!-- mask -->\r\n <p-inputMask\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'mask'\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n styleClass=\"w-full\"\r\n (onComplete)=\"onChange(item.onChange)\"\r\n mask=\"{{ item.mask }}\"\r\n unmask=\"{{ item.unmask }}\"\r\n (onClear)=\"clickCLear(item.onCLear)\"\r\n showClear=\"true\"\r\n ></p-inputMask>\r\n\r\n <!-- treeSelect -->\r\n <p-treeSelect\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n (onNodeSelect)=\"onChange(item.onChange)\"\r\n *ngIf=\"item.type === 'tree-select'\"\r\n containerStyleClass=\"w-full p-0\"\r\n formControlName=\"{{ item.formControl }}\"\r\n [options]=\"item.treeSelectOptions\"\r\n [filter]=\"true\"\r\n [filterInputAutoFocus]=\"true\"\r\n emptyMessage=\"Nenhum dado encontrado\"\r\n [showClear]=\"true\"\r\n (onClear)=\"clickCLear(item.onCLear)\"\r\n ></p-treeSelect>\r\n\r\n <!-- autoComplete -->\r\n <p-autoComplete\r\n inputId=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n styleClass=\"w-full p-0\"\r\n [inputStyle]=\"{ width: '100%' }\"\r\n *ngIf=\"item.type === 'autocomplete'\"\r\n (onSelect)=\"onChange(item.onChange)\"\r\n formControlName=\"{{ item.formControl }}\"\r\n [suggestions]=\"filteredAutoComplete\"\r\n (completeMethod)=\"filterAutoComplete($event, item.options)\"\r\n [forceSelection]=\"false\"\r\n [showEmptyMessage]=\"true\"\r\n emptyMessage=\"Nenhum dado encontrado\"\r\n dataKey=\"code\"\r\n field=\"description\"\r\n showClear=\"true\"\r\n (onClear)=\"clickCLear(item.onCLear)\"\r\n ></p-autoComplete>\r\n\r\n <!-- date -->\r\n <p-calendar\r\n id=\"{{ item.id }}\"\r\n view=\"{{ item.viewDate }}\"\r\n *ngIf=\"item.type === 'date'\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\r\n styleClass=\"w-full\"\r\n [numberOfMonths]=\"numberOfMonthsDate(item.numberOfMonthsDate)\"\r\n [selectionMode]=\"selectionMode(item.selectionMode)\"\r\n (onFocus)=\"onChange(item.onFocusDate)\"\r\n [maxDate]=\"item.maxDate\"\r\n [minDate]=\"item.minDate\"\r\n dateFormat=\"{{ item.dateFormat }}\"\r\n (onSelect)=\"onChange(item.onChange)\"\r\n [iconDisplay]=\"'input'\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n [showIcon]=\"true\"\r\n [showTime]=\"item.showTime\"\r\n [timeOnly]=\"item.timeOnly\"\r\n ></p-calendar>\r\n\r\n <!-- textarea -->\r\n <div *ngIf=\"item.type === 'text-area'\" class=\"text-right\">\r\n <textarea\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n class=\"w-full\"\r\n maxlength=\"{{ item.maxlength }}\"\r\n counterTemplate=\"{1} of 50, {0} remaining\"\r\n counter=\"display\"\r\n (attr.change)=\"onChange(item.onChange)\"\r\n pInputTextarea\r\n formControlName=\"{{ item.formControl }}\"\r\n rows=\"{{ item.rowsTextArea }}\"\r\n ></textarea>\r\n <small *ngIf=\"item.maxlength\" id=\"username-help\">\r\n {{ control.controls[item.formControl].value.length }}/{{\r\n item.maxlength\r\n }}\r\n </small>\r\n </div>\r\n\r\n <!-- checkbox -->\r\n <div *ngIf=\"item.type == 'check-box'\">\r\n <p-checkbox\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n binary=\"true\"\r\n formControlName=\"{{ item.formControl }}\"\r\n value=\"{{ item.formControl }}\"\r\n label=\"{{ item.label }}\"\r\n ></p-checkbox>\r\n </div>\r\n\r\n <!-- checkbox multiple -->\r\n <div\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'check-box-multi'\"\r\n class=\"flex gap-3\"\r\n >\r\n <div\r\n formArrayName=\"{{ item.formControl }}\"\r\n *ngFor=\"let list of item.options; let i = index\"\r\n class=\"flex align-items-center gap-2\"\r\n >\r\n <div [formGroupName]=\"i\">\r\n <p-checkbox\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n binary=\"true\"\r\n formControlName=\"{{ list.code }}\"\r\n label=\"{{ list.description }}\"\r\n ></p-checkbox>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button -->\r\n <p-button\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type == 'button'\"\r\n styleClass=\"{{ item.buttonClass }} w-full mt-3\"\r\n (click)=\"item.onCLick()\"\r\n [disabled]=\"item.disabled\"\r\n icon=\"{{ item.iconButton }}\"\r\n label=\"{{ item.label }}\"\r\n ></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\"></video>\r\n\r\n <input type=\"text\" id=\"base_img\" name=\"base_img\" />\r\n <button type=\"button\" onclick=\"takeSnapShot()\">\r\n Tirar foto e salvar\r\n </button>\r\n\r\n <img id=\"imagemConvertida\" />\r\n <p id=\"caminhoImagem\" class=\"caminho-imagem\">\r\n <a href=\"\" target=\"_blank\" rel=\"noopener\"></a>\r\n </p>\r\n <script src=\"script.js\"></script>\r\n </div>\r\n\r\n <!-- upload files -->\r\n <div\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'upload-files' && !item.disabled\"\r\n class=\"drag-image\"\r\n [style.border]=\"\r\n validateForm && control.controls[item.formControl].errors\r\n ? ' 1px dashed #f18282'\r\n : ' 1px dashed #d1d5db'\r\n \"\r\n >\r\n <i *ngIf=\"filesView.length === 0\" class=\"pi pi-cloud-upload\"></i>\r\n <p *ngIf=\"filesView.length === 0\">\r\n Clique ou arraste e solte um arquivo para anexar\r\n </p>\r\n <span *ngIf=\"filesView.length === 0\">{{\r\n item.msgAcceptFiles\r\n }}</span>\r\n <input\r\n id=\"fileInput\"\r\n type=\"file\"\r\n [multiple]=\"item.multileFile\"\r\n [accept]=\"item.acceptFiles\"\r\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\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\r\n type=\"file\"\r\n [multiple]=\"item.multileFile\"\r\n [accept]=\"item.acceptFiles\"\r\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\r\n <label>\r\n <i\r\n class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(item.formControl, f)\"\r\n ></i\r\n ></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\r\n type=\"file\"\r\n [multiple]=\"item.multileFile\"\r\n [accept]=\"item.acceptFiles\"\r\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\r\n <label>\r\n <i\r\n class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(f)\"\r\n ></i\r\n ></label>\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\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'upload-files' && item.disabled\"\r\n >\r\n <p-button\r\n (click)=\"op.toggle($event)\"\r\n icon=\"pi pi-paperclip\"\r\n label=\"Arquivos anexados\"\r\n ></p-button>\r\n\r\n <p-overlayPanel\r\n #op\r\n [style]=\"{ width: '450px' }\"\r\n [showCloseIcon]=\"true\"\r\n >\r\n <ng-template pTemplate=\"content\">\r\n <p-table\r\n *ngIf=\"files.length > 0\"\r\n [value]=\"files\"\r\n selectionMode=\"single\"\r\n [(selection)]=\"selectedProduct\"\r\n (onRowSelect)=\"onRowSelect($event, op)\"\r\n responsiveLayout=\"scroll\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th pSortableColumn=\"name\">\r\n Nome<p-sortIcon field=\"name\"></p-sortIcon>\r\n </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>\r\n <p-button\r\n *ngIf=\"item.onCLick\"\r\n icon=\"pi pi-download\"\r\n (click)=\"item.onCLick(file)\"\r\n ></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\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n *ngIf=\"item.type === 'multi'\"\r\n [options]=\"item.options\"\r\n formControlName=\"{{ item.formControl }}\"\r\n styleClass=\"p-0 w-full\"\r\n optionLabel=\"description\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n maxSelectedLabels=\"100\"\r\n ></p-multiSelect>\r\n\r\n <!-- radioButton -->\r\n <div\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'radio-button'\"\r\n class=\"flex gap-3\"\r\n >\r\n <div\r\n *ngFor=\"let listRadioButton of item.options\"\r\n class=\"flex align-items-center gap-2\"\r\n >\r\n <p-radioButton\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n [value]=\"listRadioButton.code\"\r\n formControlName=\"{{ item.formControl }}\"\r\n (onClick)=\"onChange(item.onChange)\"\r\n ></p-radioButton>\r\n <label>{{ listRadioButton.description }}</label>\r\n </div>\r\n @if(control.controls[item.formControl].value == 'other'){\r\n <input\r\n pInputText\r\n type=\"text\"\r\n formControlName=\"{{ item.formControlOther }}\"\r\n />\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\r\n id=\"{{ item.id }}\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n [options]=\"item.options\"\r\n formControlName=\"{{ item.formControl }}\"\r\n optionValue=\"code\"\r\n >\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\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === '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 >\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 </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\r\n *ngFor=\"let action of item.buttonsTable\"\r\n styleClass=\"{{ action.styleClass }}\"\r\n label=\"{{ action.label }}\"\r\n (click)=\"action.onCLick(rowData)\"\r\n icon=\"{{ action.icon }}\"\r\n ></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\">\r\n <span class=\"font-normal\">{{ footer.text }}:</span>\r\n {{ footer.value }}\r\n </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\r\n id=\"{{ item.id }}\"\r\n formControlName=\"{{ item.formControl }}\"\r\n class=\"mr-10\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n ></p-inputSwitch>\r\n <p translate=\"{{ item.label }}\"></p>\r\n </div>\r\n\r\n <!-- password -->\r\n <p-password\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n *ngIf=\"item.type === 'password'\"\r\n [feedback]=\"false\"\r\n formControlName=\"{{ item.formControl }}\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n styleClass=\"w-full\"\r\n [toggleMask]=\"true\"\r\n ></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>\r\n V\u00EDdeo n\u00E3o dispon\u00EDvel.\r\n </video>\r\n <canvas id=\"canvas\" class=\"foto\" style=\"display: none\"></canvas>\r\n <button\r\n pButton\r\n icon=\"pi pi-times\"\r\n class=\"remove-file\"\r\n id=\"icon-remove\"\r\n [rounded]=\"true\"\r\n style=\"visibility: collapse\"\r\n (click)=\"removePhoto()\"\r\n ></button>\r\n <button\r\n pButton\r\n icon=\"pi pi-camera\"\r\n [rounded]=\"true\"\r\n (click)=\"capturePhoto(item.formControl)\"\r\n id=\"button\"\r\n ></button>\r\n </div>\r\n\r\n <!-- likert -->\r\n <p-table\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'likert'\"\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 >\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\r\n pTemplate=\"body\"\r\n let-row\r\n let-rowIndex=\"rowIndex\"\r\n let-columns=\"columns\"\r\n formArrayName=\"{{ item.formControl }}\"\r\n >\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\r\n value=\"{{ columns[index].field }}+{{ row }}\"\r\n formControlName=\"question{{ rowIndex }}\"\r\n />\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 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\r\n <!-- Corpo da tabela -->\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-row\r\n let-rowIndex=\"rowIndex\"\r\n let-columns=\"columns\"\r\n formArrayName=\"{{ item.formControl }}\"\r\n let-editing=\"editing\"\r\n >\r\n <tr>\r\n <td>{{ row }}</td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td\r\n [formGroupName]=\"rowIndex\"\r\n [pEditableColumn]=\"row\"\r\n pEditableColumnField=\"row\"\r\n >\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <input\r\n pInputText\r\n type=\"text\"\r\n formControlName=\"_{{ control.field }}question{{\r\n rowIndex\r\n }}\"\r\n />\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <input\r\n pInputText\r\n type=\"text\"\r\n formControlName=\"_{{ control.field }}question{{\r\n rowIndex\r\n }}\"\r\n />\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 <!-- valida\u00E7\u00E3o de item -->\r\n <div>\r\n <small\r\n class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['required']\"\r\n >\r\n Campo obrigat\u00F3rio\r\n </small>\r\n <small\r\n class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['email']\"\r\n >\r\n Email inv\u00E1lido\r\n </small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <p-divider\r\n *ngIf=\"\r\n (buttonsStandard && buttonsStandard.length > 0) ||\r\n (buttonsOptional && buttonsOptional.length > 0)\r\n \"\r\n ></p-divider>\r\n\r\n <div class=\"buttons-form\">\r\n <div *ngFor=\"let button of buttonsStandard\">\r\n <p-button\r\n *ngIf=\"button.type === 'clean'\"\r\n styleClass=\"p-button-warning {{ button.styleClass }}\"\r\n label=\"Limpar\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"pi pi-times\"\r\n ></p-button>\r\n <p-button\r\n *ngIf=\"button.type === 'filter'\"\r\n styleClass=\"{{ button.styleClass }}\"\r\n label=\"Filtrar\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"pi pi-search\"\r\n ></p-button>\r\n <p-button\r\n *ngIf=\"button.type === 'save'\"\r\n styleClass=\"p-button-success {{ button.styleClass }}\"\r\n label=\"Salvar\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"pi pi-save\"\r\n ></p-button>\r\n <p-button\r\n *ngIf=\"button.type === 'cancel'\"\r\n styleClass=\"p-button-danger {{ button.styleClass }}\"\r\n label=\"Cancelar\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"pi pi-times\"\r\n ></p-button>\r\n </div>\r\n <div *ngFor=\"let button of buttonsOptional\">\r\n <p-button\r\n styleClass=\"{{ button.styleClass }}\"\r\n label=\"{{ button.label }}\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"{{ button.icon }}\"\r\n ></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: "component", type: i23.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange"] }, { kind: "directive", type: i1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
187
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: FormDynamicAngularComponent, deps: [{ token: i1.TranslateService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
188
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.26", type: FormDynamicAngularComponent, isStandalone: false, 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>\n @if (title) {\n <div class=\"div-title\">\n <span translate=\"{{ title }}\"></span>\n @if (subTitle) {\n <div class=\"flex subtitle\">\n <span translate=\"{{ subTitle }}\"></span>\n </div>\n }\n <p-divider></p-divider>\n </div>\n }\n @if (control) {\n <form [formGroup]=\"control\">\n <div class=\"grid\">\n @for (item of form; track item) {\n <div class=\"{{ item.col }} col-12\">\n @if (item.label && !item.hideLabelTop) {\n <label>{{ item.label }}</label>\n }\n @if (item.required && item.label) {\n <label class=\"danger-text ml-2\"\n >*</label\n >\n }\n <div class=\"mt-2\">\n <!-- text -->\n @if (item.type == 'text' || item.type == 'number') {\n <input\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n pInputText\n placeholder=\"{{ item.placeholder }}\"\n type=\"{{ item.type }}\"\n formControlName=\"{{ item.formControl }}\"\n class=\"w-full\"\n />\n }\n @if (item.type == 'editor') {\n <p-editor\n formControlName=\"{{ item.formControl }}\"\n [style]=\"{ height: '320px' }\"\n />\n }\n <!-- select -->\n @if (item.type === 'select') {\n <p-select\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n [filter]=\"item.search\"\n emptyFilterMessage=\"Nenhum dado encontrado\"\n emptyMessage=\"Nenhum dado encontrado\"\n placeholder=\"{{ item.placeholder }}\"\n styleClass=\"w-full p-0\"\n (onChange)=\"onChange(item.onChange)\"\n [showClear]=\"true\"\n [options]=\"item.options\"\n formControlName=\"{{ item.formControl }}\"\n optionLabel=\"description\"\n (onClear)=\"clickCLear(item.onCLear)\"\n ></p-select>\n }\n <!-- currency -->\n @if (item.type === 'currency') {\n <p-inputNumber\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\n placeholder=\"{{ item.placeholder }}\"\n inputStyleClass=\"w-full\"\n styleClass=\"w-full\"\n (onKeyDown)=\"onChange(item.onChange)\"\n mode=\"currency\"\n [min]=\"0\"\n currency=\"BRL\"\n >\n </p-inputNumber>\n }\n <!-- mask -->\n @if (item.type === 'mask') {\n <p-inputMask\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\n placeholder=\"{{ item.placeholder }}\"\n styleClass=\"w-full\"\n (onComplete)=\"onChange(item.onChange)\"\n mask=\"{{ item.mask }}\"\n unmask=\"{{ item.unmask }}\"\n (onClear)=\"clickCLear(item.onCLear)\"\n showClear=\"true\"\n ></p-inputMask>\n }\n <!-- treeSelect -->\n @if (item.type === 'tree-select') {\n <p-treeSelect\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n (onNodeSelect)=\"onChange(item.onChange)\"\n containerStyleClass=\"w-full p-0\"\n formControlName=\"{{ item.formControl }}\"\n [options]=\"item.treeSelectOptions\"\n [filter]=\"true\"\n [filterInputAutoFocus]=\"true\"\n emptyMessage=\"Nenhum dado encontrado\"\n [showClear]=\"true\"\n (onClear)=\"clickCLear(item.onCLear)\"\n ></p-treeSelect>\n }\n <!-- autoComplete -->\n @if (item.type === 'autocomplete') {\n <p-autoComplete\n inputId=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n styleClass=\"w-full p-0\"\n [inputStyle]=\"{ width: '100%' }\"\n (onSelect)=\"onChange(item.onChange)\"\n formControlName=\"{{ item.formControl }}\"\n [suggestions]=\"filteredAutoComplete\"\n (completeMethod)=\"filterAutoComplete($event, item.options)\"\n [forceSelection]=\"false\"\n [showEmptyMessage]=\"true\"\n emptyMessage=\"Nenhum dado encontrado\"\n dataKey=\"code\"\n optionLabel=\"description\"\n showClear=\"true\"\n (onClear)=\"clickCLear(item.onCLear)\"\n ></p-autoComplete>\n }\n <!-- date -->\n @if (item.type === 'date') {\n <p-datepicker\n id=\"{{ item.id }}\"\n view=\"{{ item.viewDate }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\n styleClass=\"w-full\"\n [numberOfMonths]=\"numberOfMonthsDate(item.numberOfMonthsDate)\"\n [selectionMode]=\"selectionMode(item.selectionMode)\"\n (onFocus)=\"onChange(item.onFocusDate)\"\n [maxDate]=\"item.maxDate\"\n [minDate]=\"item.minDate\"\n dateFormat=\"{{ item.dateFormat }}\"\n (onSelect)=\"onChange(item.onChange)\"\n [iconDisplay]=\"'input'\"\n placeholder=\"{{ item.placeholder }}\"\n [showIcon]=\"true\"\n [showTime]=\"item.showTime\"\n [timeOnly]=\"item.timeOnly\"\n ></p-datepicker>\n }\n <!-- textarea -->\n @if (item.type === 'text-area') {\n <div class=\"text-right\">\n <textarea\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n class=\"w-full\"\n maxlength=\"{{ item.maxlength }}\"\n counterTemplate=\"{1} of 50, {0} remaining\"\n counter=\"display\"\n (attr.change)=\"onChange(item.onChange)\"\n pTextarea\n formControlName=\"{{ item.formControl }}\"\n rows=\"{{ item.rowsTextArea }}\"\n ></textarea>\n @if (item.maxlength) {\n <small id=\"username-help\">\n {{ control.controls[item.formControl].value.length }}/{{\n item.maxlength\n }}\n </small>\n }\n </div>\n }\n <!-- checkbox -->\n @if (item.type == 'check-box') {\n <div>\n <p-checkbox\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n (onChange)=\"onChange(item.onChange)\"\n binary=\"true\"\n formControlName=\"{{ item.formControl }}\"\n value=\"{{ item.formControl }}\"\n label=\"{{ item.label }}\"\n ></p-checkbox>\n </div>\n }\n <!-- checkbox multiple -->\n @if (item.type === 'check-box-multi') {\n <div\n id=\"{{ item.id }}\"\n class=\"flex gap-3\"\n >\n @for (list of item.options; track list; let i = $index) {\n <div\n formArrayName=\"{{ item.formControl }}\"\n class=\"flex align-items-center gap-2\"\n >\n <div [formGroupName]=\"i\">\n <p-checkbox\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n (onChange)=\"onChange(item.onChange)\"\n binary=\"true\"\n formControlName=\"{{ list.code }}\"\n label=\"{{ list.description }}\"\n ></p-checkbox>\n </div>\n </div>\n }\n </div>\n }\n <!-- button -->\n @if (item.type == 'button') {\n <p-button\n id=\"{{ item.id }}\"\n styleClass=\"{{ item.buttonClass }} w-full mt-3\"\n (click)=\"item.onCLick()\"\n [disabled]=\"item.disabled\"\n icon=\"{{ item.iconButton }}\"\n label=\"{{ item.label }}\"\n ></p-button>\n }\n <!-- can -->\n @if (item.type == 'can') {\n <div id=\"{{ item.id }}\" class=\"area\">\n <video autoplay=\"true\" id=\"webCamera\"></video>\n <input type=\"text\" id=\"base_img\" name=\"base_img\" />\n <button type=\"button\" onclick=\"takeSnapShot()\">\n Tirar foto e salvar\n </button>\n <img id=\"imagemConvertida\" />\n <p id=\"caminhoImagem\" class=\"caminho-imagem\">\n <a href=\"\" target=\"_blank\" rel=\"noopener\"></a>\n </p>\n <script src=\"script.js\"></script>\n </div>\n }\n <!-- upload files -->\n @if (item.type === 'upload-files' && !item.disabled) {\n <div\n id=\"{{ item.id }}\"\n class=\"drag-image\"\n [style.border]=\"\r\n validateForm && control.controls[item.formControl].errors\r\n ? ' 1px dashed #f18282'\r\n : ' 1px dashed #d1d5db'\r\n \"\r\n >\n @if (filesView.length === 0) {\n <i class=\"pi pi-cloud-upload\"></i>\n }\n @if (filesView.length === 0) {\n <p>\n Clique ou arraste e solte um arquivo para anexar\n </p>\n }\n @if (filesView.length === 0) {\n <span>{{\n item.msgAcceptFiles\n }}</span>\n }\n <input\n id=\"fileInput\"\n type=\"file\"\n [multiple]=\"item.multileFile\"\n [accept]=\"item.acceptFiles\"\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\n @for (f of filesView; track f) {\n <div>\n @if (f.type && f.type.includes('image')) {\n <div>\n <label class=\"preview-img\">\n @if (!f.content) {\n <img src=\"{{ getUrl(f) }}\" />\n }\n @if (f.content) {\n <img src=\"{{ f.content }}\" />\n }\n @if (item.viewNameFile) {\n <span>{{ f.name }}</span>\n }\n <input\n type=\"file\"\n [multiple]=\"item.multileFile\"\n [accept]=\"item.acceptFiles\"\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\n <label>\n <i\n class=\"pi pi-times remove-file absolute\"\n (click)=\"onRemove(item.formControl, f)\"\n ></i\n ></label>\n </label>\n </div>\n }\n @if (f.type && !f.type.includes('image')) {\n <div>\n <label class=\"preview-img h-0 max-w-0 mh-75 m-0\">\n <label class=\"mr-3\">{{ f.name }}</label>\n <input\n type=\"file\"\n [multiple]=\"item.multileFile\"\n [accept]=\"item.acceptFiles\"\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\n <label>\n <i\n class=\"pi pi-times remove-file absolute\"\n (click)=\"onRemove(f)\"\n ></i\n ></label>\n </label>\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- upload files disabled -->\n <!-- <p-fileUpload mode=\"basic\" formControlName=\"{{item.formControl}}\" chooseLabel=\"Choose\"\n chooseIcon=\"pi pi-upload\" accept=\"image/*\" maxFileSize=\"1000000\" /> -->\n @if (item.type === 'upload-files' && item.disabled) {\n <div\n id=\"{{ item.id }}\"\n >\n <p-button\n (click)=\"op.toggle($event)\"\n icon=\"pi pi-paperclip\"\n label=\"Arquivos anexados\"\n ></p-button>\n <p-popover\n #op\n [style]=\"{ width: '450px' }\"\n [showCloseIcon]=\"true\"\n >\n <ng-template pTemplate=\"content\">\n @if (files.length > 0) {\n <p-table\n [value]=\"files\"\n selectionMode=\"single\"\n [(selection)]=\"selectedProduct\"\n (onRowSelect)=\"onRowSelect($event, op)\"\n responsiveLayout=\"scroll\"\n >\n <ng-template pTemplate=\"header\">\n <tr>\n <th pSortableColumn=\"name\">\n Nome<p-sortIcon field=\"name\"></p-sortIcon>\n </th>\n <th></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-file>\n <tr>\n @if (item.viewNameFile) {\n <td>{{ file.name }}</td>\n }\n <td>\n @if (item.onCLick) {\n <p-button\n icon=\"pi pi-download\"\n (click)=\"item.onCLick(file)\"\n ></p-button>\n }\n </td>\n </tr>\n </ng-template>\n </p-table>\n }\n @if (files.length === 0) {\n <div class=\"p-10\">\n <label>Nenhum arquivo anexado</label>\n </div>\n }\n </ng-template>\n </p-popover>\n </div>\n }\n <!-- list -->\n @if (item.type === 'list' && item.options) {\n <ul id=\"{{ item.id }}\">\n @for (list of item.options; track list) {\n <li>{{ list.description }}</li>\n }\n </ul>\n }\n <!-- multi -->\n @if (item.type === 'multi') {\n <p-multiSelect\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n [options]=\"item.options\"\n formControlName=\"{{ item.formControl }}\"\n styleClass=\"p-0 w-full\"\n optionLabel=\"description\"\n (onChange)=\"onChange(item.onChange)\"\n maxSelectedLabels=\"100\"\n ></p-multiSelect>\n }\n <!-- radioButton -->\n @if (item.type === 'radio-button') {\n <div\n id=\"{{ item.id }}\"\n class=\"flex gap-3\"\n >\n @for (listRadioButton of item.options; track listRadioButton) {\n <div\n class=\"flex align-items-center gap-2\"\n >\n <p-radioButton\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n [value]=\"listRadioButton.code\"\n formControlName=\"{{ item.formControl }}\"\n (onClick)=\"onChange(item.onChange)\"\n ></p-radioButton>\n <label>{{ listRadioButton.description }}</label>\n </div>\n }\n @if(control.controls[item.formControl].value == 'other'){\n <input\n pInputText\n type=\"text\"\n formControlName=\"{{ item.formControlOther }}\"\n />\n }\n </div>\n }\n <!-- selectButton -->\n @if (item.type === 'select-button') {\n <div class=\"d-flex\">\n <p-selectButton\n id=\"{{ item.id }}\"\n (onChange)=\"onChange(item.onChange)\"\n [options]=\"item.options\"\n formControlName=\"{{ item.formControl }}\"\n optionValue=\"code\"\n >\n <ng-template let-item>\n <span>{{ item.description }}</span>\n </ng-template>\n </p-selectButton>\n <!-- <input type=\"text\" pInputText [attr.disabled]=\"item.disabled\"\n formControlName={{item.formControlSecondary}}> -->\n </div>\n }\n <!-- table -->\n @if (item.type === 'table') {\n <p-table\n id=\"{{ item.id }}\"\n [scrollable]=\"true\"\n scrollHeight=\"{{ item.scrollHeight }}\"\n [columns]=\"item.colsTable\"\n styleClass=\"p-datatable-striped p-datatable-sm\"\n [value]=\"item.rowsTable\"\n >\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (col of columns; track col) {\n <th>\n @if (col.filed !== 'action') {\n <span>{{ col.header }}</span>\n }\n @if (col.filed === 'action') {\n <span>A\u00E7\u00E3o</span>\n }\n </th>\n }\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr>\n @for (col of columns; track col) {\n <td>\n @if (col.field !== 'button') {\n <div>\n {{ rowData[col.field] }}\n </div>\n }\n @if (col.field === 'action') {\n <div>\n @for (action of item.buttonsTable; track action) {\n <p-button\n styleClass=\"{{ action.styleClass }}\"\n label=\"{{ action.label }}\"\n (click)=\"action.onCLick(rowData)\"\n icon=\"{{ action.icon }}\"\n ></p-button>\n }\n </div>\n }\n </td>\n }\n </tr>\n </ng-template>\n <ng-template pTemplate=\"footer\" let-columns>\n @for (footer of item.rowsFooter; track footer) {\n <tr>\n <td colspan=\"12\">\n <span class=\"font-normal\">{{ footer.text }}:</span>\n {{ footer.value }}\n </td>\n </tr>\n }\n </ng-template>\n </p-table>\n }\n <!-- inputSwitch -->\n @if (item.type === 'switch') {\n <div class=\"d-flex\">\n <p-toggleswitch\n id=\"{{ item.id }}\"\n formControlName=\"{{ item.formControl }}\"\n class=\"mr-10\"\n (onChange)=\"onChange(item.onChange)\"\n ></p-toggleswitch>\n <p translate=\"{{ item.label }}\"></p>\n </div>\n }\n <!-- password -->\n @if (item.type === 'password') {\n <p-password\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n [feedback]=\"false\"\n formControlName=\"{{ item.formControl }}\"\n (onChange)=\"onChange(item.onChange)\"\n styleClass=\"w-full\"\n [toggleMask]=\"true\"\n ></p-password>\n }\n <!-- photo -->\n @if (item.type === 'photo') {\n <div id=\"{{ item.id }}\" class=\"camera\">\n <video id=\"video\" class=\"foto\" autoplay>\n V\u00EDdeo n\u00E3o dispon\u00EDvel.\n </video>\n <canvas id=\"canvas\" class=\"foto\" style=\"display: none\"></canvas>\n <button\n pButton\n icon=\"pi pi-times\"\n class=\"remove-file\"\n id=\"icon-remove\"\n [rounded]=\"true\"\n style=\"visibility: collapse\"\n (click)=\"removePhoto()\"\n ></button>\n <button\n pButton\n icon=\"pi pi-camera\"\n [rounded]=\"true\"\n (click)=\"capturePhoto(item.formControl)\"\n id=\"button\"\n ></button>\n </div>\n }\n <!-- likert -->\n @if (item.type === 'likert') {\n <p-table\n id=\"{{ item.id }}\"\n [scrollable]=\"true\"\n scrollHeight=\"{{ item.scrollHeight }}\"\n [columns]=\"item.colsTable\"\n styleClass=\"p-datatable-striped p-datatable-sm\"\n [value]=\"item.rowsTable\"\n >\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th class=\"fd-table-label-column\"></th>\n @for (col of columns; track col) {\n <th>\n <span>{{ col.header }}</span>\n </th>\n }\n </tr>\n </ng-template>\n <ng-template\n pTemplate=\"body\"\n let-row\n let-rowIndex=\"rowIndex\"\n let-columns=\"columns\"\n formArrayName=\"{{ item.formControl }}\"\n >\n <tr>\n <td>\n {{ row }}\n </td>\n @for (control of columns; track item; let index = $index) {\n <td [formGroupName]=\"rowIndex\">\n <p-radioButton\n value=\"{{ columns[index].field }}+{{ row }}\"\n formControlName=\"question{{ rowIndex }}\"\n />\n </td>\n }\n </tr>\n </ng-template>\n </p-table>\n }\n <!-- editable table -->\n @if (item.type === 'editable-table') {\n <p-table\n id=\"{{ item.id }}\"\n [scrollable]=\"true\"\n scrollHeight=\"{{ item.scrollHeight }}\"\n [columns]=\"item.colsTable\"\n styleClass=\"p-datatable-striped p-datatable-sm\"\n [value]=\"item.rowsTable\"\n editMode=\"cell\"\n >\n <!-- Cabe\u00E7alho da tabela -->\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th class=\"fd-table-label-column\"></th>\n @for (col of columns; track col) {\n <th>\n <span>{{ col.header }}</span>\n </th>\n }\n </tr>\n </ng-template>\n <!-- Corpo da tabela -->\n <ng-template\n pTemplate=\"body\"\n let-row\n let-rowIndex=\"rowIndex\"\n let-columns=\"columns\"\n formArrayName=\"{{ item.formControl }}\"\n let-editing=\"editing\"\n >\n <tr>\n <td>{{ row }}</td>\n @for (control of columns; track item; let index = $index) {\n <td\n [formGroupName]=\"rowIndex\"\n [pEditableColumn]=\"row\"\n pEditableColumnField=\"row\"\n >\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText\n type=\"text\"\n formControlName=\"_{{ control.field }}question{{\r\n rowIndex\r\n }}\"\r\n />\n </ng-template>\n <ng-template pTemplate=\"output\">\n <input\n pInputText\n type=\"text\"\n formControlName=\"_{{ control.field }}question{{\r\n rowIndex\r\n }}\"\r\n />\n </ng-template>\n </p-cellEditor>\n </td>\n }\n </tr>\n </ng-template>\n </p-table>\n }\n <!-- valida\u00E7\u00E3o de item -->\n <div>\n @if (validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['required']) {\n <small\n class=\"danger-text\"\n >\n Campo obrigat\u00F3rio\n </small>\n }\n @if (validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['email']) {\n <small\n class=\"danger-text\"\n >\n Email inv\u00E1lido\n </small>\n }\n </div>\n </div>\n </div>\n }\n @if (\n (buttonsStandard && buttonsStandard.length > 0) ||\n (buttonsOptional && buttonsOptional.length > 0)\n ) {\n <p-divider\n ></p-divider>\n }\n <div class=\"buttons-form\">\n @for (button of buttonsStandard; track button) {\n <div>\n @if (button.type === 'clean') {\n <p-button\n styleClass=\"p-button-warning {{ button.styleClass }}\"\n label=\"Limpar\"\n (click)=\"button.onCLick()\"\n icon=\"pi pi-times\"\n ></p-button>\n }\n @if (button.type === 'filter') {\n <p-button\n styleClass=\"{{ button.styleClass }}\"\n label=\"Filtrar\"\n (click)=\"button.onCLick()\"\n icon=\"pi pi-search\"\n ></p-button>\n }\n @if (button.type === 'save') {\n <p-button\n styleClass=\"p-button-success {{ button.styleClass }}\"\n label=\"Salvar\"\n (click)=\"button.onCLick()\"\n icon=\"pi pi-save\"\n ></p-button>\n }\n @if (button.type === 'cancel') {\n <p-button\n styleClass=\"p-button-danger {{ button.styleClass }}\"\n label=\"Cancelar\"\n (click)=\"button.onCLick()\"\n icon=\"pi pi-times\"\n ></p-button>\n }\n </div>\n }\n @for (button of buttonsOptional; track button) {\n <div>\n <p-button\n styleClass=\"{{ button.styleClass }}\"\n label=\"{{ button.label }}\"\n (click)=\"button.onCLick()\"\n icon=\"{{ button.icon }}\"\n ></p-button>\n </div>\n }\n </div>\n </div>\n </form>\n }\n </div>\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}.fd-table-label-column{width:4rem}\n"], dependencies: [{ kind: "component", type: i3.InputMask, selector: "p-inputmask, p-inputMask, p-input-mask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "readonly", "unmask", "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, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i6.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "toggleMask", "inputStyleClass", "styleClass", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "autocomplete", "placeholder", "showClear", "autofocus", "tabindex", "appendTo", "motionOptions", "overlayOptions"], outputs: ["onFocus", "onBlur", "onClear"] }, { kind: "directive", type: i7.ButtonDirective, selector: "[pButton]", inputs: ["ptButtonDirective", "pButtonPT", "pButtonUnstyled", "hostName", "text", "plain", "raised", "size", "outlined", "rounded", "iconPos", "loadingIcon", "fluid", "label", "icon", "loading", "buttonProps", "severity"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["hostName", "type", "badge", "disabled", "raised", "rounded", "text", "plain", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "autofocus", "iconPos", "icon", "label", "loading", "loadingIcon", "severity", "buttonProps", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "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", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], 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, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i11.SelectButton, selector: "p-selectButton, p-selectbutton, p-select-button", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "styleClass", "ariaLabelledBy", "dataKey", "autofocus", "size", "fluid"], outputs: ["onOptionClick", "onChange"] }, { kind: "component", type: i12.ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "component", type: i13.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["hostName", "value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i14.Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["pTextareaPT", "pTextareaUnstyled", "autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "directive", type: i15.InputText, selector: "[pInputText]", inputs: ["hostName", "ptInputText", "pInputTextPT", "pInputTextUnstyled", "pSize", "variant", "fluid", "invalid"] }, { kind: "component", type: i16.Divider, selector: "p-divider", inputs: ["styleClass", "layout", "type", "align"] }, { kind: "component", type: i17.DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo", "motionOptions"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i18.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo", "motionOptions"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i19.TreeSelect, selector: "p-treeSelect, p-treeselect, p-tree-select", inputs: ["inputId", "scrollHeight", "metaKeySelection", "display", "selectionMode", "tabindex", "ariaLabel", "ariaLabelledBy", "placeholder", "panelClass", "panelStyle", "panelStyleClass", "containerStyle", "containerStyleClass", "labelStyle", "labelStyleClass", "overlayOptions", "emptyMessage", "filter", "filterBy", "filterMode", "filterPlaceholder", "filterLocale", "filterInputAutoFocus", "propagateSelectionDown", "propagateSelectionUp", "showClear", "resetFilterOnHide", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autofocus", "options", "loading", "loadingMode", "size", "variant", "fluid", "appendTo", "motionOptions"], outputs: ["onNodeExpand", "onNodeCollapse", "onShow", "onHide", "onClear", "onFilter", "onFocus", "onBlur", "onNodeUnselect", "onNodeSelect"] }, { kind: "component", type: i20.RadioButton, selector: "p-radioButton, p-radiobutton, p-radio-button", inputs: ["value", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "styleClass", "autofocus", "binary", "variant", "size"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i21.AutoComplete, selector: "p-autoComplete, p-autocomplete, p-auto-complete", inputs: ["minLength", "minQueryLength", "delay", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "addOnTab", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "optionLabel", "optionValue", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover", "typeahead", "addOnBlur", "separator", "appendTo", "motionOptions"], outputs: ["completeMethod", "onSelect", "onUnselect", "onAdd", "onFocus", "onBlur", "onDropdownClick", "onClear", "onInputKeydown", "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],[formArray],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.Popover, selector: "p-popover", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions", "motionOptions"], outputs: ["onShow", "onHide"] }, { kind: "component", type: i23.Editor, selector: "p-editor", inputs: ["style", "styleClass", "placeholder", "formats", "modules", "bounds", "scrollingContainer", "debug", "readonly"], outputs: ["onInit", "onTextChange", "onSelectionChange", "onEditorChange", "onFocus", "onBlur"] }, { kind: "directive", type: i1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
189
189
  }
190
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularComponent, decorators: [{
190
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: FormDynamicAngularComponent, decorators: [{
191
191
  type: Component,
192
- 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\"\r\n >*</label\r\n >\r\n\r\n <div class=\"mt-2\">\r\n <!-- text -->\r\n <input\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n pInputText\r\n placeholder=\"{{ item.placeholder }}\"\r\n *ngIf=\"item.type == 'text' || item.type == 'number'\"\r\n type=\"{{ item.type }}\"\r\n formControlName=\"{{ item.formControl }}\"\r\n class=\"w-full\"\r\n />\r\n\r\n <p-editor\r\n *ngIf=\"item.type == 'editor'\"\r\n formControlName=\"{{ item.formControl }}\"\r\n [style]=\"{ height: '320px' }\"\r\n />\r\n\r\n <!-- select -->\r\n <p-dropdown\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n [filter]=\"item.search\"\r\n emptyFilterMessage=\"Nenhum dado encontrado\"\r\n emptyMessage=\"Nenhum dado encontrado\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n styleClass=\"w-full p-0\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n *ngIf=\"item.type === 'select'\"\r\n [showClear]=\"true\"\r\n [options]=\"item.options\"\r\n formControlName=\"{{ item.formControl }}\"\r\n optionLabel=\"description\"\r\n (onClear)=\"clickCLear(item.onCLear)\"\r\n ></p-dropdown>\r\n\r\n <!-- currency -->\r\n <p-inputNumber\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'currency'\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n inputStyleClass=\"w-full\"\r\n styleClass=\"w-full\"\r\n (onKeyDown)=\"onChange(item.onChange)\"\r\n mode=\"currency\"\r\n [min]=\"0\"\r\n currency=\"BRL\"\r\n >\r\n </p-inputNumber>\r\n\r\n <!-- mask -->\r\n <p-inputMask\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'mask'\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n styleClass=\"w-full\"\r\n (onComplete)=\"onChange(item.onChange)\"\r\n mask=\"{{ item.mask }}\"\r\n unmask=\"{{ item.unmask }}\"\r\n (onClear)=\"clickCLear(item.onCLear)\"\r\n showClear=\"true\"\r\n ></p-inputMask>\r\n\r\n <!-- treeSelect -->\r\n <p-treeSelect\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n (onNodeSelect)=\"onChange(item.onChange)\"\r\n *ngIf=\"item.type === 'tree-select'\"\r\n containerStyleClass=\"w-full p-0\"\r\n formControlName=\"{{ item.formControl }}\"\r\n [options]=\"item.treeSelectOptions\"\r\n [filter]=\"true\"\r\n [filterInputAutoFocus]=\"true\"\r\n emptyMessage=\"Nenhum dado encontrado\"\r\n [showClear]=\"true\"\r\n (onClear)=\"clickCLear(item.onCLear)\"\r\n ></p-treeSelect>\r\n\r\n <!-- autoComplete -->\r\n <p-autoComplete\r\n inputId=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n styleClass=\"w-full p-0\"\r\n [inputStyle]=\"{ width: '100%' }\"\r\n *ngIf=\"item.type === 'autocomplete'\"\r\n (onSelect)=\"onChange(item.onChange)\"\r\n formControlName=\"{{ item.formControl }}\"\r\n [suggestions]=\"filteredAutoComplete\"\r\n (completeMethod)=\"filterAutoComplete($event, item.options)\"\r\n [forceSelection]=\"false\"\r\n [showEmptyMessage]=\"true\"\r\n emptyMessage=\"Nenhum dado encontrado\"\r\n dataKey=\"code\"\r\n field=\"description\"\r\n showClear=\"true\"\r\n (onClear)=\"clickCLear(item.onCLear)\"\r\n ></p-autoComplete>\r\n\r\n <!-- date -->\r\n <p-calendar\r\n id=\"{{ item.id }}\"\r\n view=\"{{ item.viewDate }}\"\r\n *ngIf=\"item.type === 'date'\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\r\n styleClass=\"w-full\"\r\n [numberOfMonths]=\"numberOfMonthsDate(item.numberOfMonthsDate)\"\r\n [selectionMode]=\"selectionMode(item.selectionMode)\"\r\n (onFocus)=\"onChange(item.onFocusDate)\"\r\n [maxDate]=\"item.maxDate\"\r\n [minDate]=\"item.minDate\"\r\n dateFormat=\"{{ item.dateFormat }}\"\r\n (onSelect)=\"onChange(item.onChange)\"\r\n [iconDisplay]=\"'input'\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n [showIcon]=\"true\"\r\n [showTime]=\"item.showTime\"\r\n [timeOnly]=\"item.timeOnly\"\r\n ></p-calendar>\r\n\r\n <!-- textarea -->\r\n <div *ngIf=\"item.type === 'text-area'\" class=\"text-right\">\r\n <textarea\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n class=\"w-full\"\r\n maxlength=\"{{ item.maxlength }}\"\r\n counterTemplate=\"{1} of 50, {0} remaining\"\r\n counter=\"display\"\r\n (attr.change)=\"onChange(item.onChange)\"\r\n pInputTextarea\r\n formControlName=\"{{ item.formControl }}\"\r\n rows=\"{{ item.rowsTextArea }}\"\r\n ></textarea>\r\n <small *ngIf=\"item.maxlength\" id=\"username-help\">\r\n {{ control.controls[item.formControl].value.length }}/{{\r\n item.maxlength\r\n }}\r\n </small>\r\n </div>\r\n\r\n <!-- checkbox -->\r\n <div *ngIf=\"item.type == 'check-box'\">\r\n <p-checkbox\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n binary=\"true\"\r\n formControlName=\"{{ item.formControl }}\"\r\n value=\"{{ item.formControl }}\"\r\n label=\"{{ item.label }}\"\r\n ></p-checkbox>\r\n </div>\r\n\r\n <!-- checkbox multiple -->\r\n <div\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'check-box-multi'\"\r\n class=\"flex gap-3\"\r\n >\r\n <div\r\n formArrayName=\"{{ item.formControl }}\"\r\n *ngFor=\"let list of item.options; let i = index\"\r\n class=\"flex align-items-center gap-2\"\r\n >\r\n <div [formGroupName]=\"i\">\r\n <p-checkbox\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n binary=\"true\"\r\n formControlName=\"{{ list.code }}\"\r\n label=\"{{ list.description }}\"\r\n ></p-checkbox>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- button -->\r\n <p-button\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type == 'button'\"\r\n styleClass=\"{{ item.buttonClass }} w-full mt-3\"\r\n (click)=\"item.onCLick()\"\r\n [disabled]=\"item.disabled\"\r\n icon=\"{{ item.iconButton }}\"\r\n label=\"{{ item.label }}\"\r\n ></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\"></video>\r\n\r\n <input type=\"text\" id=\"base_img\" name=\"base_img\" />\r\n <button type=\"button\" onclick=\"takeSnapShot()\">\r\n Tirar foto e salvar\r\n </button>\r\n\r\n <img id=\"imagemConvertida\" />\r\n <p id=\"caminhoImagem\" class=\"caminho-imagem\">\r\n <a href=\"\" target=\"_blank\" rel=\"noopener\"></a>\r\n </p>\r\n <script src=\"script.js\"></script>\r\n </div>\r\n\r\n <!-- upload files -->\r\n <div\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'upload-files' && !item.disabled\"\r\n class=\"drag-image\"\r\n [style.border]=\"\r\n validateForm && control.controls[item.formControl].errors\r\n ? ' 1px dashed #f18282'\r\n : ' 1px dashed #d1d5db'\r\n \"\r\n >\r\n <i *ngIf=\"filesView.length === 0\" class=\"pi pi-cloud-upload\"></i>\r\n <p *ngIf=\"filesView.length === 0\">\r\n Clique ou arraste e solte um arquivo para anexar\r\n </p>\r\n <span *ngIf=\"filesView.length === 0\">{{\r\n item.msgAcceptFiles\r\n }}</span>\r\n <input\r\n id=\"fileInput\"\r\n type=\"file\"\r\n [multiple]=\"item.multileFile\"\r\n [accept]=\"item.acceptFiles\"\r\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\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\r\n type=\"file\"\r\n [multiple]=\"item.multileFile\"\r\n [accept]=\"item.acceptFiles\"\r\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\r\n <label>\r\n <i\r\n class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(item.formControl, f)\"\r\n ></i\r\n ></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\r\n type=\"file\"\r\n [multiple]=\"item.multileFile\"\r\n [accept]=\"item.acceptFiles\"\r\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\r\n <label>\r\n <i\r\n class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(f)\"\r\n ></i\r\n ></label>\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\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'upload-files' && item.disabled\"\r\n >\r\n <p-button\r\n (click)=\"op.toggle($event)\"\r\n icon=\"pi pi-paperclip\"\r\n label=\"Arquivos anexados\"\r\n ></p-button>\r\n\r\n <p-overlayPanel\r\n #op\r\n [style]=\"{ width: '450px' }\"\r\n [showCloseIcon]=\"true\"\r\n >\r\n <ng-template pTemplate=\"content\">\r\n <p-table\r\n *ngIf=\"files.length > 0\"\r\n [value]=\"files\"\r\n selectionMode=\"single\"\r\n [(selection)]=\"selectedProduct\"\r\n (onRowSelect)=\"onRowSelect($event, op)\"\r\n responsiveLayout=\"scroll\"\r\n >\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th pSortableColumn=\"name\">\r\n Nome<p-sortIcon field=\"name\"></p-sortIcon>\r\n </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>\r\n <p-button\r\n *ngIf=\"item.onCLick\"\r\n icon=\"pi pi-download\"\r\n (click)=\"item.onCLick(file)\"\r\n ></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\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n *ngIf=\"item.type === 'multi'\"\r\n [options]=\"item.options\"\r\n formControlName=\"{{ item.formControl }}\"\r\n styleClass=\"p-0 w-full\"\r\n optionLabel=\"description\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n maxSelectedLabels=\"100\"\r\n ></p-multiSelect>\r\n\r\n <!-- radioButton -->\r\n <div\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'radio-button'\"\r\n class=\"flex gap-3\"\r\n >\r\n <div\r\n *ngFor=\"let listRadioButton of item.options\"\r\n class=\"flex align-items-center gap-2\"\r\n >\r\n <p-radioButton\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n [value]=\"listRadioButton.code\"\r\n formControlName=\"{{ item.formControl }}\"\r\n (onClick)=\"onChange(item.onChange)\"\r\n ></p-radioButton>\r\n <label>{{ listRadioButton.description }}</label>\r\n </div>\r\n @if(control.controls[item.formControl].value == 'other'){\r\n <input\r\n pInputText\r\n type=\"text\"\r\n formControlName=\"{{ item.formControlOther }}\"\r\n />\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\r\n id=\"{{ item.id }}\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n [options]=\"item.options\"\r\n formControlName=\"{{ item.formControl }}\"\r\n optionValue=\"code\"\r\n >\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\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === '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 >\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 </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\r\n *ngFor=\"let action of item.buttonsTable\"\r\n styleClass=\"{{ action.styleClass }}\"\r\n label=\"{{ action.label }}\"\r\n (click)=\"action.onCLick(rowData)\"\r\n icon=\"{{ action.icon }}\"\r\n ></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\">\r\n <span class=\"font-normal\">{{ footer.text }}:</span>\r\n {{ footer.value }}\r\n </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\r\n id=\"{{ item.id }}\"\r\n formControlName=\"{{ item.formControl }}\"\r\n class=\"mr-10\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n ></p-inputSwitch>\r\n <p translate=\"{{ item.label }}\"></p>\r\n </div>\r\n\r\n <!-- password -->\r\n <p-password\r\n id=\"{{ item.id }}\"\r\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\r\n *ngIf=\"item.type === 'password'\"\r\n [feedback]=\"false\"\r\n formControlName=\"{{ item.formControl }}\"\r\n (onChange)=\"onChange(item.onChange)\"\r\n styleClass=\"w-full\"\r\n [toggleMask]=\"true\"\r\n ></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>\r\n V\u00EDdeo n\u00E3o dispon\u00EDvel.\r\n </video>\r\n <canvas id=\"canvas\" class=\"foto\" style=\"display: none\"></canvas>\r\n <button\r\n pButton\r\n icon=\"pi pi-times\"\r\n class=\"remove-file\"\r\n id=\"icon-remove\"\r\n [rounded]=\"true\"\r\n style=\"visibility: collapse\"\r\n (click)=\"removePhoto()\"\r\n ></button>\r\n <button\r\n pButton\r\n icon=\"pi pi-camera\"\r\n [rounded]=\"true\"\r\n (click)=\"capturePhoto(item.formControl)\"\r\n id=\"button\"\r\n ></button>\r\n </div>\r\n\r\n <!-- likert -->\r\n <p-table\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'likert'\"\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 >\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\r\n pTemplate=\"body\"\r\n let-row\r\n let-rowIndex=\"rowIndex\"\r\n let-columns=\"columns\"\r\n formArrayName=\"{{ item.formControl }}\"\r\n >\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\r\n value=\"{{ columns[index].field }}+{{ row }}\"\r\n formControlName=\"question{{ rowIndex }}\"\r\n />\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 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\r\n <!-- Corpo da tabela -->\r\n <ng-template\r\n pTemplate=\"body\"\r\n let-row\r\n let-rowIndex=\"rowIndex\"\r\n let-columns=\"columns\"\r\n formArrayName=\"{{ item.formControl }}\"\r\n let-editing=\"editing\"\r\n >\r\n <tr>\r\n <td>{{ row }}</td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td\r\n [formGroupName]=\"rowIndex\"\r\n [pEditableColumn]=\"row\"\r\n pEditableColumnField=\"row\"\r\n >\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <input\r\n pInputText\r\n type=\"text\"\r\n formControlName=\"_{{ control.field }}question{{\r\n rowIndex\r\n }}\"\r\n />\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <input\r\n pInputText\r\n type=\"text\"\r\n formControlName=\"_{{ control.field }}question{{\r\n rowIndex\r\n }}\"\r\n />\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 <!-- valida\u00E7\u00E3o de item -->\r\n <div>\r\n <small\r\n class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['required']\"\r\n >\r\n Campo obrigat\u00F3rio\r\n </small>\r\n <small\r\n class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['email']\"\r\n >\r\n Email inv\u00E1lido\r\n </small>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <p-divider\r\n *ngIf=\"\r\n (buttonsStandard && buttonsStandard.length > 0) ||\r\n (buttonsOptional && buttonsOptional.length > 0)\r\n \"\r\n ></p-divider>\r\n\r\n <div class=\"buttons-form\">\r\n <div *ngFor=\"let button of buttonsStandard\">\r\n <p-button\r\n *ngIf=\"button.type === 'clean'\"\r\n styleClass=\"p-button-warning {{ button.styleClass }}\"\r\n label=\"Limpar\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"pi pi-times\"\r\n ></p-button>\r\n <p-button\r\n *ngIf=\"button.type === 'filter'\"\r\n styleClass=\"{{ button.styleClass }}\"\r\n label=\"Filtrar\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"pi pi-search\"\r\n ></p-button>\r\n <p-button\r\n *ngIf=\"button.type === 'save'\"\r\n styleClass=\"p-button-success {{ button.styleClass }}\"\r\n label=\"Salvar\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"pi pi-save\"\r\n ></p-button>\r\n <p-button\r\n *ngIf=\"button.type === 'cancel'\"\r\n styleClass=\"p-button-danger {{ button.styleClass }}\"\r\n label=\"Cancelar\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"pi pi-times\"\r\n ></p-button>\r\n </div>\r\n <div *ngFor=\"let button of buttonsOptional\">\r\n <p-button\r\n styleClass=\"{{ button.styleClass }}\"\r\n label=\"{{ button.label }}\"\r\n (click)=\"button.onCLick()\"\r\n icon=\"{{ button.icon }}\"\r\n ></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"] }]
192
+ args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'form-dynamic-angular', standalone: false, template: "<div>\n @if (title) {\n <div class=\"div-title\">\n <span translate=\"{{ title }}\"></span>\n @if (subTitle) {\n <div class=\"flex subtitle\">\n <span translate=\"{{ subTitle }}\"></span>\n </div>\n }\n <p-divider></p-divider>\n </div>\n }\n @if (control) {\n <form [formGroup]=\"control\">\n <div class=\"grid\">\n @for (item of form; track item) {\n <div class=\"{{ item.col }} col-12\">\n @if (item.label && !item.hideLabelTop) {\n <label>{{ item.label }}</label>\n }\n @if (item.required && item.label) {\n <label class=\"danger-text ml-2\"\n >*</label\n >\n }\n <div class=\"mt-2\">\n <!-- text -->\n @if (item.type == 'text' || item.type == 'number') {\n <input\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n pInputText\n placeholder=\"{{ item.placeholder }}\"\n type=\"{{ item.type }}\"\n formControlName=\"{{ item.formControl }}\"\n class=\"w-full\"\n />\n }\n @if (item.type == 'editor') {\n <p-editor\n formControlName=\"{{ item.formControl }}\"\n [style]=\"{ height: '320px' }\"\n />\n }\n <!-- select -->\n @if (item.type === 'select') {\n <p-select\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n [filter]=\"item.search\"\n emptyFilterMessage=\"Nenhum dado encontrado\"\n emptyMessage=\"Nenhum dado encontrado\"\n placeholder=\"{{ item.placeholder }}\"\n styleClass=\"w-full p-0\"\n (onChange)=\"onChange(item.onChange)\"\n [showClear]=\"true\"\n [options]=\"item.options\"\n formControlName=\"{{ item.formControl }}\"\n optionLabel=\"description\"\n (onClear)=\"clickCLear(item.onCLear)\"\n ></p-select>\n }\n <!-- currency -->\n @if (item.type === 'currency') {\n <p-inputNumber\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\n placeholder=\"{{ item.placeholder }}\"\n inputStyleClass=\"w-full\"\n styleClass=\"w-full\"\n (onKeyDown)=\"onChange(item.onChange)\"\n mode=\"currency\"\n [min]=\"0\"\n currency=\"BRL\"\n >\n </p-inputNumber>\n }\n <!-- mask -->\n @if (item.type === 'mask') {\n <p-inputMask\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\n placeholder=\"{{ item.placeholder }}\"\n styleClass=\"w-full\"\n (onComplete)=\"onChange(item.onChange)\"\n mask=\"{{ item.mask }}\"\n unmask=\"{{ item.unmask }}\"\n (onClear)=\"clickCLear(item.onCLear)\"\n showClear=\"true\"\n ></p-inputMask>\n }\n <!-- treeSelect -->\n @if (item.type === 'tree-select') {\n <p-treeSelect\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n (onNodeSelect)=\"onChange(item.onChange)\"\n containerStyleClass=\"w-full p-0\"\n formControlName=\"{{ item.formControl }}\"\n [options]=\"item.treeSelectOptions\"\n [filter]=\"true\"\n [filterInputAutoFocus]=\"true\"\n emptyMessage=\"Nenhum dado encontrado\"\n [showClear]=\"true\"\n (onClear)=\"clickCLear(item.onCLear)\"\n ></p-treeSelect>\n }\n <!-- autoComplete -->\n @if (item.type === 'autocomplete') {\n <p-autoComplete\n inputId=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n styleClass=\"w-full p-0\"\n [inputStyle]=\"{ width: '100%' }\"\n (onSelect)=\"onChange(item.onChange)\"\n formControlName=\"{{ item.formControl }}\"\n [suggestions]=\"filteredAutoComplete\"\n (completeMethod)=\"filterAutoComplete($event, item.options)\"\n [forceSelection]=\"false\"\n [showEmptyMessage]=\"true\"\n emptyMessage=\"Nenhum dado encontrado\"\n dataKey=\"code\"\n optionLabel=\"description\"\n showClear=\"true\"\n (onClear)=\"clickCLear(item.onCLear)\"\n ></p-autoComplete>\n }\n <!-- date -->\n @if (item.type === 'date') {\n <p-datepicker\n id=\"{{ item.id }}\"\n view=\"{{ item.viewDate }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n formControlName=\"{{ item.formControl }}\"\n styleClass=\"w-full\"\n [numberOfMonths]=\"numberOfMonthsDate(item.numberOfMonthsDate)\"\n [selectionMode]=\"selectionMode(item.selectionMode)\"\n (onFocus)=\"onChange(item.onFocusDate)\"\n [maxDate]=\"item.maxDate\"\n [minDate]=\"item.minDate\"\n dateFormat=\"{{ item.dateFormat }}\"\n (onSelect)=\"onChange(item.onChange)\"\n [iconDisplay]=\"'input'\"\n placeholder=\"{{ item.placeholder }}\"\n [showIcon]=\"true\"\n [showTime]=\"item.showTime\"\n [timeOnly]=\"item.timeOnly\"\n ></p-datepicker>\n }\n <!-- textarea -->\n @if (item.type === 'text-area') {\n <div class=\"text-right\">\n <textarea\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n class=\"w-full\"\n maxlength=\"{{ item.maxlength }}\"\n counterTemplate=\"{1} of 50, {0} remaining\"\n counter=\"display\"\n (attr.change)=\"onChange(item.onChange)\"\n pTextarea\n formControlName=\"{{ item.formControl }}\"\n rows=\"{{ item.rowsTextArea }}\"\n ></textarea>\n @if (item.maxlength) {\n <small id=\"username-help\">\n {{ control.controls[item.formControl].value.length }}/{{\n item.maxlength\n }}\n </small>\n }\n </div>\n }\n <!-- checkbox -->\n @if (item.type == 'check-box') {\n <div>\n <p-checkbox\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n (onChange)=\"onChange(item.onChange)\"\n binary=\"true\"\n formControlName=\"{{ item.formControl }}\"\n value=\"{{ item.formControl }}\"\n label=\"{{ item.label }}\"\n ></p-checkbox>\n </div>\n }\n <!-- checkbox multiple -->\n @if (item.type === 'check-box-multi') {\n <div\n id=\"{{ item.id }}\"\n class=\"flex gap-3\"\n >\n @for (list of item.options; track list; let i = $index) {\n <div\n formArrayName=\"{{ item.formControl }}\"\n class=\"flex align-items-center gap-2\"\n >\n <div [formGroupName]=\"i\">\n <p-checkbox\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n (onChange)=\"onChange(item.onChange)\"\n binary=\"true\"\n formControlName=\"{{ list.code }}\"\n label=\"{{ list.description }}\"\n ></p-checkbox>\n </div>\n </div>\n }\n </div>\n }\n <!-- button -->\n @if (item.type == 'button') {\n <p-button\n id=\"{{ item.id }}\"\n styleClass=\"{{ item.buttonClass }} w-full mt-3\"\n (click)=\"item.onCLick()\"\n [disabled]=\"item.disabled\"\n icon=\"{{ item.iconButton }}\"\n label=\"{{ item.label }}\"\n ></p-button>\n }\n <!-- can -->\n @if (item.type == 'can') {\n <div id=\"{{ item.id }}\" class=\"area\">\n <video autoplay=\"true\" id=\"webCamera\"></video>\n <input type=\"text\" id=\"base_img\" name=\"base_img\" />\n <button type=\"button\" onclick=\"takeSnapShot()\">\n Tirar foto e salvar\n </button>\n <img id=\"imagemConvertida\" />\n <p id=\"caminhoImagem\" class=\"caminho-imagem\">\n <a href=\"\" target=\"_blank\" rel=\"noopener\"></a>\n </p>\n <script src=\"script.js\"></script>\n </div>\n }\n <!-- upload files -->\n @if (item.type === 'upload-files' && !item.disabled) {\n <div\n id=\"{{ item.id }}\"\n class=\"drag-image\"\n [style.border]=\"\r\n validateForm && control.controls[item.formControl].errors\r\n ? ' 1px dashed #f18282'\r\n : ' 1px dashed #d1d5db'\r\n \"\r\n >\n @if (filesView.length === 0) {\n <i class=\"pi pi-cloud-upload\"></i>\n }\n @if (filesView.length === 0) {\n <p>\n Clique ou arraste e solte um arquivo para anexar\n </p>\n }\n @if (filesView.length === 0) {\n <span>{{\n item.msgAcceptFiles\n }}</span>\n }\n <input\n id=\"fileInput\"\n type=\"file\"\n [multiple]=\"item.multileFile\"\n [accept]=\"item.acceptFiles\"\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\n @for (f of filesView; track f) {\n <div>\n @if (f.type && f.type.includes('image')) {\n <div>\n <label class=\"preview-img\">\n @if (!f.content) {\n <img src=\"{{ getUrl(f) }}\" />\n }\n @if (f.content) {\n <img src=\"{{ f.content }}\" />\n }\n @if (item.viewNameFile) {\n <span>{{ f.name }}</span>\n }\n <input\n type=\"file\"\n [multiple]=\"item.multileFile\"\n [accept]=\"item.acceptFiles\"\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\n <label>\n <i\n class=\"pi pi-times remove-file absolute\"\n (click)=\"onRemove(item.formControl, f)\"\n ></i\n ></label>\n </label>\n </div>\n }\n @if (f.type && !f.type.includes('image')) {\n <div>\n <label class=\"preview-img h-0 max-w-0 mh-75 m-0\">\n <label class=\"mr-3\">{{ f.name }}</label>\n <input\n type=\"file\"\n [multiple]=\"item.multileFile\"\n [accept]=\"item.acceptFiles\"\n (change)=\"\r\n onSelectFile(item.formControl, $event, item.multileFile)\r\n \"\r\n />\n <label>\n <i\n class=\"pi pi-times remove-file absolute\"\n (click)=\"onRemove(f)\"\n ></i\n ></label>\n </label>\n </div>\n }\n </div>\n }\n </div>\n }\n <!-- upload files disabled -->\n <!-- <p-fileUpload mode=\"basic\" formControlName=\"{{item.formControl}}\" chooseLabel=\"Choose\"\n chooseIcon=\"pi pi-upload\" accept=\"image/*\" maxFileSize=\"1000000\" /> -->\n @if (item.type === 'upload-files' && item.disabled) {\n <div\n id=\"{{ item.id }}\"\n >\n <p-button\n (click)=\"op.toggle($event)\"\n icon=\"pi pi-paperclip\"\n label=\"Arquivos anexados\"\n ></p-button>\n <p-popover\n #op\n [style]=\"{ width: '450px' }\"\n [showCloseIcon]=\"true\"\n >\n <ng-template pTemplate=\"content\">\n @if (files.length > 0) {\n <p-table\n [value]=\"files\"\n selectionMode=\"single\"\n [(selection)]=\"selectedProduct\"\n (onRowSelect)=\"onRowSelect($event, op)\"\n responsiveLayout=\"scroll\"\n >\n <ng-template pTemplate=\"header\">\n <tr>\n <th pSortableColumn=\"name\">\n Nome<p-sortIcon field=\"name\"></p-sortIcon>\n </th>\n <th></th>\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-file>\n <tr>\n @if (item.viewNameFile) {\n <td>{{ file.name }}</td>\n }\n <td>\n @if (item.onCLick) {\n <p-button\n icon=\"pi pi-download\"\n (click)=\"item.onCLick(file)\"\n ></p-button>\n }\n </td>\n </tr>\n </ng-template>\n </p-table>\n }\n @if (files.length === 0) {\n <div class=\"p-10\">\n <label>Nenhum arquivo anexado</label>\n </div>\n }\n </ng-template>\n </p-popover>\n </div>\n }\n <!-- list -->\n @if (item.type === 'list' && item.options) {\n <ul id=\"{{ item.id }}\">\n @for (list of item.options; track list) {\n <li>{{ list.description }}</li>\n }\n </ul>\n }\n <!-- multi -->\n @if (item.type === 'multi') {\n <p-multiSelect\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n [options]=\"item.options\"\n formControlName=\"{{ item.formControl }}\"\n styleClass=\"p-0 w-full\"\n optionLabel=\"description\"\n (onChange)=\"onChange(item.onChange)\"\n maxSelectedLabels=\"100\"\n ></p-multiSelect>\n }\n <!-- radioButton -->\n @if (item.type === 'radio-button') {\n <div\n id=\"{{ item.id }}\"\n class=\"flex gap-3\"\n >\n @for (listRadioButton of item.options; track listRadioButton) {\n <div\n class=\"flex align-items-center gap-2\"\n >\n <p-radioButton\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n [value]=\"listRadioButton.code\"\n formControlName=\"{{ item.formControl }}\"\n (onClick)=\"onChange(item.onChange)\"\n ></p-radioButton>\n <label>{{ listRadioButton.description }}</label>\n </div>\n }\n @if(control.controls[item.formControl].value == 'other'){\n <input\n pInputText\n type=\"text\"\n formControlName=\"{{ item.formControlOther }}\"\n />\n }\n </div>\n }\n <!-- selectButton -->\n @if (item.type === 'select-button') {\n <div class=\"d-flex\">\n <p-selectButton\n id=\"{{ item.id }}\"\n (onChange)=\"onChange(item.onChange)\"\n [options]=\"item.options\"\n formControlName=\"{{ item.formControl }}\"\n optionValue=\"code\"\n >\n <ng-template let-item>\n <span>{{ item.description }}</span>\n </ng-template>\n </p-selectButton>\n <!-- <input type=\"text\" pInputText [attr.disabled]=\"item.disabled\"\n formControlName={{item.formControlSecondary}}> -->\n </div>\n }\n <!-- table -->\n @if (item.type === 'table') {\n <p-table\n id=\"{{ item.id }}\"\n [scrollable]=\"true\"\n scrollHeight=\"{{ item.scrollHeight }}\"\n [columns]=\"item.colsTable\"\n styleClass=\"p-datatable-striped p-datatable-sm\"\n [value]=\"item.rowsTable\"\n >\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n @for (col of columns; track col) {\n <th>\n @if (col.filed !== 'action') {\n <span>{{ col.header }}</span>\n }\n @if (col.filed === 'action') {\n <span>A\u00E7\u00E3o</span>\n }\n </th>\n }\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\n <tr>\n @for (col of columns; track col) {\n <td>\n @if (col.field !== 'button') {\n <div>\n {{ rowData[col.field] }}\n </div>\n }\n @if (col.field === 'action') {\n <div>\n @for (action of item.buttonsTable; track action) {\n <p-button\n styleClass=\"{{ action.styleClass }}\"\n label=\"{{ action.label }}\"\n (click)=\"action.onCLick(rowData)\"\n icon=\"{{ action.icon }}\"\n ></p-button>\n }\n </div>\n }\n </td>\n }\n </tr>\n </ng-template>\n <ng-template pTemplate=\"footer\" let-columns>\n @for (footer of item.rowsFooter; track footer) {\n <tr>\n <td colspan=\"12\">\n <span class=\"font-normal\">{{ footer.text }}:</span>\n {{ footer.value }}\n </td>\n </tr>\n }\n </ng-template>\n </p-table>\n }\n <!-- inputSwitch -->\n @if (item.type === 'switch') {\n <div class=\"d-flex\">\n <p-toggleswitch\n id=\"{{ item.id }}\"\n formControlName=\"{{ item.formControl }}\"\n class=\"mr-10\"\n (onChange)=\"onChange(item.onChange)\"\n ></p-toggleswitch>\n <p translate=\"{{ item.label }}\"></p>\n </div>\n }\n <!-- password -->\n @if (item.type === 'password') {\n <p-password\n id=\"{{ item.id }}\"\n [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\"\r\n placeholder=\"{{ item.placeholder }}\"\n [feedback]=\"false\"\n formControlName=\"{{ item.formControl }}\"\n (onChange)=\"onChange(item.onChange)\"\n styleClass=\"w-full\"\n [toggleMask]=\"true\"\n ></p-password>\n }\n <!-- photo -->\n @if (item.type === 'photo') {\n <div id=\"{{ item.id }}\" class=\"camera\">\n <video id=\"video\" class=\"foto\" autoplay>\n V\u00EDdeo n\u00E3o dispon\u00EDvel.\n </video>\n <canvas id=\"canvas\" class=\"foto\" style=\"display: none\"></canvas>\n <button\n pButton\n icon=\"pi pi-times\"\n class=\"remove-file\"\n id=\"icon-remove\"\n [rounded]=\"true\"\n style=\"visibility: collapse\"\n (click)=\"removePhoto()\"\n ></button>\n <button\n pButton\n icon=\"pi pi-camera\"\n [rounded]=\"true\"\n (click)=\"capturePhoto(item.formControl)\"\n id=\"button\"\n ></button>\n </div>\n }\n <!-- likert -->\n @if (item.type === 'likert') {\n <p-table\n id=\"{{ item.id }}\"\n [scrollable]=\"true\"\n scrollHeight=\"{{ item.scrollHeight }}\"\n [columns]=\"item.colsTable\"\n styleClass=\"p-datatable-striped p-datatable-sm\"\n [value]=\"item.rowsTable\"\n >\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th class=\"fd-table-label-column\"></th>\n @for (col of columns; track col) {\n <th>\n <span>{{ col.header }}</span>\n </th>\n }\n </tr>\n </ng-template>\n <ng-template\n pTemplate=\"body\"\n let-row\n let-rowIndex=\"rowIndex\"\n let-columns=\"columns\"\n formArrayName=\"{{ item.formControl }}\"\n >\n <tr>\n <td>\n {{ row }}\n </td>\n @for (control of columns; track item; let index = $index) {\n <td [formGroupName]=\"rowIndex\">\n <p-radioButton\n value=\"{{ columns[index].field }}+{{ row }}\"\n formControlName=\"question{{ rowIndex }}\"\n />\n </td>\n }\n </tr>\n </ng-template>\n </p-table>\n }\n <!-- editable table -->\n @if (item.type === 'editable-table') {\n <p-table\n id=\"{{ item.id }}\"\n [scrollable]=\"true\"\n scrollHeight=\"{{ item.scrollHeight }}\"\n [columns]=\"item.colsTable\"\n styleClass=\"p-datatable-striped p-datatable-sm\"\n [value]=\"item.rowsTable\"\n editMode=\"cell\"\n >\n <!-- Cabe\u00E7alho da tabela -->\n <ng-template pTemplate=\"header\" let-columns>\n <tr>\n <th class=\"fd-table-label-column\"></th>\n @for (col of columns; track col) {\n <th>\n <span>{{ col.header }}</span>\n </th>\n }\n </tr>\n </ng-template>\n <!-- Corpo da tabela -->\n <ng-template\n pTemplate=\"body\"\n let-row\n let-rowIndex=\"rowIndex\"\n let-columns=\"columns\"\n formArrayName=\"{{ item.formControl }}\"\n let-editing=\"editing\"\n >\n <tr>\n <td>{{ row }}</td>\n @for (control of columns; track item; let index = $index) {\n <td\n [formGroupName]=\"rowIndex\"\n [pEditableColumn]=\"row\"\n pEditableColumnField=\"row\"\n >\n <p-cellEditor>\n <ng-template pTemplate=\"input\">\n <input\n pInputText\n type=\"text\"\n formControlName=\"_{{ control.field }}question{{\r\n rowIndex\r\n }}\"\r\n />\n </ng-template>\n <ng-template pTemplate=\"output\">\n <input\n pInputText\n type=\"text\"\n formControlName=\"_{{ control.field }}question{{\r\n rowIndex\r\n }}\"\r\n />\n </ng-template>\n </p-cellEditor>\n </td>\n }\n </tr>\n </ng-template>\n </p-table>\n }\n <!-- valida\u00E7\u00E3o de item -->\n <div>\n @if (validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['required']) {\n <small\n class=\"danger-text\"\n >\n Campo obrigat\u00F3rio\n </small>\n }\n @if (validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['email']) {\n <small\n class=\"danger-text\"\n >\n Email inv\u00E1lido\n </small>\n }\n </div>\n </div>\n </div>\n }\n @if (\n (buttonsStandard && buttonsStandard.length > 0) ||\n (buttonsOptional && buttonsOptional.length > 0)\n ) {\n <p-divider\n ></p-divider>\n }\n <div class=\"buttons-form\">\n @for (button of buttonsStandard; track button) {\n <div>\n @if (button.type === 'clean') {\n <p-button\n styleClass=\"p-button-warning {{ button.styleClass }}\"\n label=\"Limpar\"\n (click)=\"button.onCLick()\"\n icon=\"pi pi-times\"\n ></p-button>\n }\n @if (button.type === 'filter') {\n <p-button\n styleClass=\"{{ button.styleClass }}\"\n label=\"Filtrar\"\n (click)=\"button.onCLick()\"\n icon=\"pi pi-search\"\n ></p-button>\n }\n @if (button.type === 'save') {\n <p-button\n styleClass=\"p-button-success {{ button.styleClass }}\"\n label=\"Salvar\"\n (click)=\"button.onCLick()\"\n icon=\"pi pi-save\"\n ></p-button>\n }\n @if (button.type === 'cancel') {\n <p-button\n styleClass=\"p-button-danger {{ button.styleClass }}\"\n label=\"Cancelar\"\n (click)=\"button.onCLick()\"\n icon=\"pi pi-times\"\n ></p-button>\n }\n </div>\n }\n @for (button of buttonsOptional; track button) {\n <div>\n <p-button\n styleClass=\"{{ button.styleClass }}\"\n label=\"{{ button.label }}\"\n (click)=\"button.onCLick()\"\n icon=\"{{ button.icon }}\"\n ></p-button>\n </div>\n }\n </div>\n </div>\n </form>\n }\n </div>\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}.fd-table-label-column{width:4rem}\n"] }]
193
193
  }], ctorParameters: () => [{ type: i1.TranslateService }, { type: i2.FormBuilder }], propDecorators: { title: [{
194
194
  type: Input
195
195
  }], subTitle: [{
@@ -212,8 +212,8 @@ function HttpLoaderFactory(http) {
212
212
  return new TranslateHttpLoader(http);
213
213
  }
214
214
  class FormDynamicAngularModule {
215
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
216
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, declarations: [FormDynamicAngularComponent], imports: [InputMaskModule,
215
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: FormDynamicAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
216
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.26", ngImport: i0, type: FormDynamicAngularModule, declarations: [FormDynamicAngularComponent], imports: [InputMaskModule,
217
217
  InputNumberModule,
218
218
  PasswordModule,
219
219
  ButtonModule,
@@ -222,21 +222,20 @@ class FormDynamicAngularModule {
222
222
  MultiSelectModule,
223
223
  CommonModule,
224
224
  SelectButtonModule,
225
- InputSwitchModule,
225
+ ToggleSwitchModule,
226
226
  CheckboxModule,
227
- InputTextareaModule,
227
+ TextareaModule,
228
228
  InputTextModule,
229
229
  DividerModule,
230
- CalendarModule,
231
- DropdownModule,
230
+ DatePickerModule,
231
+ SelectModule,
232
232
  TreeSelectModule,
233
233
  RadioButtonModule,
234
234
  AutoCompleteModule,
235
235
  ReactiveFormsModule,
236
- HttpClientModule,
237
- OverlayPanelModule,
236
+ PopoverModule,
238
237
  EditorModule, i1.TranslateModule], exports: [FormDynamicAngularComponent] }); }
239
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, imports: [InputMaskModule,
238
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: FormDynamicAngularModule, providers: [provideHttpClient(withInterceptorsFromDi())], imports: [InputMaskModule,
240
239
  InputNumberModule,
241
240
  PasswordModule,
242
241
  ButtonModule,
@@ -245,19 +244,18 @@ class FormDynamicAngularModule {
245
244
  MultiSelectModule,
246
245
  CommonModule,
247
246
  SelectButtonModule,
248
- InputSwitchModule,
247
+ ToggleSwitchModule,
249
248
  CheckboxModule,
250
- InputTextareaModule,
249
+ TextareaModule,
251
250
  InputTextModule,
252
251
  DividerModule,
253
- CalendarModule,
254
- DropdownModule,
252
+ DatePickerModule,
253
+ SelectModule,
255
254
  TreeSelectModule,
256
255
  RadioButtonModule,
257
256
  AutoCompleteModule,
258
257
  ReactiveFormsModule,
259
- HttpClientModule,
260
- OverlayPanelModule,
258
+ PopoverModule,
261
259
  EditorModule,
262
260
  TranslateModule.forRoot({
263
261
  loader: {
@@ -267,14 +265,14 @@ class FormDynamicAngularModule {
267
265
  },
268
266
  })] }); }
269
267
  }
270
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, decorators: [{
268
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: FormDynamicAngularModule, decorators: [{
271
269
  type: NgModule,
272
- args: [{
273
- declarations: [
270
+ args: [{ declarations: [
274
271
  FormDynamicAngularComponent
275
272
  ],
276
- imports: [
277
- InputMaskModule,
273
+ exports: [
274
+ FormDynamicAngularComponent
275
+ ], imports: [InputMaskModule,
278
276
  InputNumberModule,
279
277
  PasswordModule,
280
278
  ButtonModule,
@@ -283,19 +281,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
283
281
  MultiSelectModule,
284
282
  CommonModule,
285
283
  SelectButtonModule,
286
- InputSwitchModule,
284
+ ToggleSwitchModule,
287
285
  CheckboxModule,
288
- InputTextareaModule,
286
+ TextareaModule,
289
287
  InputTextModule,
290
288
  DividerModule,
291
- CalendarModule,
292
- DropdownModule,
289
+ DatePickerModule,
290
+ SelectModule,
293
291
  TreeSelectModule,
294
292
  RadioButtonModule,
295
293
  AutoCompleteModule,
296
294
  ReactiveFormsModule,
297
- HttpClientModule,
298
- OverlayPanelModule,
295
+ PopoverModule,
299
296
  EditorModule,
300
297
  TranslateModule.forRoot({
301
298
  loader: {
@@ -303,12 +300,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
303
300
  useFactory: HttpLoaderFactory,
304
301
  deps: [HttpClient]
305
302
  },
306
- })
307
- ],
308
- exports: [
309
- FormDynamicAngularComponent
310
- ]
311
- }]
303
+ })], providers: [provideHttpClient(withInterceptorsFromDi())] }]
312
304
  }] });
313
305
 
314
306
  /*