UNPKG

@formio/angular

Version:

This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.1.4.

1 lines 70.7 kB
{"version":3,"file":"formio-angular-manager.mjs","sources":["../../../projects/angular-formio/manager/src/form-manager.config.ts","../../../projects/angular-formio/manager/src/form-manager.service.ts","../../../projects/angular-formio/manager/src/index/index.component.ts","../../../projects/angular-formio/manager/src/index/index.component.html","../../../projects/angular-formio/manager/src/edit/edit.component.ts","../../../projects/angular-formio/manager/src/edit/edit.component.html","../../../projects/angular-formio/manager/src/create/create.component.ts","../../../projects/angular-formio/manager/src/form/form.component.ts","../../../projects/angular-formio/manager/src/form/form.component.html","../../../projects/angular-formio/manager/src/view/view.component.ts","../../../projects/angular-formio/manager/src/view/view.component.html","../../../projects/angular-formio/manager/src/delete/delete.component.ts","../../../projects/angular-formio/manager/src/delete/delete.component.html","../../../projects/angular-formio/manager/src/submission/edit/edit.component.ts","../../../projects/angular-formio/manager/src/submission/edit/edit.component.html","../../../projects/angular-formio/manager/src/submission/delete/delete.component.ts","../../../projects/angular-formio/manager/src/submission/delete/delete.component.html","../../../projects/angular-formio/manager/src/submission/view/view.component.ts","../../../projects/angular-formio/manager/src/submission/view/view.component.html","../../../projects/angular-formio/manager/src/submission/index/index.component.ts","../../../projects/angular-formio/manager/src/submission/index/index.component.html","../../../projects/angular-formio/manager/src/submission/submission/submission.component.ts","../../../projects/angular-formio/manager/src/submission/submission/submission.component.html","../../../projects/angular-formio/manager/src/form-manager.routes.ts","../../../projects/angular-formio/manager/src/form-manager.module.ts","../../../projects/angular-formio/manager/src/formio-angular-manager.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\ntype FormType = 'form' | 'resource';\n\nexport interface FormManagerRouteConfig {\n formIndex?: any;\n formCreate?: any;\n form?: any;\n formView?: any;\n formEdit?: any;\n formEmbed?: any;\n formDelete?: any;\n submissionIndex?: any;\n submission?: any;\n submissionView?: any;\n submissionEdit?: any;\n submissionDelete?: any;\n}\n\n@Injectable()\nexport class FormManagerConfig {\n public tag = '';\n public includeSearch = false;\n public saveDraft = false;\n public type: FormType = 'form';\n public builder?: any;\n public viewer?: string;\n public renderer: any;\n}\n\nexport const DefaultConfiguration = new FormManagerConfig();\n","import { Injectable } from '@angular/core';\nimport { FormioAppConfig } from '@formio/angular';\nimport { FormManagerConfig } from './form-manager.config';\nimport { Formio } from '@formio/js';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormioAuthService } from '@formio/angular/auth';\nimport _intersection from 'lodash/intersection';\n\n@Injectable()\nexport class FormManagerService {\n public formio: Formio;\n public access: any;\n public allAccessMap: any;\n public ownAccessMap: any;\n public ready: Promise<any>;\n public formReady: Promise<any>;\n public actionAllowed: any;\n public form = null;\n public formSrc = '';\n public perms = {delete: false, edit: false};\n\n constructor(\n public appConfig: FormioAppConfig,\n public config: FormManagerConfig,\n public auth: FormioAuthService\n ) {\n if (this.appConfig && this.appConfig.appUrl) {\n Formio.setBaseUrl(this.appConfig.apiUrl);\n Formio.setProjectUrl(this.appConfig.appUrl);\n } else {\n console.error('You must provide an AppConfig within your application!');\n }\n\n this.allAccessMap = {\n 'update_all': 'formEdit',\n 'delete_all': 'formDelete'\n };\n this.ownAccessMap = {\n 'update_own': 'formEdit',\n 'delete_own': 'formDelete'\n };\n this.actionAllowed = (action) => this.isActionAllowed(action);\n this.reset();\n }\n\n isActionAllowed(action: string) {\n return this.access[action];\n }\n\n setAccess() {\n this.access = {\n formCreate: true,\n formView: true,\n formSubmission: true,\n formEdit: true,\n formPermission: true,\n formDelete: true,\n projectSettings: true,\n userManagement: true\n };\n if (this.auth) {\n this.access = {\n formCreate: false,\n formView: false,\n formSubmission: false,\n formEdit: false,\n formPermission: false,\n formDelete: false,\n projectSettings: false,\n userManagement: false\n };\n this.ready = this.auth.ready.then(() => {\n let administrator = this.auth.roles[\"administrator\"];\n let formbuilder = this.auth.roles[\"formbuilder\"];\n let formadmin = this.auth.roles[\"formadmin\"];\n\n if (this.auth.user && this.auth.user.roles) {\n this.auth.user.roles.forEach((roleId: string) => {\n if (administrator._id === roleId) {\n this.access.formCreate = true;\n this.access.formView = true;\n this.access.formSubmission= true;\n this.access.formEdit = true;\n this.access.formPermission = true;\n this.access.formDelete = true;\n this.access.projectSettings = true;\n this.access.userManagement = true;\n }\n else {\n if (formadmin && formadmin._id === roleId) {\n this.access.formCreate = this.auth.formAccess.create_all.includes(roleId);\n this.access.formEdit = this.auth.formAccess.update_all.includes(roleId);\n this.access.formPermission = this.auth.formAccess.update_all.includes(roleId);\n this.access.formDelete = this.auth.formAccess.delete_all.includes(roleId);\n this.access.formView = this.auth.formAccess.read_all.includes(roleId);\n this.access.formSubmission = this.auth.formAccess.read_all.includes(roleId);\n }\n if (formbuilder && formbuilder._id === roleId) {\n this.access.formCreate = this.auth.formAccess.create_all.includes(roleId);\n this.access.formEdit = this.auth.formAccess.update_all.includes(roleId);\n this.access.formPermission = this.auth.formAccess.update_all.includes(roleId);\n this.access.formDelete = this.auth.formAccess.delete_all.includes(roleId);\n this.access.formView = this.auth.formAccess.read_all.includes(roleId);\n }\n }\n });\n }\n });\n } else {\n this.ready = Promise.resolve(false);\n }\n }\n\n reset(route?: ActivatedRoute) {\n if (route) {\n route.params.subscribe(params => {\n if (params.id) {\n this.formio = new Formio(`${this.formio.formsUrl}/${params.id}`);\n } else {\n this.reset();\n }\n });\n } else {\n this.formio = new Formio(this.appConfig.appUrl);\n this.setAccess();\n }\n }\n\n hasAccess(roles) {\n if (!this.auth.user) {\n return false;\n }\n return !!_intersection(roles, this.auth.user.roles).length;\n }\n\n setForm(form: any) {\n this.form = form;\n this.formSrc = this.appConfig.appUrl + '/' + form.path;\n if (form.access) {\n // Check if they have access here.\n form.access.forEach(access => {\n // Check for all access.\n if (this.allAccessMap[access.type] && !this.access[this.allAccessMap[access.type]]) {\n this.access[this.allAccessMap[access.type]] = this.hasAccess(access.roles);\n }\n\n // Check for own access.\n if (\n this.auth && this.auth.user &&\n (form._id === this.auth.user._id) &&\n this.ownAccessMap[access.type] &&\n !this.access[this.ownAccessMap[access.type]]\n ) {\n this.access[this.ownAccessMap[access.type]] = this.hasAccess(access.roles);\n }\n });\n }\n return form;\n }\n\n loadForm() {\n this.form = null;\n this.formReady = this.formio.loadForm().then(form => this.setForm(form));\n return this.formReady;\n }\n\n setSubmission(route: ActivatedRoute) {\n return new Promise((resolve) => {\n route.params.subscribe(params => {\n this.formio = new Formio(`${this.formio.submissionsUrl}/${params.id}`);\n resolve(this.formio);\n });\n });\n }\n\n submissionLoaded(submission: any) {\n this.auth.ready.then(() => {\n this.formio.userPermissions(this.auth.user, this.form, submission).then((perms) => {\n this.perms.delete = perms.delete;\n this.perms.edit = perms.edit;\n });\n });\n }\n\n loadForms() {\n return this.formio.loadForms({params: {\n tags: this.config.tag\n }});\n }\n}\n","import { AfterViewInit, Component, ElementRef, OnInit, ViewChild } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormManagerService } from '../form-manager.service';\nimport { DefaultConfiguration, FormManagerConfig } from '../form-manager.config';\nimport { FormioGridComponent } from '@formio/angular/grid';\nimport { debounce } from 'lodash';\n\n@Component({\n templateUrl: './index.component.html',\n styleUrls: ['./index.component.scss']\n})\nexport class FormManagerIndexComponent implements OnInit, AfterViewInit {\n @ViewChild('search') searchElement: ElementRef;\n @ViewChild(FormioGridComponent, {static: false}) formGrid: FormioGridComponent;\n public gridQuery: any;\n public onSearch;\n constructor(\n public service: FormManagerService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormManagerConfig\n ) {\n this.config = {...DefaultConfiguration, ...this.config};\n this.gridQuery = {type: this.config.type, sort: 'title'};\n if (this.config.tag) {\n this.gridQuery.tags = this.config.tag;\n }\n this.onSearch = debounce(this._onSearch, 300);\n }\n\n loadGrid() {\n this.gridQuery = JSON.parse(localStorage.getItem('query')) || this.gridQuery;\n const currentPage = +localStorage.getItem('currentPage') || 0;\n this.formGrid\n .refreshGrid(this.gridQuery)\n .then(() => this.formGrid.setPage(currentPage - 1));\n }\n\n ngOnInit() {\n this.gridQuery = {type: this.config.type, sort: 'title'};\n if (this.config.tag) {\n this.gridQuery.tags = this.config.tag;\n }\n this.service.reset();\n this.service.ready.then(() => {\n this.loadGrid();\n this.formGrid.footer.pageChanged.subscribe(page => {\n localStorage.setItem('currentPage', page.page);\n });\n });\n }\n\n ngAfterViewInit(): void {\n this.searchElement.nativeElement.value = localStorage.getItem('searchInput') || '';\n }\n\n _onSearch() {\n const search = this.searchElement.nativeElement.value;\n if (search.length > 0) {\n this.gridQuery.skip = 0;\n this.gridQuery.title__regex = '/' + search + '/i';\n this.gridQuery.title__regex = '/' + search.trim() + '/i';\n } else {\n delete this.gridQuery.title__regex;\n }\n localStorage.setItem('query', JSON.stringify(this.gridQuery));\n localStorage.setItem('searchInput', search);\n this.formGrid.pageChanged({page: 1, itemPerPage: this.gridQuery.limit});\n }\n\n clearSearch() {\n this.gridQuery = {type: this.config.type, sort: 'title'};\n if (this.config.tag) {\n this.gridQuery.tags = this.config.tag;\n }\n localStorage.removeItem('query');\n localStorage.removeItem('searchInput');\n localStorage.removeItem('currentPage');\n if (this.searchElement?.nativeElement) {\n this.searchElement.nativeElement.value = '';\n }\n this.formGrid.query = this.gridQuery;\n this.formGrid.pageChanged({page: 1});\n }\n\n onAction(action: any) {\n this.service.form = null; // Reset previous form data\n this.router.navigate([action.row._id, action.action], { relativeTo: this.route });\n }\n\n onSelect(row: any) {\n this.router.navigate([row._id], { relativeTo: this.route });\n }\n\n onCreateItem() {\n this.router.navigate(['create'], { relativeTo: this.route });\n }\n}\n","<div role=\"search\" class=\"input-group mb-3\" *ngIf=\"config.includeSearch\">\n <input #search type=\"text\" (keyup)=\"onSearch()\" class=\"form-control\" placeholder=\"Search Forms\" aria-label=\"Search Forms\" aria-describedby=\"button-search\">\n <span *ngIf=\"search && search !== ''\" class=\"form-clear input-group-addon\" (click)=\"clearSearch()\"><span class=\"fa fa-times bi bi-x\"></span></span>\n</div>\n<formio-grid\n *ngIf=\"service.ready\"\n [formio]=\"service.formio\"\n [gridType]=\"'form'\"\n [query]=\"gridQuery\"\n [isActionAllowed]=\"service.actionAllowed\"\n (rowAction)=\"onAction($event)\"\n (rowSelect)=\"onSelect($event)\"\n (createItem)=\"onCreateItem()\"\n></formio-grid>\n","import { Component, ViewChild, ElementRef, AfterViewInit, ChangeDetectorRef } from '@angular/core';\nimport { FormManagerService } from '../form-manager.service';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { FormManagerConfig } from '../form-manager.config';\nimport { FormioAlerts } from '@formio/angular';\nimport { FormBuilderComponent } from '@formio/angular';\nimport _ from 'lodash';\n\n@Component({\n templateUrl: './edit.component.html'\n})\nexport class FormManagerEditComponent implements AfterViewInit {\n @ViewChild(FormBuilderComponent, {static: false}) builder: FormBuilderComponent;\n @ViewChild('title', {static: false}) formTitle: ElementRef;\n @ViewChild('type', {static: false}) formType: ElementRef;\n public form: any;\n public loading: Boolean;\n public formReady: Boolean;\n public editMode: Boolean;\n\n constructor(\n public service: FormManagerService,\n public router: Router,\n public route: ActivatedRoute,\n public config: FormManagerConfig,\n public ref: ChangeDetectorRef,\n public alerts: FormioAlerts\n ) {\n this.form = {components: []};\n this.formReady = false;\n this.loading = false;\n this.editMode = false;\n }\n\n initBuilder(editing) {\n if (editing) {\n this.loading = true;\n this.editMode = true;\n return this.service.formReady.then(() => {\n this.form = this.service.form;\n this.formTitle.nativeElement.value = this.service.form.title;\n this.formType.nativeElement.value = this.service.form.display || 'form';\n this.formReady = true;\n this.loading = false;\n this.ref.detectChanges();\n return true;\n }).catch(err => {\n this.alerts.setAlert({type: 'danger', message: (err.message || err)});\n this.loading = false;\n this.ref.detectChanges();\n this.formReady = true;\n });\n } else {\n this.formReady = true;\n return Promise.resolve(true);\n }\n }\n\n ngAfterViewInit() {\n this.route.url.subscribe( url => {\n setTimeout(() => this.initBuilder((url[0].path === 'edit')), 0);\n });\n }\n\n onDisplaySelect(event) {\n this.builder.setDisplay(event.target.value);\n }\n\n saveForm() {\n this.loading = true;\n this.form = _.cloneDeep(this.builder.formio.schema);\n this.form.title = this.formTitle.nativeElement.value.trim();\n this.form.display = this.formType.nativeElement.value;\n this.form.components = _.cloneDeep(this.builder.form.components);\n\n if (this.config.tag) {\n this.form.tags = this.form.tags || [];\n this.form.tags.push(this.config.tag);\n this.form.tags = _.uniq(this.form.tags);\n }\n if (this.config.type) {\n this.form.type = this.config.type;\n }\n if (!this.form._id) {\n this.form.name = _.camelCase(this.form.title).toLowerCase();\n this.form.path = this.form.name;\n }\n return this.service.formio.saveForm(this.form).then(form => {\n this.form = this.service.setForm(form);\n this.loading = false;\n return this.form;\n }).catch(err => {\n this.loading = false;\n // Catch if a form is returned as an error. This is a conflict.\n if (err._id && err.type) {\n throw err;\n }\n this.alerts.setAlert({type: 'danger', message: (err.message || err)});\n });\n }\n\n onSave() {\n return this.saveForm().then((form) => {\n if (this.editMode) {\n this.router.navigate(['../', 'view'], {relativeTo: this.route});\n } else {\n this.router.navigate(['../', form._id, 'view'], {relativeTo: this.route});\n }\n });\n }\n}\n","<div class=\"loader\" *ngIf=\"loading\"></div>\n<div class=\"form-group row mb-2\">\n <div class=\"col-sm-8\">\n <input type=\"text\" class=\"form-control\" id=\"formTitle\" placeholder=\"Enter a Title\" #title>\n </div>\n <div class=\"col-sm-2\">\n <select class=\"form-control\" id=\"formSelect\" (change)=\"onDisplaySelect($event)\" #type>\n <option value=\"form\">Form</option>\n <option value=\"wizard\">Wizard</option>\n <option value=\"pdf\">PDF</option>\n </select>\n </div>\n <div class=\"col-sm-2\">\n <button class=\"btn btn-primary btn-block\" (click)=\"onSave()\"><i class=\"bi bi-save me-2\"></i>Save Form</button>\n </div>\n</div>\n<formio-alerts [alerts]=\"alerts\"></formio-alerts>\n<form-builder *ngIf=\"formReady\" [formbuilder]=\"config.builder\" [form]=\"form\" #builder></form-builder>\n<button class=\"btn btn-primary\" style=\"margin-top: 10px;\" (click)=\"onSave()\">Save Form</button>\n","import { Component, OnInit } from '@angular/core';\nimport { FormManagerEditComponent } from '../edit/edit.component';\n\n@Component({\n templateUrl: '../edit/edit.component.html'\n})\nexport class FormManagerCreateComponent extends FormManagerEditComponent implements OnInit {\n ngOnInit() {\n this.service.reset();\n }\n}\n","import { Component, OnInit, TemplateRef } from '@angular/core';\nimport { FormManagerService } from '../form-manager.service';\nimport { FormManagerConfig } from '../form-manager.config';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormioAppConfig } from '@formio/angular';\nimport { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';\n\n@Component({\n templateUrl: './form.component.html'\n})\nexport class FormManagerFormComponent implements OnInit {\n choice: any = 'isUrl';\n embedCode: any;\n shareUrl: any;\n projectId: any;\n pathName: any;\n goTo: any = '';\n modalRef: BsModalRef;\n constructor(\n public service: FormManagerService,\n public route: ActivatedRoute,\n public appConfig: FormioAppConfig,\n public options: FormManagerConfig,\n private modalService: BsModalService\n ) { }\n\n ngOnInit() {\n this.service.reset(this.route);\n this.service.loadForm().then(form => {\n this.service.formSrc = this.appConfig.appUrl + '/' + form.path;\n this.projectId = form.project;\n this.pathName = form.path;\n this.getShareUrl();\n });\n }\n\n public getShareUrl() {\n const src = this.appConfig.appUrl + '/' + this.pathName;\n this.shareUrl = `${this.options.viewer}/#/?src=${encodeURIComponent(src)}`;\n return this.shareUrl;\n }\n\n openEmbed(content: TemplateRef<any>) {\n let goto = '';\n if (this.goTo) {\n goto += `if (d && d.formSubmission && d.formSubmission._id) { window.location.href = \"${this.goTo}\";}`;\n }\n let embedCode = '<script type=\"text/javascript\">';\n embedCode += '(function a(d, w, u) {';\n embedCode += 'var h = d.getElementsByTagName(\"head\")[0];';\n embedCode += 'var s = d.createElement(\"script\");';\n embedCode += 's.type = \"text/javascript\";';\n embedCode += 's.src = \"' + this.options.viewer + '/assets/lib/seamless/seamless.parent.min.js\";';\n embedCode += 's.onload = function b() {';\n embedCode += 'var f = d.getElementById(\"formio-form-' + this.service.formio.formId + '\");';\n embedCode += 'if (!f || (typeof w.seamless === u)) {';\n embedCode += 'return setTimeout(b, 100);';\n embedCode += '}';\n embedCode += 'w.seamless(f, {fallback:false}).receive(function(d, e) {' + goto + '});';\n embedCode += '};';\n embedCode += 'h.appendChild(s);';\n embedCode += '})(document, window);';\n embedCode += '</script>';\n embedCode += '<iframe id=\"formio-form-' + this.service.formio.formId + '\" ';\n embedCode += 'style=\"width:100%;border:none;\" height=\"800px\" src=\"' + this.shareUrl + '&iframe=1\"></iframe>';\n this.embedCode = embedCode;\n this.modalRef = this.modalService.show(content, { class: 'modal-lg' });\n }\n\n choices(string) {\n this.choice = string;\n }\n}\n","<button *ngIf=\"options.viewer\" class=\"float-end btn btn-outline-primary\" (click)=\"openEmbed(content)\"><em class=\"fa fa-share-alt bi bi-share\"></em> Share</button>\n<ul class=\"nav nav-tabs mb-2\">\n <li class=\"nav-item\"><a class=\"nav-link\" routerLink=\"../\"><em class=\"fa fa-chevron-left bi bi-chevron-left\"></em></a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"view\" routerLinkActive=\"active\"><em class=\"fa fa-pencil bi bi-pencil\"></em> Enter Data</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"submission\" routerLinkActive=\"active\"><em class=\"fa fa-list-alt bi bi-table\"></em> View Data</a></li>\n <li *ngIf=\"service.actionAllowed('formEdit')\" class=\"nav-item\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"edit\" routerLinkActive=\"active\"><em class=\"fa fa-edit bi bi-pencil-square\"></em> Edit Form</a></li>\n <li *ngIf=\"service.actionAllowed('formDelete')\" class=\"nav-item\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"delete\" routerLinkActive=\"active\"><span class=\"fa fa-trash bi bi-trash\"></span></a></li>\n</ul>\n<router-outlet></router-outlet>\n<ng-template #content>\n <div class=\"modal-header\">\n <h4 class=\"modal-title\">Share or Embed this form</h4>\n <button type=\"button\" class=\"close\" aria-label=\"Close\" (click)=\"modalRef.hide()\">\n <span aria-hidden=\"true\">&times;</span>\n </button>\n </div>\n <div class=\"modal-body\">\n <ul class=\"nav nav-tabs mr-auto mb-2\">\n <li class=\"nav-item\">\n <a class=\"nav-link\" [ngClass]=\"{'active': choice === 'isUrl'}\" (click)=\"choices('isUrl')\"><em class=\"fa fa-link bi bi-link\"></em> URL</a>\n </li>\n <li class=\"nav-item\">\n <a class=\"nav-link\" [ngClass]=\"{'active': choice === 'isEmbed'}\" (click)=\"choices('isEmbed')\"><em class=\"fa fa-code bi bi-code-slash\"></em> Embed</a>\n </li>\n </ul>\n <pre *ngIf=\"choice === 'isEmbed'\"><textarea onclick=\"this.focus();this.select()\" readonly=\"readonly\" style=\"width:100%;\" rows=\"8\" [ngModel]=\"embedCode\"></textarea></pre>\n <input *ngIf=\"choice === 'isUrl'\" type=\"text\" onclick=\"this.focus();this.select()\" readonly=\"readonly\" class=\"form-control\" [ngModel]=\"shareUrl\" placeholder=\"https://examples.form.io/example\">\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-light\" (click)=\"modalRef.hide()\">Close</button>\n </div>\n</ng-template>\n","import { Component, OnInit, EventEmitter } from '@angular/core';\nimport { FormManagerConfig } from '../form-manager.config';\nimport { FormManagerService } from '../form-manager.service';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { FormioAuthService } from '@formio/angular/auth';\nimport { Formio } from '@formio/js';\n\n@Component({\n templateUrl: './view.component.html'\n})\nexport class FormManagerViewComponent implements OnInit {\n public submission: any;\n public renderOptions: any;\n public onSuccess: EventEmitter<object> = new EventEmitter();\n public onError: EventEmitter<object> = new EventEmitter();\n public onSubmitDone: EventEmitter<object> = new EventEmitter();\n constructor(\n public service: FormManagerService,\n public router: Router,\n public route: ActivatedRoute,\n public config: FormManagerConfig,\n public auth: FormioAuthService\n ) {\n this.renderOptions = {\n saveDraft: this.config.saveDraft\n };\n this.submission = {data: {}};\n }\n\n ngOnInit() {\n this.service.formio = new Formio(this.service.formio.formUrl);\n }\n\n onSubmit(submission: any) {\n const isDraft = submission.state === 'draft';\n this.submission.data = submission.data;\n this.submission.state = isDraft ? submission.state : 'complete';\n this.service.formio.saveSubmission(this.submission).then(saved => {\n this.onSubmitDone.emit(saved);\n this.onSuccess.emit();\n this.router.navigate(['../', 'submission', saved._id], {relativeTo: this.route});\n }).catch((err) => this.onError.emit(err));\n }\n}\n","<formio *ngIf=\"service.form\"\n [renderer]=\"config.renderer\"\n [renderOptions]=\"renderOptions\"\n [url]=\"service.formio.formUrl\"\n [form]=\"service.form\"\n [submission]=\"submission\"\n [success]=\"onSuccess\"\n [submitDone]=\"onSubmitDone\"\n [error]=\"onError\"\n (submit)=\"onSubmit($event)\"\n></formio>\n","import { Component } from '@angular/core';\nimport { FormManagerService } from '../form-manager.service';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { FormioAlerts } from '@formio/angular';\nimport { GridService } from '@formio/angular/grid';\n\n@Component({\n templateUrl: './delete.component.html'\n})\nexport class FormManagerDeleteComponent {\n constructor(\n public managerService: FormManagerService,\n public router: Router,\n public route: ActivatedRoute,\n public alerts: FormioAlerts,\n public gridService?: GridService\n ) {}\n\n onDelete() {\n this.managerService.formio.deleteForm().then(() => {\n if (this.gridService) {\n const currentPage = +localStorage.getItem('currentPage') || 0;\n const formsNumberPerPage = this.gridService.getFormsPerPage();\n\n if (formsNumberPerPage === 1 && currentPage !== 0) {\n localStorage.setItem('currentPage', `${currentPage - 1}`);\n }\n }\n\n this.router.navigate(['../../'], { relativeTo: this.route });\n }).catch(err => this.alerts.setAlert({type: 'danger', message: (err.message || err)}));\n }\n\n onCancel() {\n this.router.navigate(['../', 'view'], { relativeTo: this.route });\n }\n}\n","<formio-alerts [alerts]=\"alerts\"></formio-alerts>\n<h3>Are you sure you wish to delete this form?</h3>\n<div class=\"btn-toolbar\">\n <button type=\"button\" (click)=\"onDelete()\" class=\"btn btn-danger\" style=\"margin-right: 10px;\">Yes</button>\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-default\">No</button>\n</div>\n","import { Component } from '@angular/core';\nimport { FormManagerService } from '../../form-manager.service';\nimport { ActivatedRoute, Router } from '@angular/router';\n\n@Component({\n templateUrl: './edit.component.html'\n})\nexport class SubmissionEditComponent {\n constructor(\n public service: FormManagerService,\n public router: Router,\n public route: ActivatedRoute\n ) { }\n\n onSubmit(submission) {\n this.router.navigate(['../../'], {relativeTo: this.route});\n }\n}\n","<formio\n [renderer]=\"service.config.renderer\"\n [src]=\"service.formio.submissionUrl\"\n (submit)=\"onSubmit($event)\"\n (formLoad)=\"service.setForm($event)\"\n (submissionLoad)=\"service.submissionLoaded($event)\"\n></formio>\n","import { Component } from '@angular/core';\nimport { FormManagerService } from '../../form-manager.service';\nimport { ActivatedRoute, Router } from '@angular/router';\nimport { FormioAlerts } from '@formio/angular';\n\n@Component({\n templateUrl: './delete.component.html'\n})\nexport class SubmissionDeleteComponent {\n constructor(\n public service: FormManagerService,\n public router: Router,\n public route: ActivatedRoute,\n public alerts: FormioAlerts\n ) {}\n\n onDelete() {\n this.service.formio.deleteSubmission().then(() => {\n this.router.navigate(['../../'], { relativeTo: this.route });\n }).catch(err => this.alerts.setAlert({type: 'danger', message: (err.message || err)}));\n }\n\n onCancel() {\n this.router.navigate(['../', 'view'], { relativeTo: this.route });\n }\n}\n","<formio-alerts [alerts]=\"alerts\"></formio-alerts>\n<h3>Are you sure you wish to delete this record?</h3>\n<div class=\"btn-toolbar\">\n <button type=\"button\" (click)=\"onDelete()\" class=\"btn btn-danger\" style=\"margin-right: 10px;\">Yes</button>\n <button type=\"button\" (click)=\"onCancel()\" class=\"btn btn-default\">No</button>\n</div>\n","import { Component } from '@angular/core';\nimport { FormManagerService } from '../../form-manager.service';\n\n@Component({\n templateUrl: './view.component.html'\n})\nexport class SubmissionViewComponent {\n constructor(public service: FormManagerService) { }\n}\n","<formio\n [renderer]=\"service.config.renderer\"\n [src]=\"service.formio.submissionUrl\"\n [readOnly]=\"true\"\n (formLoad)=\"service.setForm($event)\"\n (submissionLoad)=\"service.submissionLoaded($event)\"\n></formio>\n","import { Component } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormManagerService } from '../../form-manager.service';\n\n@Component({\n templateUrl: './index.component.html'\n})\nexport class SubmissionIndexComponent {\n constructor(\n public service: FormManagerService,\n public route: ActivatedRoute,\n public router: Router\n ) {}\n\n onSelect(row: any) {\n this.router.navigate([row._id, 'view'], {relativeTo: this.route});\n }\n}\n","<formio-grid [formio]=\"service.formio\" (rowSelect)=\"onSelect($event)\"></formio-grid>\n","import { Component, OnInit } from '@angular/core';\nimport { FormManagerService } from '../../form-manager.service';\nimport { ActivatedRoute } from '@angular/router';\n\n@Component({\n templateUrl: './submission.component.html'\n})\nexport class SubmissionComponent implements OnInit {\n public downloadUrl: string;\n constructor(\n public service: FormManagerService,\n public route: ActivatedRoute\n ) { }\n\n setDownloadUrl(url) {\n this.downloadUrl = url;\n }\n\n ngOnInit() {\n this.service.setSubmission(this.route).then((formio: any) => {\n formio.getDownloadUrl().then((url) => this.setDownloadUrl(url));\n });\n }\n}\n","<a *ngIf=\"downloadUrl\" [href]=\"downloadUrl\" target=\"_blank\" class=\"pull-right\"><img src=\"https://pro.formview.io/assets/pdf.png\" alt=\"pdfImage\" style=\"height: 2em;\" /></a>\n<ul aria-label=\"Submission\" role=\"navigation\" class=\"nav nav-tabs\" style=\"margin-bottom:10px\">\n <li class=\"nav-item\"><a class=\"nav-link\" routerLink=\"../\"><em class=\"fa fa-chevron-left bi bi-chevron-left\"></em></a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\"><a class=\"nav-link\" routerLink=\"view\" routerLinkActive=\"active\"><em class=\"fa fa-eye bi bi-eye\"></em> View</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\" *ngIf=\"service.perms.edit\"><a class=\"nav-link\" routerLink=\"edit\" routerLinkActive=\"active\"><em class=\"fa fa-edit bi bi-pencil-square\"></em> Edit</a></li>\n <li class=\"nav-item\" routerLinkActive=\"active\" *ngIf=\"service.perms.delete\"><a class=\"nav-link\" routerLink=\"delete\" routerLinkActive=\"active\"><span class=\"fa fa-trash bi bi-trash\"></span></a></li>\n</ul>\n<router-outlet></router-outlet>\n","import { Routes } from '@angular/router';\nimport { FormManagerIndexComponent } from './index/index.component';\nimport { FormManagerCreateComponent } from './create/create.component';\nimport { FormManagerFormComponent } from './form/form.component';\nimport { FormManagerViewComponent } from './view/view.component';\nimport { FormManagerEditComponent } from './edit/edit.component';\nimport { FormManagerDeleteComponent } from './delete/delete.component';\nimport { SubmissionEditComponent } from './submission/edit/edit.component';\nimport { SubmissionDeleteComponent } from './submission/delete/delete.component';\nimport { SubmissionViewComponent } from './submission/view/view.component';\nimport { SubmissionIndexComponent } from './submission/index/index.component';\nimport { SubmissionComponent } from './submission/submission/submission.component';\nimport { FormManagerRouteConfig } from './form-manager.config';\nexport function FormManagerRoutes(config?: FormManagerRouteConfig): Routes {\n return [\n {\n path: '',\n component: config && config.formIndex ? config.formIndex : FormManagerIndexComponent\n },\n {\n path: 'create',\n component: config && config.formCreate ? config.formCreate : FormManagerCreateComponent\n },\n {\n path: ':id',\n component: config && config.form ? config.form : FormManagerFormComponent,\n children: [\n {\n path: '',\n redirectTo: 'view',\n pathMatch: 'full'\n },\n {\n path: 'view',\n component: config && config.formView ? config.formView : FormManagerViewComponent\n },\n {\n path: 'edit',\n component: config && config.formEdit ? config.formEdit : FormManagerEditComponent\n },\n {\n path: 'delete',\n component: config && config.formDelete ? config.formDelete : FormManagerDeleteComponent\n },\n {\n path: 'submission',\n component: config && config.submissionIndex ? config.submissionIndex : SubmissionIndexComponent\n },\n {\n path: 'submission/:id',\n component: config && config.submission ? config.submission : SubmissionComponent,\n children: [\n {\n path: '',\n redirectTo: 'view',\n pathMatch: 'full'\n },\n {\n path: 'view',\n component: config && config.submissionView ? config.submissionView : SubmissionViewComponent\n },\n {\n path: 'edit',\n component: config && config.submissionEdit ? config.submissionEdit : SubmissionEditComponent\n },\n {\n path: 'delete',\n component: config && config.submissionDelete ? config.submissionDelete : SubmissionDeleteComponent\n }\n ]\n }\n ]\n }\n ];\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { FormioModule } from '@formio/angular';\nimport { FormioGrid } from '@formio/angular/grid';\nimport { FormManagerIndexComponent } from './index/index.component';\nimport { FormManagerCreateComponent } from './create/create.component';\nimport { FormManagerFormComponent } from './form/form.component';\nimport { FormManagerViewComponent } from './view/view.component';\nimport { FormManagerEditComponent } from './edit/edit.component';\nimport { FormManagerDeleteComponent } from './delete/delete.component';\nimport { SubmissionComponent } from './submission/submission/submission.component';\nimport { SubmissionEditComponent } from './submission/edit/edit.component';\nimport { SubmissionDeleteComponent } from './submission/delete/delete.component';\nimport { SubmissionViewComponent } from './submission/view/view.component';\nimport { SubmissionIndexComponent } from './submission/index/index.component';\nimport { FormManagerRouteConfig } from './form-manager.config';\nimport { FormManagerRoutes } from './form-manager.routes';\nimport { PaginationModule } from 'ngx-bootstrap/pagination';\nimport { ModalModule } from 'ngx-bootstrap/modal';\nimport { extendRouter } from '@formio/angular';\n@NgModule({\n imports: [\n CommonModule,\n FormioModule,\n RouterModule,\n FormsModule,\n FormioGrid,\n ModalModule.forRoot(),\n PaginationModule.forRoot()\n ],\n declarations: [\n FormManagerIndexComponent,\n FormManagerCreateComponent,\n FormManagerFormComponent,\n FormManagerViewComponent,\n FormManagerEditComponent,\n FormManagerDeleteComponent,\n SubmissionComponent,\n SubmissionEditComponent,\n SubmissionDeleteComponent,\n SubmissionViewComponent,\n SubmissionIndexComponent\n ]\n})\nexport class FormManagerModule {\n static forChild(config?: FormManagerRouteConfig): any {\n return extendRouter(FormManagerModule, config, FormManagerRoutes);\n }\n static forRoot(config?: FormManagerRouteConfig): any {\n return extendRouter(FormManagerModule, config, FormManagerRoutes);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"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