form-dynamic-ajax 7.0.4 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,30 +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
+ import * as i23 from 'primeng/editor';
47
+ import { EditorModule } from 'primeng/editor';
46
48
  import { TranslateHttpLoader } from '@ngx-translate/http-loader';
47
- import { HttpClientModule, HttpClient } from '@angular/common/http';
49
+ import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
48
50
  import { FileUploadModule } from 'primeng/fileupload';
49
51
 
50
52
  class FormDynamicAngularComponent {
@@ -182,12 +184,12 @@ class FormDynamicAngularComponent {
182
184
  blur();
183
185
  }
184
186
  }
185
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularComponent, deps: [{ token: i1.TranslateService }, { token: i2.FormBuilder }], target: i0.ɵɵFactoryTarget.Component }); }
186
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: FormDynamicAngularComponent, selector: "form-dynamic-angular", inputs: { title: "title", subTitle: "subTitle", validateForm: "validateForm", form: "form", control: "control", buttonsStandard: "buttonsStandard", buttonsOptional: "buttonsOptional", files: "files" }, ngImport: i0, template: "<div>\r\n <div *ngIf=\"title\" class=\"div-title\">\r\n <span translate={{title}}></span>\r\n <div *ngIf=\"subTitle\" class=\"flex subtitle\">\r\n <span translate={{subTitle}}></span>\r\n </div>\r\n <p-divider></p-divider>\r\n </div>\r\n <form *ngIf=\"control\" [formGroup]=\"control\">\r\n <div class=\"grid\">\r\n <div *ngFor=\"let item of form\" class=\"{{item.col}} col-12\">\r\n <label *ngIf=\"item.label && !item.hideLabelTop\">{{item.label}}</label>\r\n <label *ngIf=\"item.required && item.label\" class=\"danger-text ml-2\">*</label>\r\n\r\n <div class=\"mt-2\">\r\n <!-- text -->\r\n <input id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" pInputText placeholder={{item.placeholder}} *ngIf=\"item.type == 'text' || item.type == 'number' \"\r\n type={{item.type}} formControlName={{item.formControl}} class=\"w-full\" />\r\n\r\n <!-- select -->\r\n <p-dropdown id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" [filter]=item.search emptyFilterMessage=\"Nenhum dado encontrado\"\r\n emptyMessage=\"Nenhum dado encontrado\" placeholder={{item.placeholder}} styleClass=\"w-full p-0\"\r\n (onChange)=\"onChange(item.onChange)\" *ngIf=\"item.type === 'select'\" [showClear]=\"true\"\r\n [options]=\"item.options\" formControlName={{item.formControl}} optionLabel=\"description\"\r\n (onClear)=\"clickCLear(item.onCLear)\"></p-dropdown>\r\n\r\n <!-- currency -->\r\n <p-inputNumber id={{item.id}} *ngIf=\"item.type === 'currency'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} placeholder={{item.placeholder}} inputStyleClass=\"w-full\"\r\n styleClass=\"w-full\" (onKeyDown)=\"onChange(item.onChange)\" mode=\"currency\" [min]=\"0\"\r\n currency=\"BRL\">\r\n </p-inputNumber>\r\n\r\n <!-- mask -->\r\n <p-inputMask id={{item.id}} *ngIf=\"item.type === 'mask'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} placeholder={{item.placeholder}} styleClass=\"w-full\"\r\n (onComplete)=\"onChange(item.onChange)\" mask={{item.mask}} unmask={{item.unmask}}\r\n (onClear)=\"clickCLear(item.onCLear)\" showClear=\"true\"></p-inputMask>\r\n\r\n <!-- treeSelect -->\r\n <p-treeSelect id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} (onNodeSelect)=\"onChange(item.onChange)\"\r\n *ngIf=\"item.type === 'tree-select'\" containerStyleClass=\"w-full p-0\"\r\n formControlName={{item.formControl}} [options]=\"item.treeSelectOptions\" [filter]=\"true\"\r\n [filterInputAutoFocus]=\"true\" emptyMessage=\"Nenhum dado encontrado\" [showClear]=\"true\"\r\n (onClear)=\"clickCLear(item.onCLear)\"></p-treeSelect>\r\n\r\n <!-- autoComplete -->\r\n <p-autoComplete inputId={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} styleClass=\"w-full p-0\" [inputStyle]=\"{'width':'100%'}\"\r\n *ngIf=\"item.type === 'autocomplete'\" (onSelect)=\" onChange(item.onChange)\"\r\n formControlName={{item.formControl}} [suggestions]=\"filteredAutoComplete\"\r\n (completeMethod)=\"filterAutoComplete($event, item.options)\" [forceSelection]=\"false\"\r\n [showEmptyMessage]=\"true\" emptyMessage=\"Nenhum dado encontrado\" dataKey=\"code\"\r\n field=\"description\" showClear=true (onClear)=\"clickCLear(item.onCLear)\"></p-autoComplete>\r\n\r\n <!-- date -->\r\n <p-calendar id={{item.id}} view=\"{{item.viewDate}}\" *ngIf=\"item.type === 'date'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} styleClass=\"w-full\"\r\n [numberOfMonths]=numberOfMonthsDate(item.numberOfMonthsDate)\r\n [selectionMode]=selectionMode(item.selectionMode) (onFocus)=\"onChange(item.onFocusDate)\"\r\n [maxDate]=\"item.maxDate\" [minDate]=\"item.minDate\" dateFormat=\"{{item.dateFormat}}\"\r\n (onSelect)=\"onChange(item.onChange)\" [iconDisplay]=\"'input'\" placeholder={{item.placeholder}}\r\n [showIcon]=\"true\" [showTime]=\"item.showTime\" [timeOnly]=\"item.timeOnly\"></p-calendar>\r\n\r\n <!-- textarea -->\r\n <div *ngIf=\"item.type === 'text-area'\" class=\"text-right\">\r\n <textarea id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} class=\"w-full\" maxlength=\"{{item.maxlength}}\"\r\n counterTemplate=\"{1} of 50, {0} remaining\" counter=\"display\"\r\n (attr.change)=\"onChange(item.onChange)\" pInputTextarea formControlName={{item.formControl}}\r\n rows={{item.rowsTextArea}}></textarea>\r\n <small *ngIf=\"item.maxlength\" id=\"username-help\">\r\n {{control.controls[item.formControl].value.length}}/{{item.maxlength}}\r\n </small>\r\n </div>\r\n\r\n <!-- checkbox -->\r\n <div *ngIf=\"item.type == 'check-box'\">\r\n <p-checkbox id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" (onChange)=\"onChange(item.onChange)\" binary=\"true\" formControlName={{item.formControl}}\r\n value={{item.formControl}} label={{item.label}}></p-checkbox>\r\n </div>\r\n\r\n <!-- checkbox multiple -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'check-box-multi'\" class=\"flex gap-3\">\r\n <div formArrayName=\"{{item.formControl}}\" *ngFor=\"let list of item.options; let i = index\"\r\n class=\"flex align-items-center gap-2\">\r\n <div [formGroupName]=\"i\">\r\n <p-checkbox id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" (onChange)=\"onChange(item.onChange)\" binary=\"true\" formControlName=\"{{list.code}}\"\r\n label={{list.description}}></p-checkbox>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- button -->\r\n <p-button id={{item.id}} *ngIf=\"item.type == 'button'\" styleClass='{{item.buttonClass}} w-full mt-3'\r\n (click)=\"item.onCLick()\" [disabled]=item.disabled icon={{item.iconButton}}\r\n label={{item.label}}></p-button>\r\n\r\n <!-- can -->\r\n <div id={{item.id}} class=\"area\" *ngIf=\"item.type == 'can'\">\r\n <video autoplay=\"true\" id=\"webCamera\">\r\n </video>\r\n\r\n <input type=\"text\" id=\"base_img\" name=\"base_img\">\r\n <button type=\"button\" onclick=\"takeSnapShot()\">Tirar foto e salvar</button>\r\n\r\n <img id=\"imagemConvertida\">\r\n <p id=\"caminhoImagem\" class=\"caminho-imagem\"><a href=\"\" target=\"_blank\" rel=\"noopener\"></a></p>\r\n <script src=\"script.js\"></script>\r\n </div>\r\n\r\n <!-- upload files -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'upload-files' && !item.disabled \" class=\"drag-image\"\r\n [style.border]=\"validateForm && control.controls[item.formControl].errors ? ' 1px dashed #f18282' : ' 1px dashed #d1d5db'\">\r\n <i *ngIf=\"filesView.length === 0\" class=\"pi pi-cloud-upload\"></i>\r\n <p *ngIf=\"filesView.length === 0\">Clique ou arraste e solte um arquivo para anexar</p>\r\n <span *ngIf=\"filesView.length === 0\">{{item.msgAcceptFiles}}</span>\r\n <input id=\"fileInput\" type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event, item.multileFile)\" />\r\n <div *ngFor=\"let f of filesView\">\r\n <div *ngIf=\"f.type && f.type.includes('image')\">\r\n <label class=\"preview-img\">\r\n <img *ngIf=\"!f.content\" src='{{getUrl(f)}}'>\r\n <img *ngIf=\"f.content\" src='{{f.content}}'>\r\n <span *ngIf=\"item.viewNameFile\">{{ f.name }}</span>\r\n <input type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event,item.multileFile)\" />\r\n <label> <i class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(item.formControl, f)\"></i></label>\r\n </label>\r\n </div>\r\n <div *ngIf=\"f.type && !f.type.includes('image')\">\r\n <label class=\"preview-img h-0 max-w-0 mh-75 m-0\">\r\n <label class=\"mr-3\">{{ f.name }}</label>\r\n <input type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event,item.multileFile)\" />\r\n <label> <i class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(f)\"></i></label>\r\n\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- upload files disabled -->\r\n <!-- <p-fileUpload mode=\"basic\" formControlName=\"{{item.formControl}}\" chooseLabel=\"Choose\"\r\n chooseIcon=\"pi pi-upload\" accept=\"image/*\" maxFileSize=\"1000000\" /> -->\r\n\r\n <div id={{item.id}} *ngIf=\"item.type === 'upload-files' && item.disabled \">\r\n <p-button (click)=\"op.toggle($event)\" icon=\"pi pi-paperclip\"\r\n label=\"Arquivos anexados\"></p-button>\r\n\r\n <p-overlayPanel #op [style]=\"{'width': '450px'}\" [showCloseIcon]=\"true\">\r\n <ng-template pTemplate=\"content\">\r\n <p-table *ngIf=\"files.length > 0\" [value]=\"files\" selectionMode=\"single\"\r\n [(selection)]=\"selectedProduct\" (onRowSelect)=\"onRowSelect($event, op)\"\r\n responsiveLayout=\"scroll\">\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th pSortableColumn=\"name\">Nome<p-sortIcon field=\"name\"></p-sortIcon></th>\r\n <th></th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-file>\r\n <tr>\r\n <td *ngIf=\"item.viewNameFile\">{{file.name}}</td>\r\n <td> <p-button *ngIf=\"item.onCLick\" icon=\"pi pi-download\"\r\n (click)='item.onCLick(file)'></p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div *ngIf=\"files.length === 0\" class=\"p-10\">\r\n <label>Nenhum arquivo anexado</label>\r\n </div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n </div>\r\n\r\n <!-- list -->\r\n <ul id={{item.id}} *ngIf=\"item.type === 'list' && item.options\">\r\n <li *ngFor=\"let list of item.options\">{{list.description}}</li>\r\n </ul>\r\n\r\n <!-- multi -->\r\n <p-multiSelect id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} *ngIf=\"item.type === 'multi'\" [options]=\"item.options\"\r\n formControlName={{item.formControl}} styleClass=\"p-0 w-full\" optionLabel=\"description\"\r\n (onChange)=\"onChange(item.onChange)\" maxSelectedLabels=\"100\"></p-multiSelect>\r\n\r\n <!-- radioButton -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'radio-button'\" class=\"flex gap-3\">\r\n <div *ngFor=\"let listRadioButton of item.options\" class=\"flex align-items-center gap-2\">\r\n <p-radioButton [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" [value]=\"listRadioButton.code\" formControlName={{item.formControl}}\r\n (onClick)=\"onChange(item.onChange)\"></p-radioButton>\r\n <label>{{listRadioButton.description}}</label>\r\n </div>\r\n @if(control.controls[item.formControl].value == 'other'){\r\n <input pInputText type=\"text\" formControlName={{item.formControlOther}} />\r\n }\r\n </div>\r\n\r\n <!-- selectButton -->\r\n <div class=\"d-flex\" *ngIf=\"item.type === 'select-button'\">\r\n <p-selectButton id={{item.id}} (onChange)=\"onChange(item.onChange)\" [options]=\"item.options\"\r\n formControlName={{item.formControl}} optionValue=\"code\">\r\n <ng-template let-item>\r\n <span>{{item.description}}</span>\r\n </ng-template>\r\n </p-selectButton>\r\n <!-- <input type=\"text\" pInputText [attr.disabled]=\"item.disabled\"\r\n formControlName={{item.formControlSecondary}}> -->\r\n </div>\r\n\r\n <!-- table -->\r\n <p-table id={{item.id}} *ngIf=\"item.type === 'table'\" [scrollable]=\"true\"\r\n scrollHeight={{item.scrollHeight}} [columns]=item.colsTable\r\n styleClass=\"p-datatable-striped p-datatable-sm\" [value]=item.rowsTable>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngFor=\"let col of columns\">\r\n <span *ngIf=\"col.filed !== 'action'\">{{ col.header }}</span>\r\n <span *ngIf=\"col.filed === 'action'\">A\u00E7\u00E3o</span>\r\n </th>\r\n\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n <tr>\r\n <td *ngFor=\"let col of columns\">\r\n <div *ngIf=\"col.field !== 'button'\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n <div *ngIf=\"col.field === 'action'\">\r\n <p-button *ngFor=\"let action of item.buttonsTable\"\r\n styleClass={{action.styleClass}} label={{action.label}}\r\n (click)=\"action.onCLick(rowData)\" icon={{action.icon}}></p-button>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" let-columns>\r\n <tr *ngFor=\"let footer of item.rowsFooter\">\r\n <td colspan=12><span class=\"font-normal\">{{footer.text}}:</span> {{footer.value}}</td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- inputSwitch -->\r\n <div class=\"d-flex\" *ngIf=\"item.type === 'switch'\">\r\n <p-inputSwitch id={{item.id}} formControlName={{item.formControl}} class=\"mr-10\"\r\n (onChange)=\"onChange(item.onChange)\"></p-inputSwitch>\r\n <p translate={{item.label}}></p>\r\n </div>\r\n\r\n <!-- password -->\r\n <p-password id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} *ngIf=\"item.type === 'password'\" [feedback]=\"false\"\r\n formControlName={{item.formControl}} (onChange)=\"onChange(item.onChange)\" styleClass=\"w-full\"\r\n [toggleMask]=\"true\"></p-password>\r\n\r\n <!-- photo -->\r\n <div id={{item.id}} class=\"camera\" *ngIf=\"item.type === 'photo'\">\r\n <video id=\"video\" class=\"foto\" autoplay>V\u00EDdeo n\u00E3o dispon\u00EDvel.</video>\r\n <canvas id=\"canvas\" class=\"foto\" style=\"display: none;\"></canvas>\r\n <button pButton icon=\"pi pi-times\" class=\"remove-file\" id=\"icon-remove\" [rounded]=\"true\"\r\n style=\"visibility: collapse;\" (click)=\"removePhoto()\"></button>\r\n <button pButton icon=\"pi pi-camera\" [rounded]=\"true\" (click)=\"capturePhoto(item.formControl)\"\r\n id=\"button\"></button>\r\n </div>\r\n\r\n <!-- likert -->\r\n <p-table id={{item.id}} *ngIf=\"item.type === 'likert'\" [scrollable]=\"true\"\r\n scrollHeight={{item.scrollHeight}} [columns]=item.colsTable\r\n styleClass=\"p-datatable-striped p-datatable-sm\" [value]=item.rowsTable>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th style=\"width: 4rem\"></th>\r\n <th *ngFor=\"let col of columns\">\r\n <span>{{ col.header }}</span>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\" let-columns=\"columns\"\r\n formArrayName=\"{{item.formControl}}\">\r\n <tr>\r\n <td>\r\n {{row}}\r\n </td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td [formGroupName]=\"rowIndex\">\r\n <p-radioButton value=\"{{columns[index].field}}+{{row}}\"\r\n formControlName=\"question{{rowIndex}}\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- editable table -->\r\n <p-table\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'editable-table'\"\r\n [scrollable]=\"true\"\r\n scrollHeight=\"{{ item.scrollHeight }}\"\r\n [columns]=\"item.colsTable\"\r\n styleClass=\"p-datatable-striped p-datatable-sm\"\r\n [value]=\"item.rowsTable\"\r\n editMode=\"cell\">\r\n\r\n <!-- Cabe\u00E7alho da tabela -->\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th></th>\r\n <th *ngFor=\"let col of columns\">\r\n <span>{{ col.header }}</span>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Corpo da tabela -->\r\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\" let-columns=\"columns\"\r\n formArrayName=\"{{ item.formControl }}\" let-editing=\"editing\">\r\n <tr>\r\n <td>{{ row }}</td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td [formGroupName]=\"rowIndex\" [pEditableColumn]=\"row\" pEditableColumnField=\"row\">\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <input class=\"w-full\" pInputText type=\"text\" formControlName=\"_{{control.field}}question{{ rowIndex }}\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <input class=\"w-full\" pInputText type=\"text\" formControlName=\"_{{control.field}}question{{ rowIndex }}\" />\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n\r\n <!-- valida\u00E7\u00E3o de item -->\r\n <div>\r\n <small class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['required']\">\r\n Campo obrigat\u00F3rio\r\n </small>\r\n <small class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['email']\">\r\n Email inv\u00E1lido\r\n </small>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <p-divider\r\n *ngIf=\"(buttonsStandard && buttonsStandard.length > 0) || (buttonsOptional && buttonsOptional.length > 0)\"></p-divider>\r\n\r\n <div class=\"buttons-form\">\r\n <div *ngFor=\"let button of buttonsStandard\">\r\n <p-button *ngIf=\"button.type === 'clean'\" styleClass=\"p-button-warning {{button.styleClass}}\"\r\n label=\"Limpar\" (click)=\"button.onCLick()\" icon=\"pi pi-times\"></p-button>\r\n <p-button *ngIf=\"button.type === 'filter'\" styleClass=\"{{button.styleClass}}\" label=\"Filtrar\"\r\n (click)=\"button.onCLick()\" icon=\"pi pi-search\"></p-button>\r\n <p-button *ngIf=\"button.type === 'save'\" styleClass=\"p-button-success {{button.styleClass}}\"\r\n label=\"Salvar\" (click)=\"button.onCLick()\" icon=\"pi pi-save\"></p-button>\r\n <p-button *ngIf=\"button.type === 'cancel'\" styleClass=\"p-button-danger {{button.styleClass}}\"\r\n label=\"Cancelar\" (click)=\"button.onCLick()\" icon=\"pi pi-times\"></p-button>\r\n </div>\r\n <div *ngFor=\"let button of buttonsOptional\">\r\n <p-button styleClass={{button.styleClass}} label={{button.label}} (click)=\" button.onCLick()\"\r\n icon={{button.icon}}></p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [".div-title span{font-size:20px;font-weight:500}.buttons-form{display:flex;gap:10px;justify-content:flex-end}.danger-text{color:#f18282}.drag-image{height:auto;width:100%;border-radius:10px;font-weight:400;display:flex;align-items:center;flex-direction:column;top:20px;max-height:250px;color:#000;padding:20px;text-align:center;overflow:auto}.drag-image h6{font-size:20px}.drag-image .file-name{font-size:14px}.drag-image i{font-size:3rem}.subtitle span{font-size:14px;margin-right:5px}.subtitle{align-items:baseline}.mh-75{min-height:75px!important}input[type=file]{position:absolute;width:100%;height:100%;inset:0;opacity:0;cursor:pointer}.preview-img{align-items:center;border-radius:5px;display:flex;height:140px;justify-content:center;margin:10px;max-width:180px;min-height:140px;min-width:180px;padding:0 20px;position:relative}.preview-img span{position:absolute;overflow-wrap:break-word}.remove-file{display:flex;justify-content:center;align-items:center;height:22px;width:22px;top:5px;right:5px;border-radius:50%;background:#bbb;color:#333;cursor:pointer;font-size:.8rem!important}.preview-img img{max-width:100%;opacity:.8}.camera{display:flex;flex-direction:column;align-items:center;position:relative}.foto{max-width:186px;min-height:140px;min-width:180px;border:1px dashed #000;border-radius:5px;margin-bottom:1em}.preview-photo{position:relative}.h-0{height:0}\n"], dependencies: [{ kind: "component", type: i3.InputMask, selector: "p-inputMask", inputs: ["type", "slotChar", "autoClear", "showClear", "style", "inputId", "styleClass", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabel", "ariaLabelledBy", "ariaRequired", "disabled", "readonly", "unmask", "name", "required", "characterPattern", "autoFocus", "autocomplete", "keepBuffer", "mask"], outputs: ["onComplete", "onFocus", "onBlur", "onInput", "onKeydown", "onClear"] }, { kind: "directive", type: i4.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: i5.InputNumber, selector: "p-inputNumber", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "style", "placeholder", "size", "maxlength", "tabindex", "title", "ariaLabelledBy", "ariaLabel", "ariaRequired", "name", "required", "autocomplete", "min", "max", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "step", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "disabled"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "component", type: i6.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "disabled", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "appendTo", "toggleMask", "inputStyleClass", "styleClass", "style", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "autocomplete", "placeholder", "showClear"], outputs: ["onFocus", "onBlur", "onClear"] }, { kind: "directive", type: i7.ButtonDirective, selector: "[pButton]", inputs: ["iconPos", "loadingIcon", "label", "icon", "loading"] }, { kind: "component", type: i7.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "size", "style", "styleClass", "badgeClass", "ariaLabel"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i8.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "style", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "scrollDirection", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "responsive", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "autoLayout", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll", "virtualRowHeight"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i8.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i8.EditableColumn, selector: "[pEditableColumn]", inputs: ["pEditableColumn", "pEditableColumnField", "pEditableColumnRowIndex", "pEditableColumnDisabled", "pFocusCellSelector"] }, { kind: "component", type: i8.CellEditor, selector: "p-cellEditor" }, { kind: "component", type: i8.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i9.MultiSelect, selector: "p-multiSelect", inputs: ["id", "ariaLabel", "style", "styleClass", "panelStyle", "panelStyleClass", "inputId", "disabled", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "appendTo", "dataKey", "name", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "defaultLabel", "placeholder", "options", "filterValue", "itemSize", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "directive", type: i10.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i10.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i10.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i11.SelectButton, selector: "p-selectButton", inputs: ["options", "optionLabel", "optionValue", "optionDisabled", "unselectable", "tabindex", "multiple", "allowEmpty", "style", "styleClass", "ariaLabelledBy", "disabled", "dataKey"], outputs: ["onOptionClick", "onChange"] }, { kind: "component", type: i12.InputSwitch, selector: "p-inputSwitch", inputs: ["style", "styleClass", "tabindex", "inputId", "name", "disabled", "readonly", "trueValue", "falseValue", "ariaLabel", "ariaLabelledBy"], outputs: ["onChange"] }, { kind: "component", type: i13.Checkbox, selector: "p-checkbox", inputs: ["value", "name", "disabled", "binary", "label", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "style", "styleClass", "labelStyleClass", "formControl", "checkboxIcon", "readonly", "required", "trueValue", "falseValue"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "directive", type: i14.InputTextarea, selector: "[pInputTextarea]", inputs: ["autoResize"], outputs: ["onResize"] }, { kind: "directive", type: i15.InputText, selector: "[pInputText]" }, { kind: "component", type: i16.Divider, selector: "p-divider", inputs: ["style", "styleClass", "layout", "type", "align"] }, { kind: "component", type: i17.Calendar, selector: "p-calendar", inputs: ["iconDisplay", "style", "styleClass", "inputStyle", "inputId", "name", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "disabled", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "appendTo", "readonlyInput", "shortYearCutoff", "monthNavigator", "yearNavigator", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "required", "showOnFocus", "showWeek", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "yearRange", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "locale", "view", "defaultDate"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: i18.Dropdown, selector: "p-dropdown", inputs: ["id", "scrollHeight", "filter", "name", "style", "panelStyle", "styleClass", "panelStyleClass", "readonly", "required", "editable", "appendTo", "tabindex", "placeholder", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "dropdownIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "autoDisplayFirst", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "maxlength", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "disabled", "itemSize", "autoZIndex", "baseZIndex", "showTransitionOptions", "hideTransitionOptions", "filterValue", "options"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "component", type: i19.TreeSelect, selector: "p-treeSelect", inputs: ["inputId", "scrollHeight", "disabled", "metaKeySelection", "display", "selectionMode", "tabindex", "ariaLabel", "ariaLabelledBy", "placeholder", "panelClass", "panelStyle", "panelStyleClass", "containerStyle", "containerStyleClass", "labelStyle", "labelStyleClass", "overlayOptions", "emptyMessage", "appendTo", "filter", "filterBy", "filterMode", "filterPlaceholder", "filterLocale", "filterInputAutoFocus", "propagateSelectionDown", "propagateSelectionUp", "showClear", "resetFilterOnHide", "options", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onNodeExpand", "onNodeCollapse", "onShow", "onHide", "onClear", "onFilter", "onNodeUnselect", "onNodeSelect"] }, { kind: "component", type: i20.RadioButton, selector: "p-radioButton", inputs: ["value", "formControlName", "name", "disabled", "label", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "style", "styleClass", "labelStyleClass"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "component", type: i21.AutoComplete, selector: "p-autoComplete", inputs: ["minLength", "delay", "style", "panelStyle", "styleClass", "panelStyleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "readonly", "disabled", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "maxlength", "name", "required", "size", "appendTo", "autoHighlight", "forceSelection", "type", "autoZIndex", "baseZIndex", "ariaLabel", "dropdownAriaLabel", "ariaLabelledBy", "dropdownIcon", "unique", "group", "completeOnFocus", "showClear", "field", "dropdown", "showEmptyMessage", "dropdownMode", "multiple", "tabindex", "dataKey", "emptyMessage", "showTransitionOptions", "hideTransitionOptions", "autofocus", "autocomplete", "optionGroupChildren", "optionGroupLabel", "overlayOptions", "suggestions", "itemSize", "optionLabel", "id", "searchMessage", "emptySelectionMessage", "selectionMessage", "autoOptionFocus", "selectOnFocus", "searchLocale", "optionDisabled", "focusOnHover"], outputs: ["completeMethod", "onSelect", "onUnselect", "onFocus", "onBlur", "onDropdownClick", "onClear", "onKeyUp", "onShow", "onHide", "onLazyLoad"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i2.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { kind: "directive", type: i2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "component", type: i22.OverlayPanel, selector: "p-overlayPanel", inputs: ["ariaLabel", "ariaLabelledBy", "dismissable", "showCloseIcon", "style", "styleClass", "appendTo", "autoZIndex", "ariaCloseLabel", "baseZIndex", "focusOnShow", "showTransitionOptions", "hideTransitionOptions"], outputs: ["onShow", "onHide"] }, { kind: "directive", type: i1.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
187
+ 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 style=\"width: 4rem\"></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 style=\"width: 4rem\"></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}\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 }); }
187
189
  }
188
- 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: [{
189
191
  type: Component,
190
- args: [{ changeDetection: ChangeDetectionStrategy.OnPush, selector: 'form-dynamic-angular', template: "<div>\r\n <div *ngIf=\"title\" class=\"div-title\">\r\n <span translate={{title}}></span>\r\n <div *ngIf=\"subTitle\" class=\"flex subtitle\">\r\n <span translate={{subTitle}}></span>\r\n </div>\r\n <p-divider></p-divider>\r\n </div>\r\n <form *ngIf=\"control\" [formGroup]=\"control\">\r\n <div class=\"grid\">\r\n <div *ngFor=\"let item of form\" class=\"{{item.col}} col-12\">\r\n <label *ngIf=\"item.label && !item.hideLabelTop\">{{item.label}}</label>\r\n <label *ngIf=\"item.required && item.label\" class=\"danger-text ml-2\">*</label>\r\n\r\n <div class=\"mt-2\">\r\n <!-- text -->\r\n <input id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" pInputText placeholder={{item.placeholder}} *ngIf=\"item.type == 'text' || item.type == 'number' \"\r\n type={{item.type}} formControlName={{item.formControl}} class=\"w-full\" />\r\n\r\n <!-- select -->\r\n <p-dropdown id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" [filter]=item.search emptyFilterMessage=\"Nenhum dado encontrado\"\r\n emptyMessage=\"Nenhum dado encontrado\" placeholder={{item.placeholder}} styleClass=\"w-full p-0\"\r\n (onChange)=\"onChange(item.onChange)\" *ngIf=\"item.type === 'select'\" [showClear]=\"true\"\r\n [options]=\"item.options\" formControlName={{item.formControl}} optionLabel=\"description\"\r\n (onClear)=\"clickCLear(item.onCLear)\"></p-dropdown>\r\n\r\n <!-- currency -->\r\n <p-inputNumber id={{item.id}} *ngIf=\"item.type === 'currency'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} placeholder={{item.placeholder}} inputStyleClass=\"w-full\"\r\n styleClass=\"w-full\" (onKeyDown)=\"onChange(item.onChange)\" mode=\"currency\" [min]=\"0\"\r\n currency=\"BRL\">\r\n </p-inputNumber>\r\n\r\n <!-- mask -->\r\n <p-inputMask id={{item.id}} *ngIf=\"item.type === 'mask'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} placeholder={{item.placeholder}} styleClass=\"w-full\"\r\n (onComplete)=\"onChange(item.onChange)\" mask={{item.mask}} unmask={{item.unmask}}\r\n (onClear)=\"clickCLear(item.onCLear)\" showClear=\"true\"></p-inputMask>\r\n\r\n <!-- treeSelect -->\r\n <p-treeSelect id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} (onNodeSelect)=\"onChange(item.onChange)\"\r\n *ngIf=\"item.type === 'tree-select'\" containerStyleClass=\"w-full p-0\"\r\n formControlName={{item.formControl}} [options]=\"item.treeSelectOptions\" [filter]=\"true\"\r\n [filterInputAutoFocus]=\"true\" emptyMessage=\"Nenhum dado encontrado\" [showClear]=\"true\"\r\n (onClear)=\"clickCLear(item.onCLear)\"></p-treeSelect>\r\n\r\n <!-- autoComplete -->\r\n <p-autoComplete inputId={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} styleClass=\"w-full p-0\" [inputStyle]=\"{'width':'100%'}\"\r\n *ngIf=\"item.type === 'autocomplete'\" (onSelect)=\" onChange(item.onChange)\"\r\n formControlName={{item.formControl}} [suggestions]=\"filteredAutoComplete\"\r\n (completeMethod)=\"filterAutoComplete($event, item.options)\" [forceSelection]=\"false\"\r\n [showEmptyMessage]=\"true\" emptyMessage=\"Nenhum dado encontrado\" dataKey=\"code\"\r\n field=\"description\" showClear=true (onClear)=\"clickCLear(item.onCLear)\"></p-autoComplete>\r\n\r\n <!-- date -->\r\n <p-calendar id={{item.id}} view=\"{{item.viewDate}}\" *ngIf=\"item.type === 'date'\" [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" formControlName={{item.formControl}} styleClass=\"w-full\"\r\n [numberOfMonths]=numberOfMonthsDate(item.numberOfMonthsDate)\r\n [selectionMode]=selectionMode(item.selectionMode) (onFocus)=\"onChange(item.onFocusDate)\"\r\n [maxDate]=\"item.maxDate\" [minDate]=\"item.minDate\" dateFormat=\"{{item.dateFormat}}\"\r\n (onSelect)=\"onChange(item.onChange)\" [iconDisplay]=\"'input'\" placeholder={{item.placeholder}}\r\n [showIcon]=\"true\" [showTime]=\"item.showTime\" [timeOnly]=\"item.timeOnly\"></p-calendar>\r\n\r\n <!-- textarea -->\r\n <div *ngIf=\"item.type === 'text-area'\" class=\"text-right\">\r\n <textarea id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} class=\"w-full\" maxlength=\"{{item.maxlength}}\"\r\n counterTemplate=\"{1} of 50, {0} remaining\" counter=\"display\"\r\n (attr.change)=\"onChange(item.onChange)\" pInputTextarea formControlName={{item.formControl}}\r\n rows={{item.rowsTextArea}}></textarea>\r\n <small *ngIf=\"item.maxlength\" id=\"username-help\">\r\n {{control.controls[item.formControl].value.length}}/{{item.maxlength}}\r\n </small>\r\n </div>\r\n\r\n <!-- checkbox -->\r\n <div *ngIf=\"item.type == 'check-box'\">\r\n <p-checkbox id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" (onChange)=\"onChange(item.onChange)\" binary=\"true\" formControlName={{item.formControl}}\r\n value={{item.formControl}} label={{item.label}}></p-checkbox>\r\n </div>\r\n\r\n <!-- checkbox multiple -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'check-box-multi'\" class=\"flex gap-3\">\r\n <div formArrayName=\"{{item.formControl}}\" *ngFor=\"let list of item.options; let i = index\"\r\n class=\"flex align-items-center gap-2\">\r\n <div [formGroupName]=\"i\">\r\n <p-checkbox id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" (onChange)=\"onChange(item.onChange)\" binary=\"true\" formControlName=\"{{list.code}}\"\r\n label={{list.description}}></p-checkbox>\r\n </div>\r\n </div>\r\n\r\n </div>\r\n\r\n <!-- button -->\r\n <p-button id={{item.id}} *ngIf=\"item.type == 'button'\" styleClass='{{item.buttonClass}} w-full mt-3'\r\n (click)=\"item.onCLick()\" [disabled]=item.disabled icon={{item.iconButton}}\r\n label={{item.label}}></p-button>\r\n\r\n <!-- can -->\r\n <div id={{item.id}} class=\"area\" *ngIf=\"item.type == 'can'\">\r\n <video autoplay=\"true\" id=\"webCamera\">\r\n </video>\r\n\r\n <input type=\"text\" id=\"base_img\" name=\"base_img\">\r\n <button type=\"button\" onclick=\"takeSnapShot()\">Tirar foto e salvar</button>\r\n\r\n <img id=\"imagemConvertida\">\r\n <p id=\"caminhoImagem\" class=\"caminho-imagem\"><a href=\"\" target=\"_blank\" rel=\"noopener\"></a></p>\r\n <script src=\"script.js\"></script>\r\n </div>\r\n\r\n <!-- upload files -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'upload-files' && !item.disabled \" class=\"drag-image\"\r\n [style.border]=\"validateForm && control.controls[item.formControl].errors ? ' 1px dashed #f18282' : ' 1px dashed #d1d5db'\">\r\n <i *ngIf=\"filesView.length === 0\" class=\"pi pi-cloud-upload\"></i>\r\n <p *ngIf=\"filesView.length === 0\">Clique ou arraste e solte um arquivo para anexar</p>\r\n <span *ngIf=\"filesView.length === 0\">{{item.msgAcceptFiles}}</span>\r\n <input id=\"fileInput\" type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event, item.multileFile)\" />\r\n <div *ngFor=\"let f of filesView\">\r\n <div *ngIf=\"f.type && f.type.includes('image')\">\r\n <label class=\"preview-img\">\r\n <img *ngIf=\"!f.content\" src='{{getUrl(f)}}'>\r\n <img *ngIf=\"f.content\" src='{{f.content}}'>\r\n <span *ngIf=\"item.viewNameFile\">{{ f.name }}</span>\r\n <input type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event,item.multileFile)\" />\r\n <label> <i class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(item.formControl, f)\"></i></label>\r\n </label>\r\n </div>\r\n <div *ngIf=\"f.type && !f.type.includes('image')\">\r\n <label class=\"preview-img h-0 max-w-0 mh-75 m-0\">\r\n <label class=\"mr-3\">{{ f.name }}</label>\r\n <input type=\"file\" [multiple]=item.multileFile [accept]=\"item.acceptFiles\"\r\n (change)=\"onSelectFile(item.formControl, $event,item.multileFile)\" />\r\n <label> <i class=\"pi pi-times remove-file absolute\"\r\n (click)=\"onRemove(f)\"></i></label>\r\n\r\n </label>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <!-- upload files disabled -->\r\n <!-- <p-fileUpload mode=\"basic\" formControlName=\"{{item.formControl}}\" chooseLabel=\"Choose\"\r\n chooseIcon=\"pi pi-upload\" accept=\"image/*\" maxFileSize=\"1000000\" /> -->\r\n\r\n <div id={{item.id}} *ngIf=\"item.type === 'upload-files' && item.disabled \">\r\n <p-button (click)=\"op.toggle($event)\" icon=\"pi pi-paperclip\"\r\n label=\"Arquivos anexados\"></p-button>\r\n\r\n <p-overlayPanel #op [style]=\"{'width': '450px'}\" [showCloseIcon]=\"true\">\r\n <ng-template pTemplate=\"content\">\r\n <p-table *ngIf=\"files.length > 0\" [value]=\"files\" selectionMode=\"single\"\r\n [(selection)]=\"selectedProduct\" (onRowSelect)=\"onRowSelect($event, op)\"\r\n responsiveLayout=\"scroll\">\r\n <ng-template pTemplate=\"header\">\r\n <tr>\r\n <th pSortableColumn=\"name\">Nome<p-sortIcon field=\"name\"></p-sortIcon></th>\r\n <th></th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-file>\r\n <tr>\r\n <td *ngIf=\"item.viewNameFile\">{{file.name}}</td>\r\n <td> <p-button *ngIf=\"item.onCLick\" icon=\"pi pi-download\"\r\n (click)='item.onCLick(file)'></p-button>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n <div *ngIf=\"files.length === 0\" class=\"p-10\">\r\n <label>Nenhum arquivo anexado</label>\r\n </div>\r\n </ng-template>\r\n </p-overlayPanel>\r\n </div>\r\n\r\n <!-- list -->\r\n <ul id={{item.id}} *ngIf=\"item.type === 'list' && item.options\">\r\n <li *ngFor=\"let list of item.options\">{{list.description}}</li>\r\n </ul>\r\n\r\n <!-- multi -->\r\n <p-multiSelect id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} *ngIf=\"item.type === 'multi'\" [options]=\"item.options\"\r\n formControlName={{item.formControl}} styleClass=\"p-0 w-full\" optionLabel=\"description\"\r\n (onChange)=\"onChange(item.onChange)\" maxSelectedLabels=\"100\"></p-multiSelect>\r\n\r\n <!-- radioButton -->\r\n <div id={{item.id}} *ngIf=\"item.type === 'radio-button'\" class=\"flex gap-3\">\r\n <div *ngFor=\"let listRadioButton of item.options\" class=\"flex align-items-center gap-2\">\r\n <p-radioButton [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" [value]=\"listRadioButton.code\" formControlName={{item.formControl}}\r\n (onClick)=\"onChange(item.onChange)\"></p-radioButton>\r\n <label>{{listRadioButton.description}}</label>\r\n </div>\r\n @if(control.controls[item.formControl].value == 'other'){\r\n <input pInputText type=\"text\" formControlName={{item.formControlOther}} />\r\n }\r\n </div>\r\n\r\n <!-- selectButton -->\r\n <div class=\"d-flex\" *ngIf=\"item.type === 'select-button'\">\r\n <p-selectButton id={{item.id}} (onChange)=\"onChange(item.onChange)\" [options]=\"item.options\"\r\n formControlName={{item.formControl}} optionValue=\"code\">\r\n <ng-template let-item>\r\n <span>{{item.description}}</span>\r\n </ng-template>\r\n </p-selectButton>\r\n <!-- <input type=\"text\" pInputText [attr.disabled]=\"item.disabled\"\r\n formControlName={{item.formControlSecondary}}> -->\r\n </div>\r\n\r\n <!-- table -->\r\n <p-table id={{item.id}} *ngIf=\"item.type === 'table'\" [scrollable]=\"true\"\r\n scrollHeight={{item.scrollHeight}} [columns]=item.colsTable\r\n styleClass=\"p-datatable-striped p-datatable-sm\" [value]=item.rowsTable>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th *ngFor=\"let col of columns\">\r\n <span *ngIf=\"col.filed !== 'action'\">{{ col.header }}</span>\r\n <span *ngIf=\"col.filed === 'action'\">A\u00E7\u00E3o</span>\r\n </th>\r\n\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-rowData let-columns=\"columns\">\r\n <tr>\r\n <td *ngFor=\"let col of columns\">\r\n <div *ngIf=\"col.field !== 'button'\">\r\n {{ rowData[col.field] }}\r\n </div>\r\n <div *ngIf=\"col.field === 'action'\">\r\n <p-button *ngFor=\"let action of item.buttonsTable\"\r\n styleClass={{action.styleClass}} label={{action.label}}\r\n (click)=\"action.onCLick(rowData)\" icon={{action.icon}}></p-button>\r\n </div>\r\n </td>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"footer\" let-columns>\r\n <tr *ngFor=\"let footer of item.rowsFooter\">\r\n <td colspan=12><span class=\"font-normal\">{{footer.text}}:</span> {{footer.value}}</td>\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- inputSwitch -->\r\n <div class=\"d-flex\" *ngIf=\"item.type === 'switch'\">\r\n <p-inputSwitch id={{item.id}} formControlName={{item.formControl}} class=\"mr-10\"\r\n (onChange)=\"onChange(item.onChange)\"></p-inputSwitch>\r\n <p translate={{item.label}}></p>\r\n </div>\r\n\r\n <!-- password -->\r\n <p-password id={{item.id}} [ngClass]=\"{\r\n 'ng-invalid ng-dirty':\r\n validateForm && control.controls[item.formControl].errors\r\n }\" placeholder={{item.placeholder}} *ngIf=\"item.type === 'password'\" [feedback]=\"false\"\r\n formControlName={{item.formControl}} (onChange)=\"onChange(item.onChange)\" styleClass=\"w-full\"\r\n [toggleMask]=\"true\"></p-password>\r\n\r\n <!-- photo -->\r\n <div id={{item.id}} class=\"camera\" *ngIf=\"item.type === 'photo'\">\r\n <video id=\"video\" class=\"foto\" autoplay>V\u00EDdeo n\u00E3o dispon\u00EDvel.</video>\r\n <canvas id=\"canvas\" class=\"foto\" style=\"display: none;\"></canvas>\r\n <button pButton icon=\"pi pi-times\" class=\"remove-file\" id=\"icon-remove\" [rounded]=\"true\"\r\n style=\"visibility: collapse;\" (click)=\"removePhoto()\"></button>\r\n <button pButton icon=\"pi pi-camera\" [rounded]=\"true\" (click)=\"capturePhoto(item.formControl)\"\r\n id=\"button\"></button>\r\n </div>\r\n\r\n <!-- likert -->\r\n <p-table id={{item.id}} *ngIf=\"item.type === 'likert'\" [scrollable]=\"true\"\r\n scrollHeight={{item.scrollHeight}} [columns]=item.colsTable\r\n styleClass=\"p-datatable-striped p-datatable-sm\" [value]=item.rowsTable>\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th style=\"width: 4rem\"></th>\r\n <th *ngFor=\"let col of columns\">\r\n <span>{{ col.header }}</span>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\" let-columns=\"columns\"\r\n formArrayName=\"{{item.formControl}}\">\r\n <tr>\r\n <td>\r\n {{row}}\r\n </td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td [formGroupName]=\"rowIndex\">\r\n <p-radioButton value=\"{{columns[index].field}}+{{row}}\"\r\n formControlName=\"question{{rowIndex}}\" />\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n <!-- editable table -->\r\n <p-table\r\n id=\"{{ item.id }}\"\r\n *ngIf=\"item.type === 'editable-table'\"\r\n [scrollable]=\"true\"\r\n scrollHeight=\"{{ item.scrollHeight }}\"\r\n [columns]=\"item.colsTable\"\r\n styleClass=\"p-datatable-striped p-datatable-sm\"\r\n [value]=\"item.rowsTable\"\r\n editMode=\"cell\">\r\n\r\n <!-- Cabe\u00E7alho da tabela -->\r\n <ng-template pTemplate=\"header\" let-columns>\r\n <tr>\r\n <th></th>\r\n <th *ngFor=\"let col of columns\">\r\n <span>{{ col.header }}</span>\r\n </th>\r\n </tr>\r\n </ng-template>\r\n\r\n <!-- Corpo da tabela -->\r\n <ng-template pTemplate=\"body\" let-row let-rowIndex=\"rowIndex\" let-columns=\"columns\"\r\n formArrayName=\"{{ item.formControl }}\" let-editing=\"editing\">\r\n <tr>\r\n <td>{{ row }}</td>\r\n @for (control of columns; track item; let index = $index) {\r\n <td [formGroupName]=\"rowIndex\" [pEditableColumn]=\"row\" pEditableColumnField=\"row\">\r\n <p-cellEditor>\r\n <ng-template pTemplate=\"input\">\r\n <input class=\"w-full\" pInputText type=\"text\" formControlName=\"_{{control.field}}question{{ rowIndex }}\" />\r\n </ng-template>\r\n <ng-template pTemplate=\"output\">\r\n <input class=\"w-full\" pInputText type=\"text\" formControlName=\"_{{control.field}}question{{ rowIndex }}\" />\r\n </ng-template>\r\n </p-cellEditor>\r\n </td>\r\n }\r\n </tr>\r\n </ng-template>\r\n </p-table>\r\n\r\n\r\n <!-- valida\u00E7\u00E3o de item -->\r\n <div>\r\n <small class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['required']\">\r\n Campo obrigat\u00F3rio\r\n </small>\r\n <small class=\"danger-text\"\r\n *ngIf=\"validateForm && control.controls[item.formControl] && control.controls[item.formControl].errors?.['email']\">\r\n Email inv\u00E1lido\r\n </small>\r\n </div>\r\n\r\n </div>\r\n </div>\r\n\r\n <p-divider\r\n *ngIf=\"(buttonsStandard && buttonsStandard.length > 0) || (buttonsOptional && buttonsOptional.length > 0)\"></p-divider>\r\n\r\n <div class=\"buttons-form\">\r\n <div *ngFor=\"let button of buttonsStandard\">\r\n <p-button *ngIf=\"button.type === 'clean'\" styleClass=\"p-button-warning {{button.styleClass}}\"\r\n label=\"Limpar\" (click)=\"button.onCLick()\" icon=\"pi pi-times\"></p-button>\r\n <p-button *ngIf=\"button.type === 'filter'\" styleClass=\"{{button.styleClass}}\" label=\"Filtrar\"\r\n (click)=\"button.onCLick()\" icon=\"pi pi-search\"></p-button>\r\n <p-button *ngIf=\"button.type === 'save'\" styleClass=\"p-button-success {{button.styleClass}}\"\r\n label=\"Salvar\" (click)=\"button.onCLick()\" icon=\"pi pi-save\"></p-button>\r\n <p-button *ngIf=\"button.type === 'cancel'\" styleClass=\"p-button-danger {{button.styleClass}}\"\r\n label=\"Cancelar\" (click)=\"button.onCLick()\" icon=\"pi pi-times\"></p-button>\r\n </div>\r\n <div *ngFor=\"let button of buttonsOptional\">\r\n <p-button styleClass={{button.styleClass}} label={{button.label}} (click)=\" button.onCLick()\"\r\n icon={{button.icon}}></p-button>\r\n </div>\r\n </div>\r\n </div>\r\n </form>\r\n</div>\r\n", styles: [".div-title span{font-size:20px;font-weight:500}.buttons-form{display:flex;gap:10px;justify-content:flex-end}.danger-text{color:#f18282}.drag-image{height:auto;width:100%;border-radius:10px;font-weight:400;display:flex;align-items:center;flex-direction:column;top:20px;max-height:250px;color:#000;padding:20px;text-align:center;overflow:auto}.drag-image h6{font-size:20px}.drag-image .file-name{font-size:14px}.drag-image i{font-size:3rem}.subtitle span{font-size:14px;margin-right:5px}.subtitle{align-items:baseline}.mh-75{min-height:75px!important}input[type=file]{position:absolute;width:100%;height:100%;inset:0;opacity:0;cursor:pointer}.preview-img{align-items:center;border-radius:5px;display:flex;height:140px;justify-content:center;margin:10px;max-width:180px;min-height:140px;min-width:180px;padding:0 20px;position:relative}.preview-img span{position:absolute;overflow-wrap:break-word}.remove-file{display:flex;justify-content:center;align-items:center;height:22px;width:22px;top:5px;right:5px;border-radius:50%;background:#bbb;color:#333;cursor:pointer;font-size:.8rem!important}.preview-img img{max-width:100%;opacity:.8}.camera{display:flex;flex-direction:column;align-items:center;position:relative}.foto{max-width:186px;min-height:140px;min-width:180px;border:1px dashed #000;border-radius:5px;margin-bottom:1em}.preview-photo{position:relative}.h-0{height:0}\n"] }]
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 style=\"width: 4rem\"></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 style=\"width: 4rem\"></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}\n"] }]
191
193
  }], ctorParameters: () => [{ type: i1.TranslateService }, { type: i2.FormBuilder }], propDecorators: { title: [{
192
194
  type: Input
193
195
  }], subTitle: [{
@@ -210,8 +212,8 @@ function HttpLoaderFactory(http) {
210
212
  return new TranslateHttpLoader(http);
211
213
  }
212
214
  class FormDynamicAngularModule {
213
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
214
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, declarations: [FormDynamicAngularComponent], imports: [InputMaskModule,
215
+ 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,
215
217
  InputNumberModule,
216
218
  PasswordModule,
217
219
  ButtonModule,
@@ -220,20 +222,20 @@ class FormDynamicAngularModule {
220
222
  MultiSelectModule,
221
223
  CommonModule,
222
224
  SelectButtonModule,
223
- InputSwitchModule,
225
+ ToggleSwitchModule,
224
226
  CheckboxModule,
225
- InputTextareaModule,
227
+ TextareaModule,
226
228
  InputTextModule,
227
229
  DividerModule,
228
- CalendarModule,
229
- DropdownModule,
230
+ DatePickerModule,
231
+ SelectModule,
230
232
  TreeSelectModule,
231
233
  RadioButtonModule,
232
234
  AutoCompleteModule,
233
235
  ReactiveFormsModule,
234
- HttpClientModule,
235
- OverlayPanelModule, i1.TranslateModule], exports: [FormDynamicAngularComponent] }); }
236
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: FormDynamicAngularModule, imports: [InputMaskModule,
236
+ PopoverModule,
237
+ EditorModule, i1.TranslateModule], exports: [FormDynamicAngularComponent] }); }
238
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.26", ngImport: i0, type: FormDynamicAngularModule, providers: [provideHttpClient(withInterceptorsFromDi())], imports: [InputMaskModule,
237
239
  InputNumberModule,
238
240
  PasswordModule,
239
241
  ButtonModule,
@@ -242,19 +244,19 @@ class FormDynamicAngularModule {
242
244
  MultiSelectModule,
243
245
  CommonModule,
244
246
  SelectButtonModule,
245
- InputSwitchModule,
247
+ ToggleSwitchModule,
246
248
  CheckboxModule,
247
- InputTextareaModule,
249
+ TextareaModule,
248
250
  InputTextModule,
249
251
  DividerModule,
250
- CalendarModule,
251
- DropdownModule,
252
+ DatePickerModule,
253
+ SelectModule,
252
254
  TreeSelectModule,
253
255
  RadioButtonModule,
254
256
  AutoCompleteModule,
255
257
  ReactiveFormsModule,
256
- HttpClientModule,
257
- OverlayPanelModule,
258
+ PopoverModule,
259
+ EditorModule,
258
260
  TranslateModule.forRoot({
259
261
  loader: {
260
262
  provide: TranslateLoader,
@@ -263,14 +265,14 @@ class FormDynamicAngularModule {
263
265
  },
264
266
  })] }); }
265
267
  }
266
- 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: [{
267
269
  type: NgModule,
268
- args: [{
269
- declarations: [
270
+ args: [{ declarations: [
270
271
  FormDynamicAngularComponent
271
272
  ],
272
- imports: [
273
- InputMaskModule,
273
+ exports: [
274
+ FormDynamicAngularComponent
275
+ ], imports: [InputMaskModule,
274
276
  InputNumberModule,
275
277
  PasswordModule,
276
278
  ButtonModule,
@@ -279,35 +281,30 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
279
281
  MultiSelectModule,
280
282
  CommonModule,
281
283
  SelectButtonModule,
282
- InputSwitchModule,
284
+ ToggleSwitchModule,
283
285
  CheckboxModule,
284
- InputTextareaModule,
286
+ TextareaModule,
285
287
  InputTextModule,
286
288
  DividerModule,
287
- CalendarModule,
288
- DropdownModule,
289
+ DatePickerModule,
290
+ SelectModule,
289
291
  TreeSelectModule,
290
292
  RadioButtonModule,
291
293
  AutoCompleteModule,
292
294
  ReactiveFormsModule,
293
- HttpClientModule,
294
- OverlayPanelModule,
295
+ PopoverModule,
296
+ EditorModule,
295
297
  TranslateModule.forRoot({
296
298
  loader: {
297
299
  provide: TranslateLoader,
298
300
  useFactory: HttpLoaderFactory,
299
301
  deps: [HttpClient]
300
302
  },
301
- })
302
- ],
303
- exports: [
304
- FormDynamicAngularComponent
305
- ]
306
- }]
303
+ })], providers: [provideHttpClient(withInterceptorsFromDi())] }]
307
304
  }] });
308
305
 
309
306
  /*
310
- * Public API Surface of form-dynamic-angular
307
+ * Public API Surface of form-dynamic-ajax
311
308
  */
312
309
 
313
310
  /**