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