@formio/angular 5.2.4-rc.1 → 5.2.5-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"formio-angular-manager.js","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/edit/edit.component.ts","../../../projects/angular-formio/manager/src/create/create.component.ts","../../../projects/angular-formio/manager/src/form/form.component.ts","../../../projects/angular-formio/manager/src/view/view.component.ts","../../../projects/angular-formio/manager/src/delete/delete.component.ts","../../../projects/angular-formio/manager/src/submission/edit/edit.component.ts","../../../projects/angular-formio/manager/src/submission/delete/delete.component.ts","../../../projects/angular-formio/manager/src/submission/view/view.component.ts","../../../projects/angular-formio/manager/src/submission/index/index.component.ts","../../../projects/angular-formio/manager/src/submission/submission/submission.component.ts","../../../projects/angular-formio/manager/src/form-manager.routes.ts","../../../projects/angular-formio/manager/src/form-manager.module.ts","../../../projects/angular-formio/manager/src/public_api.ts","../../../projects/angular-formio/manager/src/formio-angular-manager.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\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 builder?: any;\n public viewer?: string;\n public renderer: any;\n}\n","import { Injectable } from '@angular/core';\nimport { FormioAppConfig } from '@formio/angular';\nimport { FormManagerConfig } from './form-manager.config';\nimport { Formio } from 'formiojs';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormioAuthService } from '@formio/angular/auth';\nimport _each from 'lodash/each';\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._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._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 createForm(form: any) {\n return this.formio.createform(form);\n }\n}\n","import { Component, OnInit, ViewChild } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormManagerService } from '../form-manager.service';\nimport { 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 {\n @ViewChild(FormioGridComponent, {static: false}) formGrid: FormioGridComponent;\n public gridQuery: any;\n public search = '';\n constructor(\n public service: FormManagerService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormManagerConfig\n ) {\n this.gridQuery = {tags: this.config.tag, type: 'form', sort: 'title'};\n this.onSearch = debounce(this.onSearch, 300);\n }\n\n loadGrid() {\n this.search = localStorage.getItem('searchInput');\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 = {tags: this.config.tag, type: 'form', sort: 'title'};\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 onSearch(event?: KeyboardEvent) {\n const searchInput = this.search;\n if (searchInput.length > 0) {\n this.gridQuery.skip = 0;\n this.gridQuery.title__regex = '/' + searchInput + '/i';\n this.gridQuery.title__regex = '/' + searchInput.trim() + '/i';\n } else {\n delete this.gridQuery.title__regex;\n }\n localStorage.setItem('query', JSON.stringify(this.gridQuery));\n localStorage.setItem('searchInput', this.search);\n this.formGrid.pageChanged({page: 1, itemPerPage: this.gridQuery.limit});\n this.formGrid.refreshGrid(this.gridQuery);\n }\n\n clearSearch() {\n this.gridQuery = {tags: this.config.tag, type: 'form', sort: 'title'};\n localStorage.removeItem('query');\n localStorage.removeItem('searchInput');\n localStorage.removeItem('currentPage');\n this.search = '';\n this.formGrid.pageChanged({page: 1});\n this.formGrid.query = {};\n this.formGrid.refreshGrid({tags: this.config.tag, type: 'form', sort: 'title'});\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","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\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.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","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","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 'formiojs';\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 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 this.submission.data = submission.data;\n this.submission.state = 'complete';\n this.service.formio.saveSubmission(this.submission).then(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","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","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","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","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","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","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","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 * Public API Surface of @formio/angular\n */\n\nexport * from './index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAkBa,iBAAiB;IAD9B;QAES,QAAG,GAAG,EAAE,CAAC;QACT,kBAAa,GAAG,KAAK,CAAC;QACtB,cAAS,GAAG,KAAK,CAAC;KAI1B;;;YARA,UAAU;;;MCPE,kBAAkB;IAY7B,YACS,SAA0B,EAC1B,MAAyB,EACzB,IAAuB;QAFvB,cAAS,GAAT,SAAS,CAAiB;QAC1B,WAAM,GAAN,MAAM,CAAmB;QACzB,SAAI,GAAJ,IAAI,CAAmB;QAPzB,SAAI,GAAG,IAAI,CAAC;QACZ,YAAO,GAAG,EAAE,CAAC;QACb,UAAK,GAAG,EAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC;QAO1C,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;YAC3C,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACzC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;SAC7C;aAAM;YACL,OAAO,CAAC,KAAK,CAAC,wDAAwD,CAAC,CAAC;SACzE;QAED,IAAI,CAAC,YAAY,GAAG;YAClB,YAAY,EAAE,UAAU;YACxB,YAAY,EAAE,YAAY;SAC3B,CAAC;QACF,IAAI,CAAC,YAAY,GAAG;YAClB,YAAY,EAAE,UAAU;YACxB,YAAY,EAAE,YAAY;SAC3B,CAAC;QACF,IAAI,CAAC,aAAa,GAAG,CAAC,MAAM,KAAK,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;KACd;IAED,eAAe,CAAC,MAAc;QAC5B,OAAO,IAAI,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;YA9BF,QAAQ,SAAC;gBACR,OAAO,EAAE;oBACP,YAAY;oBACZ,YAAY;oBACZ,YAAY;oBACZ,WAAW;oBACX,UAAU;oBACV,WAAW,CAAC,OAAO,EAAE;oBACrB,gBAAgB,CAAC,OAAO,EAAE;iBAC3B;gBACD,YAAY,EAAE;oBACZ,yBAAyB;oBACzB,0BAA0B;oBAC1B,wBAAwB;oBACxB,wBAAwB;oBACxB,wBAAwB;oBACxB,0BAA0B;oBAC1B,mBAAmB;oBACnB,uBAAuB;oBACvB,yBAAyB;oBACzB,uBAAuB;oBACvB,wBAAwB;iBACzB;aACF;;;AC7CD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"formio-angular-manager.js","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/edit/edit.component.ts","../../../projects/angular-formio/manager/src/create/create.component.ts","../../../projects/angular-formio/manager/src/form/form.component.ts","../../../projects/angular-formio/manager/src/view/view.component.ts","../../../projects/angular-formio/manager/src/delete/delete.component.ts","../../../projects/angular-formio/manager/src/submission/edit/edit.component.ts","../../../projects/angular-formio/manager/src/submission/delete/delete.component.ts","../../../projects/angular-formio/manager/src/submission/view/view.component.ts","../../../projects/angular-formio/manager/src/submission/index/index.component.ts","../../../projects/angular-formio/manager/src/submission/submission/submission.component.ts","../../../projects/angular-formio/manager/src/form-manager.routes.ts","../../../projects/angular-formio/manager/src/form-manager.module.ts","../../../projects/angular-formio/manager/src/public_api.ts","../../../projects/angular-formio/manager/src/formio-angular-manager.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\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 builder?: any;\n public viewer?: string;\n public renderer: any;\n}\n","import { Injectable } from '@angular/core';\nimport { FormioAppConfig } from '@formio/angular';\nimport { FormManagerConfig } from './form-manager.config';\nimport { Formio } from 'formiojs';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormioAuthService } from '@formio/angular/auth';\nimport _each from 'lodash/each';\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._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._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 createForm(form: any) {\n return this.formio.createform(form);\n }\n}\n","import { Component, OnInit, ViewChild } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormManagerService } from '../form-manager.service';\nimport { 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 {\n @ViewChild(FormioGridComponent, {static: false}) formGrid: FormioGridComponent;\n public gridQuery: any;\n public search = '';\n constructor(\n public service: FormManagerService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormManagerConfig\n ) {\n this.gridQuery = {tags: this.config.tag, type: 'form', sort: 'title'};\n this.onSearch = debounce(this.onSearch, 300);\n }\n\n loadGrid() {\n this.search = localStorage.getItem('searchInput');\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 = {tags: this.config.tag, type: 'form', sort: 'title'};\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 onSearch(event?: KeyboardEvent) {\n const searchInput = this.search;\n if (searchInput.length > 0) {\n this.gridQuery.skip = 0;\n this.gridQuery.title__regex = '/' + searchInput + '/i';\n this.gridQuery.title__regex = '/' + searchInput.trim() + '/i';\n } else {\n delete this.gridQuery.title__regex;\n }\n localStorage.setItem('query', JSON.stringify(this.gridQuery));\n localStorage.setItem('searchInput', this.search);\n this.formGrid.pageChanged({page: 1, itemPerPage: this.gridQuery.limit});\n this.formGrid.refreshGrid(this.gridQuery);\n }\n\n clearSearch() {\n this.gridQuery = {tags: this.config.tag, type: 'form', sort: 'title'};\n localStorage.removeItem('query');\n localStorage.removeItem('searchInput');\n localStorage.removeItem('currentPage');\n this.search = '';\n this.formGrid.pageChanged({page: 1});\n this.formGrid.query = {};\n this.formGrid.refreshGrid({tags: this.config.tag, type: 'form', sort: 'title'});\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","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\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.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","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","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 'formiojs';\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 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 this.submission.data = submission.data;\n this.submission.state = 'complete';\n this.service.formio.saveSubmission(this.submission).then(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","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","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","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","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","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","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","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 * Public API Surface of @formio/angular\n */\n\nexport * from './index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAkBa,iBAAiB,CAAA;AAD9B,IAAA,WAAA,GAAA;QAES,IAAG,CAAA,GAAA,GAAG,EAAE,CAAC;QACT,IAAa,CAAA,aAAA,GAAG,KAAK,CAAC;QACtB,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;KAI1B;;;YARA,UAAU,EAAA;;;MCPE,kBAAkB,CAAA;AAY7B,IAAA,WAAA,CACS,SAA0B,EAC1B,MAAyB,EACzB,IAAuB,EAAA;QAFvB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAiB;QAC1B,IAAM,CAAA,MAAA,GAAN,MAAM,CAAmB;QACzB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAmB;QAPzB,IAAI,CAAA,IAAA,GAAG,IAAI,CAAC;QACZ,IAAO,CAAA,OAAA,GAAG,EAAE,CAAC;QACb,IAAK,CAAA,KAAA,GAAG,EAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAC,CAAC;QAO1C,IAAI,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE;YAC3C,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;YACzC,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,MAA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;oBACxB,0BAA0B;oBAC1B,mBAAmB;oBACnB,uBAAuB;oBACvB,yBAAyB;oBACzB,uBAAuB;oBACvB,wBAAwB;AACzB,iBAAA;AACF,aAAA,EAAA,EAAA;;;AC7CD;;AAEG;;ACFH;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"formio-angular-resource.js","sources":["../../../projects/angular-formio/resource/src/resource.config.ts","../../../projects/angular-formio/resource/src/resources.service.ts","../../../projects/angular-formio/resource/src/resource.service.ts","../../../projects/angular-formio/resource/src/resource.component.ts","../../../projects/angular-formio/resource/src/view/view.component.ts","../../../projects/angular-formio/resource/src/edit/edit.component.ts","../../../projects/angular-formio/resource/src/delete/delete.component.ts","../../../projects/angular-formio/resource/src/create/create.component.ts","../../../projects/angular-formio/resource/src/index/index.component.ts","../../../projects/angular-formio/resource/src/resource.routes.ts","../../../projects/angular-formio/resource/src/resource.module.ts","../../../projects/angular-formio/resource/src/public_api.ts","../../../projects/angular-formio/resource/src/formio-angular-resource.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nexport interface FormioResourceRouteConfig {\n index?: any;\n create?: any;\n resource?: any;\n view?: any;\n edit?: any;\n delete?: any;\n}\n\n@Injectable()\nexport class FormioResourceConfig {\n name = '';\n form = '';\n parents: any[] = [];\n}\n","import { Injectable, EventEmitter } from '@angular/core';\nimport { FormioAuthService } from '@formio/angular/auth';\n\nexport interface FormioResourceMap {\n [name: string]: any;\n}\n\n@Injectable()\nexport class FormioResources {\n resources: FormioResourceMap = {};\n error: EventEmitter<any>;\n onError: EventEmitter<any>;\n constructor(\n public auth?: FormioAuthService\n ) {\n this.error = new EventEmitter();\n this.onError = this.error;\n this.resources = {\n currentUser: {\n resourceLoaded: this.auth.userReady\n }\n };\n }\n}\n","import { ApplicationRef, EventEmitter, Injectable, Optional } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormioResourceConfig } from './resource.config';\nimport { FormioResources } from './resources.service';\nimport { FormioPromiseService } from '@formio/angular';\nimport { FormioAlerts } from '@formio/angular';\nimport { FormioAppConfig } from '@formio/angular';\nimport { FormioRefreshValue } from '@formio/angular';\nimport Promise from 'native-promise-only';\nimport { Formio, Utils } from 'formiojs';\nimport _ from 'lodash';\n\n@Injectable()\nexport class FormioResourceService {\n public initialized = false;\n public form: any;\n public alerts: FormioAlerts;\n public resource: any;\n public resourceUrl?: string;\n public formUrl: string;\n public formFormio: FormioPromiseService;\n public formio: FormioPromiseService;\n public refresh: EventEmitter<FormioRefreshValue>;\n\n public resourceLoading?: Promise<any>;\n public resourceLoaded?: Promise<any>;\n public resourceId?: string;\n public resources: any;\n\n public formLoading?: Promise<any>;\n public formLoaded: Promise<any>;\n public formResolve: any;\n public formReject: any;\n public isLoading: boolean;\n\n constructor(\n public appConfig: FormioAppConfig,\n public config: FormioResourceConfig,\n @Optional() public resourcesService: FormioResources,\n public appRef: ApplicationRef,\n ) {\n this.isLoading = true;\n this.alerts = new FormioAlerts();\n this.refresh = new EventEmitter();\n this.formLoaded = new Promise((resolve: any, reject: any) => {\n this.formResolve = resolve;\n this.formReject = reject;\n });\n this.init();\n }\n\n initialize() {\n console.warn('FormioResourceService.initialize() has been deprecated.');\n }\n\n init() {\n if (this.initialized) {\n return;\n }\n this.initialized = true;\n if (this.appConfig && this.appConfig.appUrl) {\n Formio.setBaseUrl(this.appConfig.apiUrl);\n Formio.setProjectUrl(this.appConfig.appUrl);\n Formio.formOnly = this.appConfig.formOnly;\n } else {\n console.error('You must provide an AppConfig within your application!');\n }\n\n // Create the form url and load the resources.\n this.formUrl = this.appConfig.appUrl + '/' + this.config.form;\n this.resource = { data: {} };\n\n // Add this resource service to the list of all resources in context.\n if (this.resourcesService) {\n this.resources = this.resourcesService.resources;\n this.resources[this.config.name] = this;\n }\n\n return this.loadForm();\n }\n\n onError(error: any) {\n this.alerts.setAlert({\n type: 'danger',\n message: error.message || error\n });\n if (this.resourcesService) {\n this.resourcesService.error.emit(error);\n }\n throw error;\n }\n\n onFormError(err: any) {\n this.formReject(err);\n this.onError(err);\n }\n\n setContext(route: ActivatedRoute) {\n this.resourceId = route.snapshot.params['id'];\n this.resource = { data: {} };\n this.resourceUrl = this.appConfig.appUrl + '/' + this.config.form;\n if (this.resourceId) {\n this.resourceUrl += '/submission/' + this.resourceId;\n }\n this.formio = new FormioPromiseService(this.resourceUrl);\n if (this.resourcesService) {\n this.resources[this.config.name] = this;\n }\n this.loadParents();\n }\n\n loadForm() {\n this.formFormio = new FormioPromiseService(this.formUrl);\n this.isLoading = true;\n this.formLoading = this.formFormio\n .loadForm()\n .then(\n (form: any) => {\n this.form = form;\n this.formResolve(form);\n this.isLoading = false;\n this.loadParents();\n return form;\n },\n (err: any) => this.onFormError(err)\n )\n .catch((err: any) => this.onFormError(err));\n return this.formLoading;\n }\n\n loadParents() {\n if (!this.config.parents || !this.config.parents.length) {\n return Promise.resolve([]);\n }\n if (!this.resourcesService) {\n console.warn(\n 'You must provide the FormioResources within your application to use nested resources.'\n );\n return Promise.resolve([]);\n }\n return this.formLoading.then((form) => {\n // Iterate through the list of parents.\n const _parentsLoaded: Array<Promise<any>> = [];\n this.config.parents.forEach((parent: any) => {\n const resourceName = parent.resource || parent;\n const resourceField = parent.field || parent;\n const filterResource = parent.hasOwnProperty('filter') ? parent.filter : true;\n if (this.resources.hasOwnProperty(resourceName) && this.resources[resourceName].resourceLoaded) {\n _parentsLoaded.push(\n this.resources[resourceName].resourceLoaded.then((resource: any) => {\n let parentPath = '';\n Utils.eachComponent(form.components, (component, path) => {\n if (component.key === resourceField) {\n component.hidden = true;\n component.clearOnHide = false;\n _.set(this.resource.data, path, resource);\n parentPath = path;\n return true;\n }\n });\n return {\n name: parentPath,\n filter: filterResource,\n resource\n };\n })\n );\n }\n });\n\n // When all the parents have loaded, emit that to the onParents emitter.\n return Promise.all(_parentsLoaded).then((parents: any) => {\n this.refresh.emit({\n form: form,\n submission: this.resource\n });\n return parents;\n });\n });\n }\n\n onSubmissionError(err: any) {\n this.onError(err);\n }\n\n loadResource(route: ActivatedRoute) {\n this.setContext(route);\n this.isLoading = true;\n this.resourceLoading = this.resourceLoaded = this.formio\n .loadSubmission(null, {ignoreCache: true})\n .then(\n (resource: any) => {\n this.resource = resource;\n this.isLoading = false;\n this.refresh.emit({\n property: 'submission',\n value: this.resource\n });\n return resource;\n },\n (err: any) => this.onSubmissionError(err)\n )\n .catch((err: any) => this.onSubmissionError(err));\n return this.resourceLoading;\n }\n\n save(resource: any) {\n const formio = resource._id ? this.formio : this.formFormio;\n return formio\n .saveSubmission(resource)\n .then(\n (saved: any) => {\n this.resource = saved;\n return saved;\n },\n (err: any) => this.onError(err)\n )\n .catch((err: any) => this.onError(err));\n }\n\n remove() {\n return this.formio\n .deleteSubmission()\n .then(\n () => {\n this.resource = null;\n },\n (err: any) => this.onError(err)\n )\n .catch((err: any) => this.onError(err));\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\nimport { FormioAuthService } from '@formio/angular/auth';\nimport { FormioResourceService } from './resource.service';\nimport { Subscription } from 'rxjs';\n\n@Component({\n templateUrl: './resource.component.html'\n})\nexport class FormioResourceComponent implements OnInit, OnDestroy {\n private paramsSubscription: Subscription;\n public perms = {delete: false, edit: false};\n\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public auth: FormioAuthService,\n ) {\n // subscribe to the route param changes, so that we could re-load the submission if navigation happens from one submission to another\n this.paramsSubscription = this.route.params.subscribe((params) => {\n this.init();\n });\n }\n\n ngOnInit() {\n this.init();\n }\n\n init() {\n this.service.loadResource(this.route);\n this.service.formLoaded.then((form) => {\n this.auth.ready.then(() => {\n this.service.resourceLoaded.then((resource) => {\n this.service.formFormio.userPermissions(this.auth.user, form, resource).then((perms) => {\n this.perms.delete = perms.delete;\n this.perms.edit = perms.edit;\n });\n });\n });\n });\n }\n\n ngOnDestroy() {\n if (this.paramsSubscription) {\n this.paramsSubscription.unsubscribe();\n }\n }\n}\n","import {Component, OnDestroy} from '@angular/core';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport {Formio} from 'formiojs';\n\n@Component({\n templateUrl: './view.component.html'\n})\nexport class FormioResourceViewComponent implements OnDestroy{\n constructor(\n public service: FormioResourceService,\n public config: FormioResourceConfig\n ) {}\n public submission = {data: {}};\n\n ngOnDestroy() {\n Formio.clearCache();\n }\n}\n","import {Component, EventEmitter, OnDestroy} from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport { Formio } from 'formiojs';\n\n@Component({\n templateUrl: './edit.component.html'\n})\nexport class FormioResourceEditComponent implements OnDestroy {\n public triggerError: EventEmitter<any> = new EventEmitter();\n public submission = {data: {}};\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig\n ) {}\n\n onSubmit(submission: any) {\n const edit = this.service.resource;\n edit.data = submission.data;\n this.service.save(edit)\n .then(() => {\n this.router.navigate(['../', 'view'], { relativeTo: this.route });\n })\n .catch((err) => this.triggerError.emit(err));\n }\n\n ngOnDestroy() {\n Formio.clearCache();\n }\n}\n","import { Component } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\n\n@Component({\n templateUrl: './delete.component.html'\n})\nexport class FormioResourceDeleteComponent {\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router\n ) {}\n\n onDelete() {\n this.service.remove().then(() => {\n this.router.navigate(['../../'], { relativeTo: this.route });\n });\n }\n\n onCancel() {\n this.router.navigate(['../', 'view'], { relativeTo: this.route });\n }\n}\n","import { Component, EventEmitter, OnInit } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\n\n@Component({\n styleUrls: ['./create.component.scss'],\n templateUrl: './create.component.html'\n})\nexport class FormioResourceCreateComponent implements OnInit {\n public onError: EventEmitter<any>;\n public onSuccess: EventEmitter<any>;\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig\n ) {\n this.onError = new EventEmitter();\n this.onSuccess = new EventEmitter();\n }\n\n ngOnInit() {\n this.service.setContext(this.route);\n }\n\n onSubmit(submission: any) {\n this.service\n .save(submission)\n .then(() => {\n this.router.navigate(['../', this.service.resource._id, 'view'], {\n relativeTo: this.route\n });\n })\n .catch((err: any) => this.onError.emit(err));\n }\n}\n","import { Component, OnInit, ChangeDetectorRef, NgZone } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport { each } from 'lodash';\n\n@Component({\n templateUrl: './index.component.html'\n})\nexport class FormioResourceIndexComponent implements OnInit {\n public gridSrc?: string;\n public gridQuery: any;\n public createText: String;\n\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig,\n public cdr: ChangeDetectorRef,\n public ngZone: NgZone,\n ) {\n }\n\n ngOnInit() {\n this.gridQuery = {};\n this.service.setContext(this.route);\n this.service.formLoaded.then(() => {\n if (\n this.service &&\n this.config.parents &&\n this.config.parents.length\n ) {\n this.service.loadParents().then((parents: any) => {\n each(parents, (parent: any) => {\n if (parent && parent.filter) {\n this.gridQuery['data.' + parent.name + '._id'] =\n parent.resource._id;\n }\n });\n\n // Set the source to load the grid.\n this.gridSrc = this.service.formUrl;\n this.createText = `New ${this.service.form.title}`;\n });\n } else if (this.service.formUrl) {\n this.gridSrc = this.service.formUrl;\n this.createText = `New ${this.service.form.title}`;\n }\n\n this.cdr.detectChanges();\n });\n }\n\n onSelect(row: any) {\n this.ngZone.run(() => {\n this.router.navigate([row._id, 'view'], { relativeTo: this.route });\n });\n }\n\n onCreateItem() {\n this.ngZone.run(() => {\n this.router.navigate(['new'], { relativeTo: this.route });\n });\n }\n}\n","import { Routes } from '@angular/router';\nimport { FormioResourceComponent } from './resource.component';\nimport { FormioResourceViewComponent } from './view/view.component';\nimport { FormioResourceEditComponent } from './edit/edit.component';\nimport { FormioResourceDeleteComponent } from './delete/delete.component';\nimport { FormioResourceCreateComponent } from './create/create.component';\nimport { FormioResourceIndexComponent } from './index/index.component';\nimport { FormioResourceRouteConfig } from './resource.config';\nexport function FormioResourceRoutes(config?: FormioResourceRouteConfig): Routes {\n return [\n {\n path: '',\n component: config && config.index ? config.index : FormioResourceIndexComponent\n },\n {\n path: 'new',\n component: config && config.create ? config.create : FormioResourceCreateComponent\n },\n {\n path: ':id',\n component: config && config.resource ? config.resource : FormioResourceComponent,\n children: [\n {\n path: '',\n redirectTo: 'view',\n pathMatch: 'full'\n },\n {\n path: 'view',\n component: config && config.view ? config.view : FormioResourceViewComponent\n },\n {\n path: 'edit',\n component: config && config.edit ? config.edit : FormioResourceEditComponent\n },\n {\n path: 'delete',\n component: config && config.delete ? config.delete : FormioResourceDeleteComponent\n }\n ]\n }\n ];\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { CommonModule } from '@angular/common';\nimport { FormioModule } from '@formio/angular';\nimport { FormioAlerts } from '@formio/angular';\nimport { FormioGrid } from '@formio/angular/grid';\nimport { FormioResourceComponent } from './resource.component';\nimport { FormioResourceViewComponent } from './view/view.component';\nimport { FormioResourceEditComponent } from './edit/edit.component';\nimport { FormioResourceDeleteComponent } from './delete/delete.component';\nimport { FormioResourceCreateComponent } from './create/create.component';\nimport { FormioResourceIndexComponent } from './index/index.component';\nimport { FormioResourceRouteConfig } from './resource.config';\nimport { FormioResourceRoutes } from './resource.routes';\nimport { extendRouter } from '@formio/angular';\n\n@NgModule({\n imports: [\n CommonModule,\n FormioModule,\n FormioGrid,\n RouterModule\n ],\n declarations: [\n FormioResourceComponent,\n FormioResourceCreateComponent,\n FormioResourceIndexComponent,\n FormioResourceViewComponent,\n FormioResourceEditComponent,\n FormioResourceDeleteComponent\n ],\n providers: [\n FormioAlerts\n ]\n})\nexport class FormioResource {\n static forChild(config?: FormioResourceRouteConfig): any {\n return extendRouter(FormioResource, config, FormioResourceRoutes);\n }\n static forRoot(config?: FormioResourceRouteConfig): any {\n return extendRouter(FormioResource, config, FormioResourceRoutes);\n }\n}\n","/*\n * Public API Surface of angular-formio\n */\n\nexport * from './index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["Promise"],"mappings":";;;;;;;;;;MAYa,oBAAoB;IADjC;QAEE,SAAI,GAAG,EAAE,CAAC;QACV,SAAI,GAAG,EAAE,CAAC;QACV,YAAO,GAAU,EAAE,CAAC;KACrB;;;YALA,UAAU;;;MCHE,eAAe;IAI1B,YACS,IAAwB;QAAxB,SAAI,GAAJ,IAAI,CAAoB;QAJjC,cAAS,GAAsB,EAAE,CAAC;QAMhC,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;QAChC,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG;YACf,WAAW,EAAE;gBACX,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS;aACpC;SACF,CAAC;KACH;;;YAfF,UAAU;;;YANF,iBAAiB;;;MCYb,qBAAqB;IAsBhC,YACS,SAA0B,EAC1B,MAA4B,EAChB,gBAAiC,EAC7C,MAAsB;QAHtB,cAAS,GAAT,SAAS,CAAiB;QAC1B,WAAM,GAAN,MAAM,CAAsB;QAChB,qBAAgB,GAAhB,gBAAgB,CAAiB;QAC7C,WAAM,GAAN,MAAM,CAAgB;QAzBxB,gBAAW,GAAG,KAAK,CAAC;QA2BzB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;QACjC,IAAI,CAAC,OAAO,GAAG,IAAI,YAAY,EAAE,CAAC;QAClC,IAAI,CAAC,UA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,2BAA2B;oBAC3B,6BAA6B;iBAC9B;gBACD,SAAS,EAAE;oBACT,YAAY;iBACb;aACF;;;AClCD;;;;ACAA;;;;;;"}
1
+ {"version":3,"file":"formio-angular-resource.js","sources":["../../../projects/angular-formio/resource/src/resource.config.ts","../../../projects/angular-formio/resource/src/resources.service.ts","../../../projects/angular-formio/resource/src/resource.service.ts","../../../projects/angular-formio/resource/src/resource.component.ts","../../../projects/angular-formio/resource/src/view/view.component.ts","../../../projects/angular-formio/resource/src/edit/edit.component.ts","../../../projects/angular-formio/resource/src/delete/delete.component.ts","../../../projects/angular-formio/resource/src/create/create.component.ts","../../../projects/angular-formio/resource/src/index/index.component.ts","../../../projects/angular-formio/resource/src/resource.routes.ts","../../../projects/angular-formio/resource/src/resource.module.ts","../../../projects/angular-formio/resource/src/public_api.ts","../../../projects/angular-formio/resource/src/formio-angular-resource.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\nexport interface FormioResourceRouteConfig {\n index?: any;\n create?: any;\n resource?: any;\n view?: any;\n edit?: any;\n delete?: any;\n}\n\n@Injectable()\nexport class FormioResourceConfig {\n name = '';\n form = '';\n parents: any[] = [];\n}\n","import { Injectable, EventEmitter } from '@angular/core';\nimport { FormioAuthService } from '@formio/angular/auth';\n\nexport interface FormioResourceMap {\n [name: string]: any;\n}\n\n@Injectable()\nexport class FormioResources {\n resources: FormioResourceMap = {};\n error: EventEmitter<any>;\n onError: EventEmitter<any>;\n constructor(\n public auth?: FormioAuthService\n ) {\n this.error = new EventEmitter();\n this.onError = this.error;\n this.resources = {\n currentUser: {\n resourceLoaded: this.auth.userReady\n }\n };\n }\n}\n","import { ApplicationRef, EventEmitter, Injectable, Optional } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { FormioResourceConfig } from './resource.config';\nimport { FormioResources } from './resources.service';\nimport { FormioPromiseService } from '@formio/angular';\nimport { FormioAlerts } from '@formio/angular';\nimport { FormioAppConfig } from '@formio/angular';\nimport { FormioRefreshValue } from '@formio/angular';\nimport Promise from 'native-promise-only';\nimport { Formio, Utils } from 'formiojs';\nimport _ from 'lodash';\n\n@Injectable()\nexport class FormioResourceService {\n public initialized = false;\n public form: any;\n public alerts: FormioAlerts;\n public resource: any;\n public resourceUrl?: string;\n public formUrl: string;\n public formFormio: FormioPromiseService;\n public formio: FormioPromiseService;\n public refresh: EventEmitter<FormioRefreshValue>;\n\n public resourceLoading?: Promise<any>;\n public resourceLoaded?: Promise<any>;\n public resourceId?: string;\n public resources: any;\n\n public formLoading?: Promise<any>;\n public formLoaded: Promise<any>;\n public formResolve: any;\n public formReject: any;\n public isLoading: boolean;\n\n constructor(\n public appConfig: FormioAppConfig,\n public config: FormioResourceConfig,\n @Optional() public resourcesService: FormioResources,\n public appRef: ApplicationRef,\n ) {\n this.isLoading = true;\n this.alerts = new FormioAlerts();\n this.refresh = new EventEmitter();\n this.formLoaded = new Promise((resolve: any, reject: any) => {\n this.formResolve = resolve;\n this.formReject = reject;\n });\n this.init();\n }\n\n initialize() {\n console.warn('FormioResourceService.initialize() has been deprecated.');\n }\n\n init() {\n if (this.initialized) {\n return;\n }\n this.initialized = true;\n if (this.appConfig && this.appConfig.appUrl) {\n Formio.setBaseUrl(this.appConfig.apiUrl);\n Formio.setProjectUrl(this.appConfig.appUrl);\n Formio.formOnly = this.appConfig.formOnly;\n } else {\n console.error('You must provide an AppConfig within your application!');\n }\n\n // Create the form url and load the resources.\n this.formUrl = this.appConfig.appUrl + '/' + this.config.form;\n this.resource = { data: {} };\n\n // Add this resource service to the list of all resources in context.\n if (this.resourcesService) {\n this.resources = this.resourcesService.resources;\n this.resources[this.config.name] = this;\n }\n\n return this.loadForm();\n }\n\n onError(error: any) {\n this.alerts.setAlert({\n type: 'danger',\n message: error.message || error\n });\n if (this.resourcesService) {\n this.resourcesService.error.emit(error);\n }\n throw error;\n }\n\n onFormError(err: any) {\n this.formReject(err);\n this.onError(err);\n }\n\n setContext(route: ActivatedRoute) {\n this.resourceId = route.snapshot.params['id'];\n this.resource = { data: {} };\n this.resourceUrl = this.appConfig.appUrl + '/' + this.config.form;\n if (this.resourceId) {\n this.resourceUrl += '/submission/' + this.resourceId;\n }\n this.formio = new FormioPromiseService(this.resourceUrl);\n if (this.resourcesService) {\n this.resources[this.config.name] = this;\n }\n this.loadParents();\n }\n\n loadForm() {\n this.formFormio = new FormioPromiseService(this.formUrl);\n this.isLoading = true;\n this.formLoading = this.formFormio\n .loadForm()\n .then(\n (form: any) => {\n this.form = form;\n this.formResolve(form);\n this.isLoading = false;\n this.loadParents();\n return form;\n },\n (err: any) => this.onFormError(err)\n )\n .catch((err: any) => this.onFormError(err));\n return this.formLoading;\n }\n\n loadParents() {\n if (!this.config.parents || !this.config.parents.length) {\n return Promise.resolve([]);\n }\n if (!this.resourcesService) {\n console.warn(\n 'You must provide the FormioResources within your application to use nested resources.'\n );\n return Promise.resolve([]);\n }\n return this.formLoading.then((form) => {\n // Iterate through the list of parents.\n const _parentsLoaded: Array<Promise<any>> = [];\n this.config.parents.forEach((parent: any) => {\n const resourceName = parent.resource || parent;\n const resourceField = parent.field || parent;\n const filterResource = parent.hasOwnProperty('filter') ? parent.filter : true;\n if (this.resources.hasOwnProperty(resourceName) && this.resources[resourceName].resourceLoaded) {\n _parentsLoaded.push(\n this.resources[resourceName].resourceLoaded.then((resource: any) => {\n let parentPath = '';\n Utils.eachComponent(form.components, (component, path) => {\n if (component.key === resourceField) {\n component.hidden = true;\n component.clearOnHide = false;\n _.set(this.resource.data, path, resource);\n parentPath = path;\n return true;\n }\n });\n return {\n name: parentPath,\n filter: filterResource,\n resource\n };\n })\n );\n }\n });\n\n // When all the parents have loaded, emit that to the onParents emitter.\n return Promise.all(_parentsLoaded).then((parents: any) => {\n this.refresh.emit({\n form: form,\n submission: this.resource\n });\n return parents;\n });\n });\n }\n\n onSubmissionError(err: any) {\n this.onError(err);\n }\n\n loadResource(route: ActivatedRoute) {\n this.setContext(route);\n this.isLoading = true;\n this.resourceLoading = this.resourceLoaded = this.formio\n .loadSubmission(null, {ignoreCache: true})\n .then(\n (resource: any) => {\n this.resource = resource;\n this.isLoading = false;\n this.refresh.emit({\n property: 'submission',\n value: this.resource\n });\n return resource;\n },\n (err: any) => this.onSubmissionError(err)\n )\n .catch((err: any) => this.onSubmissionError(err));\n return this.resourceLoading;\n }\n\n save(resource: any) {\n const formio = resource._id ? this.formio : this.formFormio;\n return formio\n .saveSubmission(resource)\n .then(\n (saved: any) => {\n this.resource = saved;\n return saved;\n },\n (err: any) => this.onError(err)\n )\n .catch((err: any) => this.onError(err));\n }\n\n remove() {\n return this.formio\n .deleteSubmission()\n .then(\n () => {\n this.resource = null;\n },\n (err: any) => this.onError(err)\n )\n .catch((err: any) => this.onError(err));\n }\n}\n","import { Component, OnDestroy, OnInit } from '@angular/core';\nimport { ActivatedRoute, NavigationEnd, Router } from '@angular/router';\nimport { FormioAuthService } from '@formio/angular/auth';\nimport { FormioResourceService } from './resource.service';\nimport { Subscription } from 'rxjs';\n\n@Component({\n templateUrl: './resource.component.html'\n})\nexport class FormioResourceComponent implements OnInit, OnDestroy {\n private paramsSubscription: Subscription;\n public perms = {delete: false, edit: false};\n\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public auth: FormioAuthService,\n ) {\n // subscribe to the route param changes, so that we could re-load the submission if navigation happens from one submission to another\n this.paramsSubscription = this.route.params.subscribe((params) => {\n this.init();\n });\n }\n\n ngOnInit() {\n this.init();\n }\n\n init() {\n this.service.loadResource(this.route);\n this.service.formLoaded.then((form) => {\n this.auth.ready.then(() => {\n this.service.resourceLoaded.then((resource) => {\n this.service.formFormio.userPermissions(this.auth.user, form, resource).then((perms) => {\n this.perms.delete = perms.delete;\n this.perms.edit = perms.edit;\n });\n });\n });\n });\n }\n\n ngOnDestroy() {\n if (this.paramsSubscription) {\n this.paramsSubscription.unsubscribe();\n }\n }\n}\n","import {Component, OnDestroy} from '@angular/core';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport {Formio} from 'formiojs';\n\n@Component({\n templateUrl: './view.component.html'\n})\nexport class FormioResourceViewComponent implements OnDestroy{\n constructor(\n public service: FormioResourceService,\n public config: FormioResourceConfig\n ) {}\n public submission = {data: {}};\n\n ngOnDestroy() {\n Formio.clearCache();\n }\n}\n","import {Component, EventEmitter, OnDestroy} from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport { Formio } from 'formiojs';\n\n@Component({\n templateUrl: './edit.component.html'\n})\nexport class FormioResourceEditComponent implements OnDestroy {\n public triggerError: EventEmitter<any> = new EventEmitter();\n public submission = {data: {}};\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig\n ) {}\n\n onSubmit(submission: any) {\n const edit = this.service.resource;\n edit.data = submission.data;\n this.service.save(edit)\n .then(() => {\n this.router.navigate(['../', 'view'], { relativeTo: this.route });\n })\n .catch((err) => this.triggerError.emit(err));\n }\n\n ngOnDestroy() {\n Formio.clearCache();\n }\n}\n","import { Component } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\n\n@Component({\n templateUrl: './delete.component.html'\n})\nexport class FormioResourceDeleteComponent {\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router\n ) {}\n\n onDelete() {\n this.service.remove().then(() => {\n this.router.navigate(['../../'], { relativeTo: this.route });\n });\n }\n\n onCancel() {\n this.router.navigate(['../', 'view'], { relativeTo: this.route });\n }\n}\n","import { Component, EventEmitter, OnInit } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\n\n@Component({\n styleUrls: ['./create.component.scss'],\n templateUrl: './create.component.html'\n})\nexport class FormioResourceCreateComponent implements OnInit {\n public onError: EventEmitter<any>;\n public onSuccess: EventEmitter<any>;\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig\n ) {\n this.onError = new EventEmitter();\n this.onSuccess = new EventEmitter();\n }\n\n ngOnInit() {\n this.service.setContext(this.route);\n }\n\n onSubmit(submission: any) {\n this.service\n .save(submission)\n .then(() => {\n this.router.navigate(['../', this.service.resource._id, 'view'], {\n relativeTo: this.route\n });\n })\n .catch((err: any) => this.onError.emit(err));\n }\n}\n","import { Component, OnInit, ChangeDetectorRef, NgZone } from '@angular/core';\nimport { Router, ActivatedRoute } from '@angular/router';\nimport { FormioResourceService } from '../resource.service';\nimport { FormioResourceConfig } from '../resource.config';\nimport { each } from 'lodash';\n\n@Component({\n templateUrl: './index.component.html'\n})\nexport class FormioResourceIndexComponent implements OnInit {\n public gridSrc?: string;\n public gridQuery: any;\n public createText: String;\n\n constructor(\n public service: FormioResourceService,\n public route: ActivatedRoute,\n public router: Router,\n public config: FormioResourceConfig,\n public cdr: ChangeDetectorRef,\n public ngZone: NgZone,\n ) {\n }\n\n ngOnInit() {\n this.gridQuery = {};\n this.service.setContext(this.route);\n this.service.formLoaded.then(() => {\n if (\n this.service &&\n this.config.parents &&\n this.config.parents.length\n ) {\n this.service.loadParents().then((parents: any) => {\n each(parents, (parent: any) => {\n if (parent && parent.filter) {\n this.gridQuery['data.' + parent.name + '._id'] =\n parent.resource._id;\n }\n });\n\n // Set the source to load the grid.\n this.gridSrc = this.service.formUrl;\n this.createText = `New ${this.service.form.title}`;\n });\n } else if (this.service.formUrl) {\n this.gridSrc = this.service.formUrl;\n this.createText = `New ${this.service.form.title}`;\n }\n\n this.cdr.detectChanges();\n });\n }\n\n onSelect(row: any) {\n this.ngZone.run(() => {\n this.router.navigate([row._id, 'view'], { relativeTo: this.route });\n });\n }\n\n onCreateItem() {\n this.ngZone.run(() => {\n this.router.navigate(['new'], { relativeTo: this.route });\n });\n }\n}\n","import { Routes } from '@angular/router';\nimport { FormioResourceComponent } from './resource.component';\nimport { FormioResourceViewComponent } from './view/view.component';\nimport { FormioResourceEditComponent } from './edit/edit.component';\nimport { FormioResourceDeleteComponent } from './delete/delete.component';\nimport { FormioResourceCreateComponent } from './create/create.component';\nimport { FormioResourceIndexComponent } from './index/index.component';\nimport { FormioResourceRouteConfig } from './resource.config';\nexport function FormioResourceRoutes(config?: FormioResourceRouteConfig): Routes {\n return [\n {\n path: '',\n component: config && config.index ? config.index : FormioResourceIndexComponent\n },\n {\n path: 'new',\n component: config && config.create ? config.create : FormioResourceCreateComponent\n },\n {\n path: ':id',\n component: config && config.resource ? config.resource : FormioResourceComponent,\n children: [\n {\n path: '',\n redirectTo: 'view',\n pathMatch: 'full'\n },\n {\n path: 'view',\n component: config && config.view ? config.view : FormioResourceViewComponent\n },\n {\n path: 'edit',\n component: config && config.edit ? config.edit : FormioResourceEditComponent\n },\n {\n path: 'delete',\n component: config && config.delete ? config.delete : FormioResourceDeleteComponent\n }\n ]\n }\n ];\n}\n","import { NgModule } from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { CommonModule } from '@angular/common';\nimport { FormioModule } from '@formio/angular';\nimport { FormioAlerts } from '@formio/angular';\nimport { FormioGrid } from '@formio/angular/grid';\nimport { FormioResourceComponent } from './resource.component';\nimport { FormioResourceViewComponent } from './view/view.component';\nimport { FormioResourceEditComponent } from './edit/edit.component';\nimport { FormioResourceDeleteComponent } from './delete/delete.component';\nimport { FormioResourceCreateComponent } from './create/create.component';\nimport { FormioResourceIndexComponent } from './index/index.component';\nimport { FormioResourceRouteConfig } from './resource.config';\nimport { FormioResourceRoutes } from './resource.routes';\nimport { extendRouter } from '@formio/angular';\n\n@NgModule({\n imports: [\n CommonModule,\n FormioModule,\n FormioGrid,\n RouterModule\n ],\n declarations: [\n FormioResourceComponent,\n FormioResourceCreateComponent,\n FormioResourceIndexComponent,\n FormioResourceViewComponent,\n FormioResourceEditComponent,\n FormioResourceDeleteComponent\n ],\n providers: [\n FormioAlerts\n ]\n})\nexport class FormioResource {\n static forChild(config?: FormioResourceRouteConfig): any {\n return extendRouter(FormioResource, config, FormioResourceRoutes);\n }\n static forRoot(config?: FormioResourceRouteConfig): any {\n return extendRouter(FormioResource, config, FormioResourceRoutes);\n }\n}\n","/*\n * Public API Surface of angular-formio\n */\n\nexport * from './index';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["Promise"],"mappings":";;;;;;;;;;MAYa,oBAAoB,CAAA;AADjC,IAAA,WAAA,GAAA;QAEE,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QACV,IAAI,CAAA,IAAA,GAAG,EAAE,CAAC;QACV,IAAO,CAAA,OAAA,GAAU,EAAE,CAAC;KACrB;;;YALA,UAAU,EAAA;;;MCHE,eAAe,CAAA;AAI1B,IAAA,WAAA,CACS,IAAwB,EAAA;QAAxB,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAoB;QAJjC,IAAS,CAAA,SAAA,GAAsB,EAAE,CAAC;AAMhC,QAAA,IAAI,CAAC,KAAK,GAAG,IAAI,YAAY,EAAE,CAAC;AAChC,QAAA,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,SAAS,GAAG;AACf,YAAA,WAAW,EAAE;AACX,gBAAA,cAAc,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS;AACpC,aAAA;SACF,CAAC;KACH;;;YAfF,UAAU,EAAA;;;YANF,iBAAiB,EAAA;;;MCYb,qBAAqB,CAAA;AAsBhC,IAAA,WAAA,CACS,SAA0B,EAC1B,MAA4B,EAChB,gBAAiC,EAC7C,MAAsB,EAAA;QAHtB,IAAS,CAAA,SAAA,GAAT,SAAS,CAAiB;QAC1B,IAAM,CAAA,MAAA,GAAN,MAAM,CAAsB;QAChB,IAAgB,CAAA,gBAAA,GAAhB,gBAAgB,CAAiB;QAC7C,IAAM,CAAA,MAAA,GAAN,MAAM,CAAgB;QAzBxB,IAAW,CAAA,WAAA,GAAG,KAAK,CAAC;AA2BzB,QAAA,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