formioangular-colfuturo
Version:
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.4.
1 lines • 83.1 kB
Source Map (JSON)
{"version":3,"file":"formioangular-colfuturo.mjs","sources":["../../../projects/angular-formio/src/formio.config.ts","../../../projects/angular-formio/src/formio.common.ts","../../../projects/angular-formio/src/formio.service.ts","../../../projects/angular-formio/src/formio-promise.service.ts","../../../projects/angular-formio/src/formio.utils.ts","../../../projects/angular-formio/src/components/alerts/formio.alerts.ts","../../../projects/angular-formio/src/types/alerts-position.ts","../../../projects/angular-formio/src/custom-tags.service.ts","../../../projects/angular-formio/src/FormioBaseComponent.ts","../../../projects/angular-formio/src/components/loader/formio.loader.component.ts","../../../projects/angular-formio/src/components/loader/formio.loader.component.html","../../../projects/angular-formio/src/components/alerts/parse-html-content.pipe.ts","../../../projects/angular-formio/src/components/alerts/formio.alerts.component.ts","../../../projects/angular-formio/src/components/alerts/formio.alerts.component.html","../../../projects/angular-formio/src/components/formio/formio.component.ts","../../../projects/angular-formio/src/components/formio/formio.component.html","../../../projects/angular-formio/src/components/formbuilder/formbuilder.component.ts","../../../projects/angular-formio/src/components/formbuilder/formbuilder.component.html","../../../projects/angular-formio/src/components/formioreport/formioreport.component.ts","../../../projects/angular-formio/src/components/formioreport/formioreport.component.html","../../../projects/angular-formio/src/formio.module.ts","../../../projects/angular-formio/src/core.ts","../../../projects/angular-formio/src/formioangular-colfuturo.ts"],"sourcesContent":["import { Inject, Injectable, InjectionToken } from \"@angular/core\";\nexport const FORMIO_CONFIG = new InjectionToken(\"formio-config\");\nimport { Formio } from \"formiojs-colfuturo\";\n\n@Injectable()\nexport class FormioAppConfig {\n [x: string]: any;\n appUrl = \"\";\n apiUrl = \"\";\n icons?: string;\n formOnly?: boolean;\n formio?: Formio;\n constructor(\n @Inject(FORMIO_CONFIG)\n config: {\n apiUrl?: string;\n baseUrl?: string;\n appUrl?: string;\n projectUrl?: string;\n } = {}\n ) {\n this.apiUrl = config.apiUrl || config.baseUrl;\n this.appUrl = config.appUrl || config.projectUrl;\n if (this.apiUrl) {\n Formio.setBaseUrl(this.apiUrl);\n Formio.setProjectUrl(this.appUrl);\n this.formio = new Formio(this.appUrl);\n }\n }\n}\n","import { ExtendedComponentSchema, ValidateOptions } from '@formio/deprecated-types';\nimport { AlertsPosition } from './types/alerts-position';\n\nexport interface ComponentOptions<T = any, V extends ValidateOptions = ValidateOptions> extends ExtendedComponentSchema<T> {\n validate?: V;\n}\n\nexport interface FormioRefreshValue {\n property?: string;\n value?: object;\n form?: object;\n submission?: object;\n}\n\nexport interface AccessSetting {\n type: string;\n roles: string[];\n}\n\nexport interface FormioReport {\n form: string,\n roles: object,\n access: object,\n metadata: object,\n data: object,\n project: string,\n}\n\nexport interface FormioForm {\n title?: string;\n display?: string;\n name?: string;\n path?: string;\n type?: string;\n project?: string;\n template?: string;\n components?: ExtendedComponentSchema[];\n tags?: string[];\n access?: AccessSetting[];\n submissionAccess?: AccessSetting[];\n report?: FormioReport\n}\n\nexport interface ComponentInstance {\n component: ExtendedComponentSchema;\n id: string;\n type: string;\n asString?(value: any): string;\n getView(value: any): string;\n}\n\nexport interface AlertsOptions {\n submitMessage: string;\n}\n\nexport interface ErrorsOptions {\n message: string;\n}\n\nexport class FormioError {\n constructor(\n public message: string,\n public component: ExtendedComponentSchema,\n public silent?: boolean,\n ) {}\n}\n\nexport type FormioSubmissionCallback = (\n error: FormioError,\n submission: object\n) => void;\nexport type FormioBeforeSubmit = (\n submission: object,\n callback: FormioSubmissionCallback\n) => void;\n\nexport interface FormioHookOptions {\n beforeSubmit: FormioBeforeSubmit;\n}\n\nexport interface FormioOptions {\n errors?: ErrorsOptions;\n alerts?: AlertsOptions;\n alertsPosition?: AlertsPosition;\n disableAlerts?: boolean;\n i18n?: object;\n fileService?: object;\n hooks?: FormioHookOptions;\n sanitizeConfig?: any;\n}\n","import { Observable, Observer } from \"rxjs\";\nimport { FormioForm } from \"./formio.common\";\nimport { FormioCore as Formio } from \"formiojs-colfuturo\";\n\nexport class FormioService {\n public formio: any;\n constructor(public url: string, public options?: object) {\n this.formio = new Formio(this.url, this.options);\n }\n requestWrapper(fn: any) {\n let record: any;\n let called = false;\n return Observable.create((observer: Observer<any>) => {\n try {\n if (!called) {\n called = true;\n fn()\n .then((_record: any) => {\n record = _record;\n observer.next(record);\n observer.complete();\n })\n .catch((err: any) => observer.error(err));\n } else if (record) {\n observer.next(record);\n observer.complete();\n }\n } catch (err) {\n observer.error(err);\n }\n });\n }\n saveForm(form: FormioForm, options?: any): Observable<FormioForm> {\n return this.requestWrapper(() => this.formio.saveForm(form, options));\n }\n loadForm(query?: any, options?: any): Observable<FormioForm> {\n return this.requestWrapper(() => this.formio.loadForm(query, options));\n }\n loadForms(query: any, options?: any): Observable<FormioForm> {\n return this.requestWrapper(() => this.formio.loadForms(query, options));\n }\n loadSubmission(query?: any, options?: any): Observable<{}> {\n return this.requestWrapper(() =>\n this.formio.loadSubmission(query, options)\n );\n }\n userPermissions(user: any, form: any, submission: any): Observable<{}> {\n return this.requestWrapper(() =>\n this.formio.userPermissions(user, form, submission)\n );\n }\n deleteSubmission(data?: any, options?: any): Observable<{}> {\n return this.requestWrapper(() =>\n this.formio.deleteSubmission(data, options)\n );\n }\n saveSubmission(submission: {}, options?: any): Observable<{}> {\n return this.requestWrapper(() =>\n this.formio.saveSubmission(submission, options)\n );\n }\n loadSubmissions(query?: any, options?: any): Observable<{}> {\n return this.requestWrapper(() =>\n this.formio.loadSubmissions(query, options)\n );\n }\n}\n","import { from } from 'rxjs';\nimport { FormioService } from './formio.service';\nimport { FormioForm } from './formio.common';\n\nexport class FormioPromiseService {\n private formioService: FormioService;\n\n constructor(public url: string, public options?: object) {\n this.formioService = new FormioService(url, options);\n }\n\n saveForm(form: FormioForm, options?: any): Promise<any> {\n return this.formioService.saveForm(form, options).toPromise();\n }\n loadForm(query?: any, options?: any): Promise<any> {\n return this.formioService.loadForm(query, options).toPromise();\n }\n loadSubmission(query?: any, options?: any): Promise<any> {\n return this.formioService.loadSubmission(query, options).toPromise();\n }\n userPermissions(user: any, form: any, submission: any): Promise<any> {\n return this.formioService.userPermissions(user, form, submission).toPromise();\n }\n deleteSubmission(data?: any, options?: any): Promise<any> {\n return this.formioService.deleteSubmission(data, options).toPromise();\n }\n loadForms(query: any, options?: any): Promise<any> {\n return this.formioService.loadForms(query, options).toPromise();\n }\n saveSubmission(submission: {}, options?: any): Promise<any> {\n return this.formioService.saveSubmission(submission, options).toPromise();\n }\n loadSubmissions(query?: any, options?: any): Promise<any> {\n return this.formioService.loadSubmissions(query, options).toPromise();\n }\n}\n","import { RouterModule } from '@angular/router';\nimport { each } from 'lodash';\n\nexport function extendRouter(Class: any, config: any, ClassRoutes: any) {\n each(Class.decorators, decorator => {\n each(decorator.args, arg => {\n if (arg.declarations) {\n each(config, component => arg.declarations.push(component));\n }\n if (arg.imports) {\n each(arg.imports, (_import, index) => {\n if (\n (_import.ngModule && (_import.ngModule.name === 'RouterModule')) ||\n (_import.ngModule && (_import.ngModule.name === '_RouterModule')) ||\n (_import.name === 'RouterModule') ||\n (_import.name === '_RouterModule')\n ) {\n arg.imports[index] = RouterModule.forChild(ClassRoutes(config));\n }\n });\n }\n });\n });\n return Class;\n}\n","export interface FormioAlert {\n type: string;\n message: string;\n component?: any;\n}\n\nexport class FormioAlerts {\n public alerts: FormioAlert[] = [];\n\n setAlert(alert: FormioAlert) {\n this.alerts = [alert];\n }\n\n addAlert(alert: FormioAlert) {\n this.alerts.push(alert);\n }\n\n setAlerts(alerts: FormioAlert[]) {\n this.alerts = alerts;\n }\n}\n","export enum AlertsPosition {\n none,\n top,\n bottom,\n both\n}\n","import { Injectable } from '@angular/core';\n@Injectable()\nexport class CustomTagsService {\n tags: string[] = [];\n\n addCustomTag(tag: string) {\n this.tags.push(tag);\n }\n}","import {\n Component,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n ViewChild,\n} from \"@angular/core\";\nimport { FormioService } from \"./formio.service\";\nimport { FormioAlerts } from \"./components/alerts/formio.alerts\";\nimport { FormioAppConfig } from \"./formio.config\";\nimport {\n FormioError,\n FormioForm,\n FormioOptions,\n FormioRefreshValue,\n} from \"./formio.common\";\nimport { assign, get, isEmpty } from \"lodash\";\nimport { CustomTagsService } from \"./custom-tags.service\";\nimport { Utils } from \"formiojs-colfuturo\";\nimport { AlertsPosition } from \"./types/alerts-position\";\nconst { Evaluator, fastCloneDeep } = Utils;\n\n@Component({\n template: \"\",\n})\nexport class FormioBaseComponent implements OnInit, OnChanges, OnDestroy {\n @Input() form?: FormioForm;\n @Input() submission?: any = {};\n @Input() src?: string;\n @Input() url?: string;\n @Input() service?: FormioService;\n @Input() options?: FormioOptions;\n @Input() noeval? = Evaluator.noeval;\n @Input() formioOptions?: any;\n @Input() renderOptions?: any;\n @Input() readOnly? = false;\n @Input() viewOnly? = false;\n @Input() hideLoading? = false;\n @Input() hideComponents?: string[];\n @Input() refresh?: EventEmitter<FormioRefreshValue>;\n @Input() error?: EventEmitter<any>;\n @Input() success?: EventEmitter<object>;\n @Input() submitDone?: EventEmitter<object>;\n @Input() language?: EventEmitter<string>;\n @Input() hooks?: any = {};\n @Input() renderer?: any;\n @Input() watchSubmissionErrors? = false;\n @Input() dataTableActions?: any = [];\n @Output() render = new EventEmitter<object>();\n @Output() customEvent = new EventEmitter<object>();\n @Output() fileUploadingStatus = new EventEmitter<string>();\n @Output() submit = new EventEmitter<object>();\n @Output() prevPage = new EventEmitter<object>();\n @Output() nextPage = new EventEmitter<object>();\n @Output() beforeSubmit = new EventEmitter<object>();\n @Output() rowAdd = new EventEmitter<any>();\n @Output() rowAdded = new EventEmitter<any>();\n @Output() rowEdit = new EventEmitter<any>();\n @Output() rowEdited = new EventEmitter<any>();\n @Output() rowDelete = new EventEmitter<any>();\n @Output() rowClick = new EventEmitter<any>();\n @Output() rowSelectChange = new EventEmitter<any>();\n @Output() page = new EventEmitter<any>();\n @Output() changeItemsPerPage = new EventEmitter<any>();\n @Output() change = new EventEmitter<object>();\n @Output() invalid = new EventEmitter<boolean>();\n @Output() errorChange = new EventEmitter<any>();\n @Output() formLoad = new EventEmitter<any>();\n @Output() submissionLoad = new EventEmitter<any>();\n @Output() ready = new EventEmitter<FormioBaseComponent>();\n @ViewChild(\"formio\", { static: true }) formioElement?: ElementRef<any>;\n\n public AlertsPosition = AlertsPosition;\n public formio: any;\n public initialized = false;\n public alerts = new FormioAlerts();\n public formioReady: Promise<any>;\n\n private formioReadyResolve: any;\n private submitting = false;\n private submissionSuccess = false;\n public isLoading: boolean;\n public noAlerts: boolean;\n public label: string;\n\n constructor(\n public ngZone: NgZone,\n @Optional() public config: FormioAppConfig,\n @Optional() public customTags?: CustomTagsService\n ) {\n this.isLoading = true;\n this.formioReady = new Promise((ready) => {\n this.formioReadyResolve = ready;\n });\n }\n\n getRenderer() {\n return this.renderer;\n }\n\n getRendererOptions() {\n const extraTags = this.customTags ? this.customTags.tags : [];\n return assign(\n {},\n {\n icons: get(this.config, \"icons\", \"fontawesome\"),\n noAlerts: get(this.options, \"noAlerts\", true),\n readOnly: this.readOnly,\n viewAsHtml: this.viewOnly,\n ...(this.viewOnly && { renderMode: \"html\" }),\n i18n: get(this.options, \"i18n\", null),\n fileService: get(this.options, \"fileService\", null),\n hooks: this.hooks,\n sanitizeConfig: {\n addTags: extraTags,\n },\n dataTableActions: this.dataTableActions,\n },\n this.renderOptions || {}\n );\n }\n\n createRenderer() {\n const Renderer = this.getRenderer();\n const form = new Renderer(\n this.formioElement ? this.formioElement.nativeElement : null,\n this.form,\n this.getRendererOptions()\n );\n return form.instance;\n }\n\n setFormUrl(url) {\n this.formio.setUrl(url, this.formioOptions || {});\n }\n\n setForm(form: FormioForm) {\n this.form = form;\n if (this.formio) {\n this.formio.destroy();\n }\n\n if (this.form.title) {\n this.label = this.form.title;\n } else if (this.form.components && this.form.components[0]) {\n this.label = this.form.components[0].label;\n }\n\n // Clear out the element to render the new form.\n if (this.formioElement && this.formioElement.nativeElement) {\n this.formioElement.nativeElement.innerHTML = \"\";\n }\n this.formio = this.createRenderer();\n\n if (!this.formio) {\n return;\n }\n this.formio.setSubmission(this.submission, {\n fromSubmission: false,\n });\n if (this.renderOptions && this.renderOptions.validateOnInit) {\n this.formio.setValue(this.submission, { validateOnInit: true });\n }\n if (this.url) {\n this.setFormUrl(this.url);\n }\n if (this.src) {\n this.setFormUrl(this.src);\n }\n this.formio.nosubmit = true;\n this.attachFormEvents();\n\n return this.formio.ready.then(() => {\n this.ngZone.run(() => {\n this.isLoading = false;\n this.ready.emit(this);\n this.formioReadyResolve(this.formio);\n if (this.formio.submissionReady) {\n this.formio.submissionReady.then((submission) => {\n this.submissionLoad.emit(submission);\n });\n }\n });\n return this.formio;\n });\n }\n\n attachFormEvents() {\n this.formio.on(\"prevPage\", (data: any) =>\n this.ngZone.run(() => this.onPrevPage(data))\n );\n this.formio.on(\"nextPage\", (data: any) =>\n this.ngZone.run(() => this.onNextPage(data))\n );\n this.formio.on(\"change\", (value: any, flags: any, isModified: boolean) =>\n this.ngZone.run(() => this.onChange(value, flags, isModified))\n );\n this.formio.on(\"rowAdd\", (component: any) =>\n this.ngZone.run(() => this.rowAdd.emit(component))\n );\n this.formio.on(\"rowAdded\", (data: any, component: any) =>\n this.ngZone.run(() => this.rowAdded.emit({ component, row: data }))\n );\n this.formio.on(\n \"rowEdit\",\n (data: any, rowIndex: number, index: number, component: any) =>\n this.ngZone.run(() =>\n this.rowEdit.emit({ component, row: data, rowIndex, index })\n )\n );\n this.formio.on(\"rowEdited\", (data: any, rowIndex: number, component: any) =>\n this.ngZone.run(() =>\n this.rowEdited.emit({ component, row: data, rowIndex })\n )\n );\n this.formio.on(\n \"rowDelete\",\n (data: any, rowIndex: number, index: number, component: any) =>\n this.ngZone.run(() =>\n this.rowDelete.emit({ component, row: data, rowIndex, index })\n )\n );\n this.formio.on(\n \"rowClick\",\n (row: any, rowIndex: number, index: number, component: any) =>\n this.ngZone.run(() =>\n this.rowClick.emit({ component, row, rowIndex, index })\n )\n );\n this.formio.on(\"rowSelectChange\", (selectedRows: any[], component: any) =>\n this.ngZone.run(() =>\n this.rowSelectChange.emit({ selectedRows, component })\n )\n );\n this.formio.on(\"page\", (currentPage: number, component: any) =>\n this.ngZone.run(() => this.page.emit({ currentPage, component }))\n );\n this.formio.on(\"changeItemsPerPage\", (itemsPerPage: number) =>\n this.ngZone.run(() => this.changeItemsPerPage.emit({ itemsPerPage }))\n );\n this.formio.on(\"customEvent\", (event: any) =>\n this.ngZone.run(() => this.customEvent.emit(event))\n );\n\n [\"fileUploadingStart\", \"fileUploadingEnd\"].forEach((eventName, index) => {\n const status = !!index ? \"end\" : \"start\";\n this.formio.on(eventName, () =>\n this.ngZone.run(() => this.fileUploadingStatus.emit(status))\n );\n });\n\n this.formio.on(\"submit\", (submission: any, saved: boolean) =>\n this.ngZone.run(() => this.submitForm(submission, saved))\n );\n this.formio.on(\"error\", (err: any) =>\n this.ngZone.run(() => {\n this.submissionSuccess = false;\n return this.onError(err);\n })\n );\n this.formio.on(\"render\", () => this.ngZone.run(() => this.render.emit()));\n this.formio.on(\"formLoad\", (loadedForm: any) =>\n this.ngZone.run(() => this.formLoad.emit(loadedForm))\n );\n }\n\n initialize() {\n if (this.initialized) {\n return;\n }\n\n const extraTags = this.customTags ? this.customTags.tags : [];\n const defaultOptions: FormioOptions = {\n errors: {\n message: \"Please fix the following errors before submitting.\",\n },\n alerts: {\n submitMessage: \"Submission Complete.\",\n },\n disableAlerts: false,\n hooks: {\n beforeSubmit: null,\n },\n sanitizeConfig: {\n addTags: extraTags,\n },\n alertsPosition: AlertsPosition.top,\n };\n this.options = Object.assign(defaultOptions, this.options);\n if (this.options.disableAlerts) {\n this.options.alertsPosition = AlertsPosition.none;\n }\n this.initialized = true;\n }\n\n ngOnInit() {\n Evaluator.noeval = this.noeval;\n this.initialize();\n\n if (this.language) {\n if (typeof this.language === \"string\") {\n this.formio.language = this.language;\n } else {\n this.language.subscribe((lang: string) => {\n this.formio.language = lang;\n });\n }\n }\n\n if (this.refresh) {\n this.refresh.subscribe((refresh: FormioRefreshValue) =>\n this.onRefresh(refresh)\n );\n }\n\n if (this.error) {\n this.error.subscribe((err: any) => this.onError(err));\n }\n\n if (this.success) {\n this.success.subscribe((message: string) => {\n this.alerts.setAlert({\n type: \"success\",\n message: message || get(this.options, \"alerts.submitMessage\"),\n });\n });\n }\n\n if (this.submitDone) {\n this.submitDone.subscribe((submission: object) => {\n this.formio.emit(\"submitDone\", submission);\n });\n }\n\n if (this.src) {\n if (!this.service) {\n this.service = new FormioService(this.src);\n }\n this.isLoading = true;\n this.setFormFromSrc();\n }\n if (this.url && !this.service) {\n this.service = new FormioService(this.url);\n }\n }\n\n setFormFromSrc() {\n this.service.loadForm({ params: { live: 1 } }).subscribe(\n (form: FormioForm) => {\n if (form && form.components) {\n this.ngZone.runOutsideAngular(() => {\n this.setForm(form);\n });\n }\n\n // if a submission is also provided.\n if (\n isEmpty(this.submission) &&\n this.service &&\n this.service.formio.submissionId\n ) {\n this.service.loadSubmission().subscribe(\n (submission: any) => {\n if (this.readOnly) {\n this.formio.options.readOnly = true;\n }\n this.submission = this.formio.submission = submission;\n },\n (err) => this.onError(err)\n );\n }\n },\n (err) => this.onError(err)\n );\n }\n\n ngOnDestroy() {\n if (this.formio) {\n this.formio.destroy();\n }\n }\n\n onRefresh(refresh: FormioRefreshValue) {\n this.formioReady.then(() => {\n if (refresh.form) {\n this.formio.setForm(refresh.form).then(() => {\n if (refresh.submission) {\n this.formio.setSubmission(refresh.submission);\n }\n });\n } else if (refresh.submission) {\n this.formio.setSubmission(refresh.submission);\n } else {\n switch (refresh.property) {\n case \"submission\":\n this.formio.submission = refresh.value;\n break;\n case \"form\":\n this.formio.form = refresh.value;\n break;\n }\n }\n });\n }\n\n ngOnChanges(changes: any) {\n Evaluator.noeval = this.noeval;\n this.initialize();\n\n if (changes.form && changes.form.currentValue) {\n this.ngZone.runOutsideAngular(() => {\n this.setForm(changes.form.currentValue);\n });\n }\n\n this.formioReady.then(() => {\n if (changes.submission && changes.submission.currentValue) {\n this.formio.setSubmission(changes.submission.currentValue, {\n fromSubmission: !changes.submission.firstChange,\n });\n }\n\n if (changes.hideComponents && changes.hideComponents.currentValue) {\n const hiddenComponents = changes.hideComponents.currentValue;\n this.formio.options.hide = hiddenComponents;\n this.formio.everyComponent((component) => {\n component.options.hide = hiddenComponents;\n if (hiddenComponents.includes(component.component.key)) {\n component.visible = false;\n }\n });\n }\n });\n }\n\n onPrevPage(data: any) {\n this.alerts.setAlerts([]);\n this.prevPage.emit(data);\n }\n\n onNextPage(data: any) {\n this.alerts.setAlerts([]);\n this.nextPage.emit(data);\n }\n\n onSubmit(submission: any, saved: boolean, noemit?: boolean) {\n this.submitting = false;\n this.submissionSuccess = true;\n\n this.formio.setValue(fastCloneDeep(submission), {\n noValidate: true,\n noCheck: true,\n });\n\n if (saved) {\n this.formio.emit(\"submitDone\", submission);\n }\n if (!noemit) {\n this.submit.emit(submission);\n }\n if (!this.success) {\n this.alerts.setAlert({\n type: \"success\",\n message: get(this.options, \"alerts.submitMessage\"),\n });\n }\n }\n\n onError(err: any) {\n this.alerts.setAlerts([]);\n this.submitting = false;\n this.isLoading = false;\n\n if (!err) {\n return;\n }\n\n // Make sure it is an array.\n const errors = Array.isArray(err) ? err : [err];\n\n // Emit these errors again.\n this.errorChange.emit(errors);\n\n if (err.silent) {\n return;\n }\n\n if (this.formio && errors.length) {\n this.formio.emit(\"submitError\", errors);\n }\n\n // Iterate through each one and set the alerts array.\n errors.forEach((error: any) => {\n const { message, paths } = error\n ? error.details\n ? {\n message: error.details.map((detail) => detail.message),\n paths: error.details.map((detail) => detail.path),\n }\n : {\n message: error.message || error.toString(),\n paths:\n error.path || error.formattedKeyOrPath\n ? [error.path || error.formattedKeyOrPath]\n : [],\n }\n : {\n message: \"\",\n paths: [],\n };\n\n let shouldErrorDisplay = true;\n\n if (this.formio) {\n paths.forEach((path, index) => {\n const component = this.formio.getComponent(path);\n if (component) {\n const components = Array.isArray(component)\n ? component\n : [component];\n const messageText = Array.isArray(message)\n ? message[index]\n : message;\n components.forEach((comp) =>\n comp.setCustomValidity(messageText, true)\n );\n this.alerts.addAlert({\n type: \"danger\",\n message: Array.isArray(message) ? message[index] : message,\n component,\n });\n shouldErrorDisplay = false;\n }\n });\n\n if ((window as any).VPAT_ENABLED) {\n if (typeof error === \"string\" && this.formio.components) {\n this.formio.components.forEach((comp) => {\n if (comp && comp.type !== \"button\") {\n comp.setCustomValidity(message, true);\n }\n });\n }\n }\n }\n\n if (shouldErrorDisplay) {\n this.alerts.addAlert({\n type: \"danger\",\n message,\n component: error.component,\n });\n }\n });\n\n if (this.formio && !this.noAlerts) {\n this.formio.showErrors(errors);\n }\n }\n\n focusOnComponet(key: any) {\n if (this.formio) {\n this.formio.focusOnComponent(key);\n }\n }\n\n submitExecute(submission: object, saved = false) {\n if (this.service && !this.url && !saved) {\n this.service.saveSubmission(submission).subscribe(\n (sub: {}) => this.onSubmit(sub, true),\n (err) => this.onError(err)\n );\n } else {\n this.onSubmit(submission, false);\n }\n }\n\n submitForm(submission: any, saved = false) {\n // Keep double submits from occurring...\n if (this.submitting) {\n return;\n }\n this.formio.setMetadata(submission);\n this.submissionSuccess = false;\n this.submitting = true;\n this.beforeSubmit.emit(submission);\n\n // if they provide a beforeSubmit hook, then allow them to alter the submission asynchronously\n // or even provide a custom Error method.\n const beforeSubmit = get(this.options, \"hooks.beforeSubmit\");\n if (beforeSubmit) {\n beforeSubmit(submission, (err: FormioError, sub: object) => {\n if (err) {\n this.onError(err);\n return;\n }\n this.submitExecute(sub, saved);\n });\n } else {\n this.submitExecute(submission, saved);\n }\n }\n\n onChange(value: any, flags: any, isModified: boolean) {\n if (this.watchSubmissionErrors && !this.submissionSuccess) {\n const errors = get(this, \"formio.errors\", []);\n const alerts = get(this, \"alerts.alerts\", []);\n const submitted = get(this, \"formio.submitted\", false);\n if (submitted && (errors.length || alerts.length)) {\n this.onError(errors);\n }\n }\n return this.change.emit({ ...value, flags, isModified });\n }\n}\n","import {Component, Input} from '@angular/core';\n\n@Component({\n selector: 'formio-loader',\n styleUrls: ['./formio.loader.component.scss'],\n templateUrl: './formio.loader.component.html'\n})\nexport class FormioLoaderComponent {\n @Input() isLoading: boolean;\n}\n","<div class=\"formio-loader-wrapper\" *ngIf=\"isLoading\">\n <div class=\"formio-loader\"></div>\n</div>\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'parseHtmlContent', pure: false })\nexport class ParseHtmlContentPipe implements PipeTransform {\n\n /*\n Some messages that are come from formiojs have hex codes. So the main aim of this pipe is transform this messages to html.\n And then render in template.\n */\n transform(content) {\n const parsedContent = new DOMParser().parseFromString(content, 'text/html').body.childNodes[0];\n\n return parsedContent?.textContent;\n }\n}\n","import {Component, EventEmitter, Input, OnInit, Output} from '@angular/core';\nimport { FormioAlerts } from './formio.alerts';\n\n@Component({\n selector: 'formio-alerts',\n templateUrl: './formio.alerts.component.html'\n})\nexport class FormioAlertsComponent implements OnInit {\n @Input() alerts: FormioAlerts;\n @Output() focusComponent = new EventEmitter<object>();\n ngOnInit() {\n if (!this.alerts) {\n this.alerts = new FormioAlerts();\n }\n }\n getComponent (event, alert) {\n this.focusComponent.emit(alert.component.key);\n }\n}\n","<div *ngFor=\"let alert of alerts.alerts\" class=\"alert alert-{{ alert.type }}\" role=\"alert\" (click)=\"getComponent($event, alert)\">\n {{alert.message | parseHtmlContent}}\n</div>\n","import {\n Component,\n OnInit,\n Optional,\n ViewEncapsulation,\n Input,\n NgZone,\n OnChanges,\n} from \"@angular/core\";\nimport { FormioAppConfig } from \"../../formio.config\";\nimport { Formio, Form } from \"formiojs-colfuturo\";\nimport { FormioBaseComponent } from \"../../FormioBaseComponent\";\nimport { CustomTagsService } from \"../../custom-tags.service\";\n\n/* tslint:disable */\n@Component({\n selector: \"formio\",\n templateUrl: \"./formio.component.html\",\n styleUrls: [\n \"../../../../../node_modules/formiojs-colfuturo/dist/formio.form.min.css\",\n ],\n encapsulation: ViewEncapsulation.None,\n})\n/* tslint:enable */\nexport class FormioComponent\n extends FormioBaseComponent\n implements OnInit, OnChanges\n{\n constructor(\n public ngZone: NgZone,\n @Optional() public config: FormioAppConfig,\n @Optional() public customTags?: CustomTagsService\n ) {\n super(ngZone, config, customTags);\n if (this.config) {\n Formio.setBaseUrl(this.config.apiUrl);\n Formio.setProjectUrl(this.config.appUrl);\n } else {\n console.warn(\"You must provide an AppConfig within your application!\");\n }\n }\n\n getRenderer() {\n return this.renderer || Form;\n }\n}\n","<div role=\"form\" [attr.aria-label]=\"label\">\n <div *ngIf=\"isLoading && !hideLoading\" style=\"position:relative;height:200px\">\n <formio-loader [isLoading]=\"isLoading\"></formio-loader>\n </div>\n <formio-alerts *ngIf=\"this.options.alertsPosition === AlertsPosition.top || this.options.alertsPosition === AlertsPosition.both\" (focusComponent)=\"focusOnComponet($event)\" [alerts]=\"alerts\"></formio-alerts>\n <div #formio></div>\n <formio-alerts *ngIf=\"this.options.alertsPosition === AlertsPosition.bottom || this.options.alertsPosition === AlertsPosition.both\" (focusComponent)=\"focusOnComponet($event)\" [alerts]=\"alerts\"></formio-alerts>\n</div>\n","import {\n Component,\n Input,\n OnInit,\n OnChanges,\n OnDestroy,\n ViewEncapsulation,\n Optional,\n ElementRef,\n ViewChild,\n EventEmitter,\n Output,\n NgZone,\n} from \"@angular/core\";\nimport { FormioAppConfig } from \"../../formio.config\";\nimport { FormioForm, FormioOptions } from \"../../formio.common\";\nimport { Formio, FormBuilder, Utils } from \"formiojs-colfuturo\";\nimport { assign } from \"lodash\";\nimport { Observable, Subscription } from \"rxjs\";\nimport { CustomTagsService } from \"../../custom-tags.service\";\n\n/* tslint:disable */\n@Component({\n selector: \"form-builder\",\n templateUrl: \"./formbuilder.component.html\",\n styleUrls: [\n \"../../../../../node_modules/formiojs-colfuturo/dist/formio.builder.min.css\",\n ],\n encapsulation: ViewEncapsulation.None,\n})\n/* tslint:enable */\nexport class FormBuilderComponent implements OnInit, OnChanges, OnDestroy {\n public ready: Promise<object>;\n public readyResolve: any;\n public formio: any;\n public builder: FormBuilder;\n public componentAdding = false;\n private refreshSubscription: Subscription;\n @Input() form?: FormioForm;\n @Input() options?: FormioOptions;\n @Input() formbuilder?: any;\n @Input() noeval? = false;\n @Input() refresh?: Observable<void>;\n @Input() rebuild?: Observable<object>;\n @Output() change: EventEmitter<object>;\n @ViewChild(\"builder\", { static: true }) builderElement?: ElementRef<any>;\n\n constructor(\n private ngZone: NgZone,\n @Optional() private config: FormioAppConfig,\n @Optional() private customTags?: CustomTagsService\n ) {\n if (this.config) {\n Formio.setBaseUrl(this.config.apiUrl);\n Formio.setProjectUrl(this.config.appUrl);\n } else {\n console.warn(\"You must provide an AppConfig within your application!\");\n }\n\n this.change = new EventEmitter();\n this.ready = new Promise((resolve: any) => {\n this.readyResolve = resolve;\n });\n }\n\n ngOnInit() {\n Utils.Evaluator.noeval = this.noeval;\n\n if (this.refresh) {\n this.refreshSubscription = this.refresh.subscribe(() => {\n this.ngZone.runOutsideAngular(() => {\n this.buildForm(this.form);\n });\n });\n }\n\n if (this.rebuild) {\n this.rebuild.subscribe((options) => {\n this.ngZone.runOutsideAngular(() => {\n this.rebuildForm(this.form, options);\n });\n });\n }\n }\n\n setInstance(instance: any) {\n this.formio = instance;\n instance.off(\"addComponent\");\n instance.off(\"saveComponent\");\n instance.off(\"updateComponent\");\n instance.off(\"removeComponent\");\n instance.on(\"addComponent\", (component, parent, path, index, isNew) => {\n this.ngZone.run(() => {\n if (isNew) {\n this.componentAdding = true;\n } else {\n this.change.emit({\n type: \"addComponent\",\n builder: instance,\n form: instance.schema,\n component: component,\n parent: parent,\n path: path,\n index: index,\n });\n this.componentAdding = false;\n }\n });\n });\n instance.on(\n \"saveComponent\",\n (component, original, parent, path, index, isNew) => {\n this.ngZone.run(() => {\n this.change.emit({\n type: this.componentAdding ? \"addComponent\" : \"saveComponent\",\n builder: instance,\n form: instance.schema,\n component: component,\n originalComponent: original,\n parent: parent,\n path: path,\n index: index,\n isNew: isNew || false,\n });\n this.componentAdding = false;\n });\n }\n );\n instance.on(\"updateComponent\", (component) => {\n this.ngZone.run(() => {\n this.change.emit({\n type: \"updateComponent\",\n builder: instance,\n form: instance.schema,\n component: component,\n });\n });\n });\n instance.on(\"removeComponent\", (component, parent, path, index) => {\n this.ngZone.run(() => {\n this.change.emit({\n type: \"deleteComponent\",\n builder: instance,\n form: instance.schema,\n component: component,\n parent: parent,\n path: path,\n index: index,\n });\n });\n });\n this.ngZone.run(() => {\n this.readyResolve(instance);\n });\n return instance;\n }\n\n setDisplay(display: String, prevDisplay?: string) {\n if (display && display !== prevDisplay) {\n (this.builder as any).setDisplay(display);\n }\n }\n\n buildForm(form: any, prevForm?: any) {\n if (!form || !this.builderElement || !this.builderElement.nativeElement) {\n return;\n }\n\n if (this.builder) {\n this.setDisplay(form.display, prevForm?.display);\n this.setInstance(this.builder.instance);\n this.builder.form = form;\n this.builder.instance.form = form;\n return this.builder.instance;\n }\n\n return this.rebuildForm(form);\n }\n\n rebuildForm(form: any, options?: object) {\n const Builder = this.formbuilder || FormBuilder;\n const extraTags = this.customTags ? this.customTags.tags : [];\n this.builder = new Builder(\n this.builderElement.nativeElement,\n form,\n assign(\n {\n icons: \"fontawesome\",\n sanitizeConfig: {\n addTags: extraTags,\n },\n },\n options || this.options || {}\n )\n );\n return this.builder.ready.then((instance) => this.setInstance(instance));\n }\n\n ngOnChanges(changes: any) {\n Utils.Evaluator.noeval = this.noeval;\n\n if (changes.form && changes.form.currentValue) {\n this.ngZone.runOutsideAngular(() => {\n this.buildForm(\n changes.form.currentValue || { components: [] },\n changes.form.previousValue\n );\n });\n }\n }\n\n ngOnDestroy() {\n if (this.refreshSubscription) {\n this.refreshSubscription.unsubscribe();\n }\n\n if (this.formio) {\n this.formio.destroy();\n }\n }\n}\n","<div #builder></div>\n","import {\n Component,\n OnInit,\n ViewEncapsulation,\n Input,\n OnChanges,\n ViewChild,\n ElementRef,\n EventEmitter,\n Output,\n} from \"@angular/core\";\nimport { Formio } from \"formiojs-colfuturo\";\nimport { FormioComponent } from \"../formio/formio.component\";\nimport { FormioReport } from \"../../formio.common\";\n\n/* tslint:disable */\n@Component({\n selector: \"formio-report\",\n templateUrl: \"./formioreport.component.html\",\n styleUrls: [\n \"../../../../../node_modules/formiojs-colfuturo/dist/formio.form.min.css\",\n ],\n encapsulation: ViewEncapsulation.None,\n})\n/* tslint:enable */\nexport class FormioReportComponent\n extends FormioComponent\n implements OnInit, OnChanges\n{\n @Input() report?: FormioReport;\n @Input() projectEndpoint?: string;\n @Output() fetchDataError = new EventEmitter<any>();\n @ViewChild(\"report\", { static: true })\n declare formioElement?: ElementRef<any>;\n\n public isReportLoading: boolean;\n\n setFormFromSrc() {\n this.service.loadSubmission({ params: { live: 1 } }).subscribe(\n (report: FormioReport) => {\n this.report = report;\n if (report && report.data) {\n this.ngZone.runOutsideAngular(() => {\n this.setForm({ components: [], report });\n this.isReportLoading = false;\n });\n }\n },\n (err) => this.onError(err)\n );\n }\n\n setFormUrl(url) {\n return;\n }\n\n ngOnChanges(changes: any) {\n super.ngOnChanges(changes);\n\n if (changes.report && changes.report.currentValue) {\n this.ngZone.runOutsideAngular(() => {\n this.setForm({ report: changes.report.currentValue, components: [] });\n this.isReportLoading = false;\n });\n }\n }\n\n getRendererOptions() {\n const projectEndpoint =\n this.projectEndpoint ||\n this.config?.appUrl ||\n this.service?.formio?.projectUrl;\n\n if (!projectEndpoint && !this.src) {\n console.warn(\n \"The projectEndpoint url is required to render the Report using JSON schema.\"\n );\n }\n return {\n projectEndpoint,\n ...super.getRendererOptions(),\n };\n }\n createRenderer() {\n const Renderer = this.getRenderer();\n if (!Renderer) {\n return null;\n }\n\n const form = new Renderer(\n this.formioElement ? this.formioElement.nativeElement : null,\n this.report,\n this.getRendererOptions()\n );\n return form.instance;\n }\n\n attachFormEvents() {\n this.formio.on(\"fetchDataError\", (error: any, component: any) =>\n this.ngZone.run(() => {\n this.alerts.addAlert({\n type: \"danger\",\n message: error ? JSON.stringify(error) : error,\n });\n this.fetchDataError.emit({ error, component });\n })\n );\n }\n\n getRenderer() {\n const reportRenderer = (Formio as any).Report;\n if (!reportRenderer) {\n console.error(\n \"Report is not found in Formio. Please make sure that you are using the Formio Reporting module and it is correctly included in your application.\"\n );\n }\n\n return reportRenderer;\n }\n}\n","<div role=\"form\" [attr.aria-label]=\"label\">\n <div *ngIf=\"isReportLoading && !hideLoading\" style=\"position:relative;height:200px\">\n <formio-loader [isLoading]=\"isReportLoading\"></formio-loader>\n </div>\n <formio-alerts *ngIf=\"this.options.alertsPosition === AlertsPosition.top || this.options.alertsPosition === AlertsPosition.both\" (focusComponent)=\"focusOnComponet($event)\" [alerts]=\"alerts\"></formio-alerts>\n <div #report></div>\n <formio-alerts *ngIf=\"this.options.alertsPosition === AlertsPosition.bottom || this.options.alertsPosition === AlertsPosition.both\" (focusComponent)=\"focusOnComponet($event)\" [alerts]=\"alerts\"></formio-alerts>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormioComponent } from './components/formio/formio.component';\nimport { FormioReportComponent } from './components/formioreport/formioreport.component';\nimport { FormBuilderComponent } from './components/formbuilder/formbuilder.component';\nimport { FormioAlerts } from './components/alerts/formio.alerts';\nimport { ParseHtmlContentPipe } from './components/alerts/parse-html-content.pipe';\nimport { FormioAlertsComponent } from './components/alerts/formio.alerts.component';\nimport { FormioLoaderComponent } from './components/loader/formio.loader.component';\nimport { CustomTagsService } from './custom-tags.service';\nimport { FormioBaseComponent } from './FormioBaseComponent';\n\n@NgModule({\n declarations: [\n FormioComponent,\n FormioReportComponent,\n FormioBaseComponent,\n FormBuilderComponent,\n FormioLoaderComponent,\n FormioAlertsComponent,\n ParseHtmlContentPipe\n ],\n imports: [\n CommonModule\n ],\n exports: [\n FormioComponent,\n FormioReportComponent,\n FormBuilderComponent,\n FormioLoaderComponent,\n FormioAlertsComponent\n ],\n providers: [\n FormioAlerts,\n CustomTagsService\n ]\n})\nexport class FormioModule {}\n","if (window && typeof (window as any).global === \"undefined\") {\n (window as any).global = window;\n}\nexport * from \"./formio.config\";\nexport * from \"./formio.common\";\nexport * from \"./formio.service\";\nexport * from \"./formio-promise.service\";\nexport * from \"./formio.utils\";\nexport * from \"./FormioBaseComponent\";\nexport * from \"./components/formio/formio.component\";\nexport * from \"./components/formbuilder/formbuilder.component\";\nexport * from \"./components/formioreport/formioreport.component\";\nexport * from \"./components/loader/formio.loader.component\";\nexport * from \"./components/alerts/formio.alerts\";\nexport * from \"./components/alerts/formio.alerts.component\";\nexport { FormioModule } from \"./formio.module\";\nexport {\n ComponentSchema,\n ExtendedComponentSchema,\n ElementInfo,\n} from \"@formio/deprecated-types\";\nexport { Utils as FormioUtils } from \"formiojs-colfuturo\";\nexport { Formio } from \"formiojs-colfuturo\";\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["Formio","i1.FormioAppConfig","i2.CustomTagsService","i2.ParseHtmlContentPipe","i3","i4.FormioLoaderComponent","i5.FormioAlertsComponent","i2.FormioLoaderComponent","i3.FormioAlertsComponent"],"mappings":";;;;;;;;;;MACa,aAAa,GAAG,IAAI,cAAc,CAAC,eAAe;MAIlD,eAAe,CAAA;IAE1B,MAAM,GAAG,EAAE;IACX,MAAM,GAAG,EAAE;AACX,IAAA,KAAK;AACL,IAAA,QAAQ;AACR,IAAA,MAAM;AACN,IAAA,WAAA,CAEE,SAKI,EAAE,EAAA;QAEN,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,OAAO;QAC7C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,UAAU;AAChD,QAAA,IAAI,IAAI,CAAC,MAAM,EAAE;AACf,YAAA,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;AAC9B,YAAA,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,MAAM,CAAC;YACj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