@valtimo/form-management 4.17.0 → 4.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -80,7 +80,7 @@
80
80
  FormManagementComponent.decorators = [
81
81
  { type: i0.Component, args: [{
82
82
  selector: 'valtimo-form-management',
83
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button\n [routerLink]=\"'create'\"\n [queryParams]=\"{upload: 'true'}\"\n class=\"btn btn-secondary btn-space\"\n >\n <i class=\"icon mdi mdi-upload\"></i>&nbsp;\n {{ 'Upload' | translate }}\n </button>\n <button [routerLink]=\"'create'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n <span>{{ 'Create new Form' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-form-management-list></valtimo-form-management-list>\n </valtimo-widget>\n </div>\n</div>\n",
83
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button\n [routerLink]=\"'create'\"\n [queryParams]=\"{upload: 'true'}\"\n class=\"btn btn-secondary btn-space\"\n >\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\n <button [routerLink]=\"'create'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus mr-1\"></i>\n <span>{{ 'Create new Form' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-form-management-list></valtimo-form-management-list>\n </valtimo-widget>\n </div>\n</div>\n",
84
84
  styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
85
85
  },] }
86
86
  ];
@@ -464,7 +464,7 @@
464
464
  FormManagementCreateComponent.decorators = [
465
465
  { type: i0.Component, args: [{
466
466
  selector: 'valtimo-form-management-create',
467
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"createFormDefinition()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">Name</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n class=\"form-control\"\n placeholder=\"Form definition name\"\n [ngClass]=\"{\n 'is-valid': formControls.name.touched && formControls.name.valid,\n 'is-invalid': formControls.name.touched && formControls.name.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.name.errors.required\">Name is required</div>\n </div>\n </div>\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/forms'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
467
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content\">\n <div class=\"container-fluid\">\n <div class=\"col-12 px-0 mb-5\">\n <valtimo-widget>\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"createFormDefinition()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"name\">{{\n 'formManagement.name' | translate\n }}</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"name\"\n formControlName=\"name\"\n class=\"form-control\"\n placeholder=\"Form definition name\"\n [ngClass]=\"{\n 'is-valid': formControls.name.touched && formControls.name.valid,\n 'is-invalid': formControls.name.touched && formControls.name.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.name.errors.required\">\n {{ 'formManagement.nameIsRequired' | translate }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/forms'\" class=\"btn btn-space btn-default\">{{\n 'formManagement.back' | translate\n }}</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n {{ 'formManagement.reset' | translate }}\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n {{ 'formManagement.submit' | translate }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
468
468
  styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */"]
469
469
  },] }
470
470
  ];
@@ -613,7 +613,7 @@
613
613
  FormManagementEditComponent.decorators = [
614
614
  { type: i0.Component, args: [{
615
615
  selector: 'valtimo-form-management-edit',
616
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\" *ngIf=\"formDefinition\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space\" (click)=\"downloadFormDefinition()\">\n <i class=\"fa fa-save\"></i>\n {{ 'Download' | translate }}\n </button>\n <button\n class=\"btn btn-secondary btn-space\"\n (click)=\"showModal()\"\n [disabled]=\"formDefinition.readOnly\"\n >\n <i class=\"icon mdi mdi-upload\"></i>&nbsp;\n {{ 'Upload' | translate }}\n </button>\n <button\n class=\"btn btn-danger btn-space\"\n (click)=\"delete()\"\n [disabled]=\"formDefinition.readOnly\"\n >\n <i class=\"fa fa-trash\"></i>&nbsp;Delete\n </button>\n <button\n class=\"btn btn-success btn-space\"\n (click)=\"modifyFormDefinition()\"\n [disabled]=\"formDefinition.readOnly\"\n >\n <i class=\"fa fa-upload\"></i>&nbsp;Deploy\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <div class=\"bg-light formbuilder-header overflow-auto\">\n <h3 class=\"formbuilder-title\">\n {{ formDefinition.name }}\n <div *ngIf=\"formDefinition.readOnly\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">Read-only</span>\n </div>\n </h3>\n </div>\n <ng-container *ngIf=\"!(reloading$ | async)\">\n <valtimo-form-io-builder\n [form]=\"formDefinition.formDefinition\"\n (change)=\"formBuilderChanged($event)\"\n ></valtimo-form-io-builder>\n </ng-container>\n </div>\n</div>\n\n<valtimo-form-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"setFormDefinition($event)\"\n></valtimo-form-management-upload>\n",
616
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\" *ngIf=\"formDefinition\">\n <div class=\"btn-group mt-m3px mb-3 float-right\">\n <button class=\"btn btn-primary btn-space\" (click)=\"downloadFormDefinition()\">\n <i class=\"icon mdi mdi-download mr-1\"></i>\n {{ 'Download' | translate }}\n </button>\n <button\n class=\"btn btn-secondary btn-space\"\n (click)=\"showModal()\"\n [disabled]=\"formDefinition.readOnly\"\n >\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\n <button\n class=\"btn btn-danger btn-space\"\n (click)=\"delete()\"\n [disabled]=\"formDefinition.readOnly\"\n >\n <i class=\"icon mdi mdi-delete mr-1\"></i>{{ 'formManagement.delete' | translate }}\n </button>\n <button\n class=\"btn btn-success btn-space\"\n (click)=\"modifyFormDefinition()\"\n [disabled]=\"formDefinition.readOnly\"\n >\n <i class=\"icon mdi mdi-upload mr-1\"></i>{{ 'formManagement.deploy' | translate }}\n </button>\n </div>\n <div class=\"clearfix\"></div>\n <div class=\"bg-light formbuilder-header overflow-auto\">\n <h3 class=\"formbuilder-title\">\n {{ formDefinition.name }}\n <div *ngIf=\"formDefinition.readOnly\" class=\"pull-right\">\n <span class=\"badge badge-pill badge-info increase-size\">{{\n 'formManagement.readOnly' | translate\n }}</span>\n </div>\n </h3>\n </div>\n <ng-container *ngIf=\"!(reloading$ | async)\">\n <valtimo-form-io-builder\n [form]=\"formDefinition.formDefinition\"\n (change)=\"formBuilderChanged($event)\"\n ></valtimo-form-io-builder>\n </ng-container>\n </div>\n</div>\n\n<valtimo-form-management-upload\n [show$]=\"showModal$\"\n (definitionUploaded)=\"setFormDefinition($event)\"\n></valtimo-form-management-upload>\n",
617
617
  encapsulation: i0.ViewEncapsulation.None,
618
618
  styles: ["/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.btn.formcomponent.gu-mirror,.formbuilder .btn.formcomponent.drag-copy{background-color:silver;border-color:silver;color:#fff;font-weight:400}.btn.formcomponent.gu-mirror:active,.btn.formcomponent.gu-mirror:hover,.formbuilder .btn.formcomponent.drag-copy:active,.formbuilder .btn.formcomponent.drag-copy:hover{box-shadow:none}.btn.formcomponent.gu-mirror:active,.formbuilder .btn.formcomponent.drag-copy:active{background-color:silver;border-color:silver}.formbuilder-header{border:1px solid #dee2e6;border-bottom:0;font-size:18px;height:80px;padding-left:18px;padding-right:18px}.formbuilder-header .formbuilder-title{margin-bottom:7px;margin-top:21px}.formbuilder-header .formbuilder-subtitle{margin-bottom:12px;margin-top:0}.formbuilder{background:#fff;border:1px solid #dee2e6;margin-left:0!important;margin-right:0!important;padding:1rem}.formbuilder .form-builder-panel .builder-group-button[aria-expanded=\"\"],.formbuilder .form-builder-panel .builder-group-button[aria-expanded=false]{color:#a9a9a9}.formbuilder .form-builder-panel .builder-group-button[aria-expanded=true]{color:#000}.formbuilder .drag-and-drop-alert{display:none}.formbuilder .formarea{background-color:#fff;border:1px solid silver;padding:10px}.increase-size{font-size:1rem}"]
619
619
  },] }
@@ -1 +1 @@
1
- {"version":3,"file":"valtimo-form-management.umd.js","sources":["../../../../projects/valtimo/form-management/src/lib/form-management.service.ts","../../../../projects/valtimo/form-management/src/lib/form-management.component.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../projects/valtimo/form-management/src/lib/form-management-create/form-management-create.component.ts","../../../../projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.ts","../../../../projects/valtimo/form-management/src/lib/form-management-routing.module.ts","../../../../projects/valtimo/form-management/src/lib/form-management-list/form-management-list.component.ts","../../../../projects/valtimo/form-management/src/lib/form-management-upload/form-management-upload.component.ts","../../../../projects/valtimo/form-management/src/lib/form-management.module.ts","../../../../projects/valtimo/form-management/src/lib/models/form-definition.model.ts","../../../../projects/valtimo/form-management/src/lib/models/index.ts","../../../../projects/valtimo/form-management/src/public-api.ts","../../../../projects/valtimo/form-management/src/valtimo-form-management.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {CreateFormDefinitionRequest, FormDefinition, ModifyFormDefinitionRequest} from './models';\nimport {Observable} from 'rxjs';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormManagementService {\n private valtimoApiConfig: any;\n\n constructor(private http: HttpClient, private configService: ConfigService) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinition(formDefinitionId: string): Observable<FormDefinition> {\n return this.http.get<FormDefinition>(\n `${this.valtimoApiConfig.endpointUri}form-management/${formDefinitionId}`\n );\n }\n\n queryFormDefinitions(params?: any): Observable<any> {\n return this.http.get(`${this.valtimoApiConfig.endpointUri}form-management`, {\n observe: 'response',\n params: params,\n });\n }\n\n createFormDefinition(request: CreateFormDefinitionRequest): Observable<FormDefinition> {\n return this.http.post<FormDefinition>(\n `${this.valtimoApiConfig.endpointUri}form-management`,\n request\n );\n }\n\n modifyFormDefinition(request: ModifyFormDefinitionRequest): Observable<FormDefinition> {\n return this.http.put<FormDefinition>(\n `${this.valtimoApiConfig.endpointUri}form-management`,\n request\n );\n }\n\n deleteFormDefinition(formDefinitionId: string): Observable<void> {\n return this.http.delete<void>(\n `${this.valtimoApiConfig.endpointUri}form-management/${formDefinitionId}`\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\n\n@Component({\n selector: 'valtimo-form-management',\n templateUrl: './form-management.component.html',\n styleUrls: ['./form-management.component.scss'],\n})\nexport class FormManagementComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {AlertService} from '@valtimo/components';\nimport {FormManagementService} from '../form-management.service';\nimport {CreateFormDefinitionRequest} from '../models';\nimport {combineLatest} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-form-management-create',\n templateUrl: './form-management-create.component.html',\n styleUrls: ['./form-management-create.component.scss'],\n})\nexport class FormManagementCreateComponent implements OnInit {\n public form: FormGroup;\n\n constructor(\n private formManagementService: FormManagementService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService,\n private route: ActivatedRoute\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n name: new FormControl('', Validators.required),\n });\n }\n\n reset() {\n this.form.setValue({\n name: '',\n });\n }\n\n createFormDefinition() {\n const emptyForm = {\n display: 'form',\n components: [],\n };\n const request: CreateFormDefinitionRequest = {\n name: this.form.value.name,\n formDefinition: JSON.stringify(emptyForm),\n };\n combineLatest([\n this.formManagementService.createFormDefinition(request),\n this.route.queryParams,\n ])\n .pipe(take(1))\n .subscribe(\n ([formDefinition, params]) => {\n this.alertService.success('Created new Form');\n\n if (params?.upload === 'true') {\n this.router.navigate(['/form-management/edit', formDefinition.id], {\n queryParams: {upload: 'true'},\n });\n } else {\n this.router.navigate(['/form-management/edit', formDefinition.id]);\n }\n },\n err => {\n this.alertService.error('Error creating new Form');\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnDestroy, OnInit, ViewEncapsulation} from '@angular/core';\nimport {FormManagementService} from '../form-management.service';\nimport {AlertService} from '@valtimo/components';\nimport {FormDefinition, ModifyFormDefinitionRequest} from '../models';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {first, take} from 'rxjs/operators';\nimport {BehaviorSubject, Subscription} from 'rxjs';\nimport {FormioForm} from 'angular-formio';\n\n@Component({\n selector: 'valtimo-form-management-edit',\n templateUrl: './form-management-edit.component.html',\n styleUrls: ['./form-management-edit.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormManagementEditComponent implements OnInit, OnDestroy {\n readonly showModal$ = new BehaviorSubject<boolean>(false);\n readonly reloading$ = new BehaviorSubject<boolean>(false);\n public modifiedFormDefinition: FormioForm = null;\n public formDefinition: FormDefinition | null = null;\n private alertSub: Subscription = Subscription.EMPTY;\n private formDefinitionId: string | null = null;\n\n constructor(\n private formManagementService: FormManagementService,\n private alertService: AlertService,\n private route: ActivatedRoute,\n private router: Router\n ) {}\n\n ngOnInit() {\n this.loadFormDefinition();\n this.checkToOpenUploadModal();\n }\n\n ngOnDestroy() {\n this.alertSub.unsubscribe();\n }\n\n loadFormDefinition() {\n this.formDefinitionId = this.route.snapshot.paramMap.get('id');\n this.formManagementService.getFormDefinition(this.formDefinitionId).subscribe(\n formDefinition => {\n this.formDefinition = formDefinition;\n },\n () => {\n this.alertService.error('Error retrieving Form Definition');\n }\n );\n }\n\n modifyFormDefinition() {\n const form = JSON.stringify(\n this.modifiedFormDefinition != null\n ? this.modifiedFormDefinition\n : this.formDefinition.formDefinition\n );\n const request: ModifyFormDefinitionRequest = {\n id: this.formDefinition.id,\n name: this.formDefinition.name,\n formDefinition: form,\n };\n this.formManagementService.modifyFormDefinition(request).subscribe(\n () => {\n this.router.navigate(['/form-management']);\n this.alertService.success('Form deployed');\n },\n err => {\n this.alertService.error('Error deploying Form');\n }\n );\n }\n\n public formBuilderChanged(event) {\n this.modifiedFormDefinition = event.form;\n }\n\n public delete() {\n if (!this.alertSub.closed) {\n return;\n }\n const mssg = 'Delete Form?';\n const confirmations = [\n {\n label: 'Cancel',\n class: 'btn btn-default',\n value: false,\n },\n {\n label: 'Delete',\n class: 'btn btn-primary',\n value: true,\n },\n ];\n this.alertService.notification(mssg, confirmations);\n this.alertSub = this.alertService\n .getAlertConfirmChangeEmitter()\n .pipe(first())\n .subscribe(alert => {\n if (alert.confirm === true) {\n this.deleteFormDefinition();\n }\n });\n }\n\n deleteFormDefinition() {\n this.formManagementService.deleteFormDefinition(this.formDefinition.id).subscribe(\n () => {\n this.router.navigate(['/form-management']);\n this.alertService.success('Form deleted');\n },\n err => {\n this.alertService.error('Error deleting Form');\n }\n );\n }\n\n downloadFormDefinition() {\n const file = new Blob([JSON.stringify(this.formDefinition)], {type: 'text/json'});\n const link = document.createElement('a');\n link.download = `form_${this.formDefinition.name}.json`;\n link.href = window.URL.createObjectURL(file);\n link.click();\n window.URL.revokeObjectURL(link.href);\n link.remove();\n }\n\n showModal() {\n this.showModal$.next(true);\n }\n\n setFormDefinition(formDefinition: any) {\n this.reloading$.next(true);\n\n const definition = JSON.parse(formDefinition);\n const components = definition?.formDefinition?.components;\n const currentDefinition = this.modifiedFormDefinition || this.formDefinition.formDefinition;\n const newDefinition = {...currentDefinition, ...(components && {components})};\n\n this.modifiedFormDefinition = newDefinition;\n this.formDefinition.formDefinition = newDefinition;\n\n this.reloading$.next(false);\n }\n\n private checkToOpenUploadModal(): void {\n this.route.queryParams.pipe(take(1)).subscribe(params => {\n if (params?.upload === 'true') {\n this.showModal();\n }\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {FormManagementComponent} from './form-management.component';\nimport {AuthGuardService} from '@valtimo/security';\nimport {FormManagementCreateComponent} from './form-management-create/form-management-create.component';\nimport {FormManagementEditComponent} from './form-management-edit/form-management-edit.component';\nimport {ROLE_ADMIN} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'form-management',\n component: FormManagementComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Form management', roles: [ROLE_ADMIN]},\n },\n {\n path: 'form-management/create',\n component: FormManagementCreateComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Create new Form', roles: [ROLE_ADMIN]},\n },\n {\n path: 'form-management/edit/:id',\n component: FormManagementEditComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Form Builder', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n declarations: [],\n})\nexport class FormManagementRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormDefinition} from '../models';\nimport {FormManagementService} from '../form-management.service';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'valtimo-form-management-list',\n templateUrl: './form-management-list.component.html',\n styleUrls: ['./form-management-list.component.scss'],\n})\nexport class FormManagementListComponent implements OnInit {\n public formDefinitions: FormDefinition[] = [];\n public formDefinitionFields: any[] = [\n {key: 'name', label: 'Name'},\n {key: 'readOnly', label: 'Read-only'},\n ];\n public pagination = {\n collectionSize: 0,\n page: 1,\n size: 10,\n maxPaginationItemSize: 5,\n };\n public pageParam = 0;\n\n public paginationClicked(page) {\n this.pageParam = page - 1;\n this.loadFormDefinitions();\n }\n\n constructor(private formManagementService: FormManagementService, private router: Router) {}\n\n ngOnInit() {}\n\n paginationSet() {\n this.loadFormDefinitions();\n }\n\n loadFormDefinitions(searchTerm?: string) {\n const params = {page: this.pageParam, size: this.pagination.size};\n if (searchTerm) {\n params['searchTerm'] = searchTerm;\n }\n this.formManagementService.queryFormDefinitions(params).subscribe(results => {\n this.pagination.collectionSize = results.body.totalElements;\n this.formDefinitions = results.body.content;\n });\n }\n\n editFormDefinition(formDefinition: FormDefinition) {\n this.router.navigate(['/form-management/edit', formDefinition.id]);\n }\n\n searchTermEntered(searchTerm: string) {\n this.loadFormDefinitions(searchTerm);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {ModalComponent} from '@valtimo/components';\nimport {DocumentService} from '@valtimo/document';\nimport {BehaviorSubject, Observable, Subject, Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-form-management-upload',\n templateUrl: './form-management-upload.component.html',\n styleUrls: ['./form-management-upload.component.scss'],\n})\nexport class FormManagementUploadComponent implements AfterViewInit, OnDestroy {\n @ViewChild('uploadFormDefinitionModal') modal: ModalComponent;\n\n @Input() show$: Observable<boolean>;\n @Output() definitionUploaded: EventEmitter<any> = new EventEmitter();\n\n readonly clear$ = new Subject();\n readonly jsonString$ = new BehaviorSubject<string>('');\n readonly error$ = new BehaviorSubject<string>('');\n readonly disabled$ = new BehaviorSubject<boolean>(false);\n\n private showSubscription: Subscription;\n private fileSubscription: Subscription;\n private errorSubscription: Subscription;\n\n private readonly file$ = new BehaviorSubject<File>(undefined);\n\n constructor(\n private readonly documentService: DocumentService,\n private readonly translateService: TranslateService\n ) {}\n\n ngAfterViewInit(): void {\n this.openShowSubscription();\n this.openFileSubscription();\n }\n\n ngOnDestroy(): void {\n this.showSubscription.unsubscribe();\n this.fileSubscription.unsubscribe();\n this.closeErrorSubscription();\n }\n\n setFile(file: File): void {\n this.clearError();\n this.file$.next(file);\n }\n\n uploadDefinition(): void {\n this.disable();\n\n this.jsonString$.pipe(take(1)).subscribe(definition => {\n this.closeErrorSubscription();\n this.clearError();\n this.enable();\n this.hideModal();\n this.definitionUploaded.emit(definition);\n });\n }\n\n private openErrorSubscription(errorCode: string): void {\n this.closeErrorSubscription();\n this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {\n this.error$.next(error);\n });\n }\n\n private closeErrorSubscription(): void {\n if (this.errorSubscription) {\n this.errorSubscription.unsubscribe();\n }\n }\n\n private clearError(): void {\n this.error$.next('');\n }\n\n private openFileSubscription(): void {\n this.fileSubscription = this.file$.subscribe(file => {\n if (file) {\n const reader = new FileReader();\n\n reader.onloadend = () => {\n const result = reader.result.toString();\n if (this.stringIsValidJson(result)) {\n this.jsonString$.next(result);\n }\n };\n\n reader.readAsText(file);\n } else {\n this.clearJsonString();\n }\n });\n }\n\n private openShowSubscription(): void {\n this.showSubscription = this.show$.subscribe(show => {\n if (show) {\n this.showModal();\n } else {\n this.hideModal();\n }\n\n this.clearJsonString();\n this.clearError();\n this.clearDropzone();\n });\n }\n\n private clearJsonString(): void {\n this.jsonString$.next('');\n }\n\n private clearDropzone(): void {\n this.clear$.next();\n }\n\n private showModal(): void {\n this.modal.show();\n }\n\n private hideModal(): void {\n this.modal.hide();\n }\n\n private stringIsValidJson(string: string) {\n try {\n // tslint:disable-next-line\n JSON.parse(string)?.formDefinition?.components;\n } catch (e) {\n this.clearDropzone();\n this.openErrorSubscription('dropzone.error.invalidFormDef');\n return false;\n }\n return true;\n }\n\n private disable(): void {\n this.disabled$.next(true);\n }\n\n private enable(): void {\n this.disabled$.next(false);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {FormManagementComponent} from './form-management.component';\nimport {FormManagementRoutingModule} from './form-management-routing.module';\nimport {\n DropzoneModule,\n FormIoModule,\n ListModule,\n ModalModule,\n WidgetModule,\n} from '@valtimo/components';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {FormManagementCreateComponent} from './form-management-create/form-management-create.component';\nimport {FormManagementListComponent} from './form-management-list/form-management-list.component';\nimport {FormManagementEditComponent} from './form-management-edit/form-management-edit.component';\nimport {TranslateModule} from '@ngx-translate/core';\nimport {NgbTooltipModule} from '@ng-bootstrap/ng-bootstrap';\nimport {FormManagementUploadComponent} from './form-management-upload/form-management-upload.component';\n\n@NgModule({\n declarations: [\n FormManagementComponent,\n FormManagementCreateComponent,\n FormManagementListComponent,\n FormManagementEditComponent,\n FormManagementUploadComponent,\n ],\n imports: [\n FormManagementRoutingModule,\n FormIoModule,\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n WidgetModule,\n ListModule,\n TranslateModule,\n NgbTooltipModule,\n DropzoneModule,\n ModalModule,\n ],\n exports: [FormManagementComponent],\n})\nexport class FormManagementModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {FormioForm} from 'angular-formio';\n\nexport function compareFormDefinitions(fd1: FormDefinition, fd2: FormDefinition) {\n if (fd1 === null && fd2 === null) {\n return true;\n }\n if (fd1 === null || fd2 === null) {\n return false;\n }\n return fd1.id === fd2.id;\n}\n\nexport interface FormDefinition {\n id: string;\n name: string;\n formDefinition: FormioForm;\n readOnly: boolean;\n}\n\nexport interface CreateFormDefinitionRequest {\n name: string;\n formDefinition: string;\n}\n\nexport interface ModifyFormDefinitionRequest {\n id: string;\n name: string;\n formDefinition: string;\n}\n","/*\n *\n * * Copyright 2015-2020 Ritense BV, the Netherlands.\n * *\n * * Licensed under EUPL, Version 1.2 (the \"License\");\n * * you may not use this file except in compliance with the License.\n * * You may obtain a copy of the License at\n * *\n * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n * *\n * * Unless required by applicable law or agreed to in writing, software\n * * distributed under the License is distributed on an \"AS IS\" basis,\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * * See the License for the specific language governing permissions and\n * * limitations under the License.\n *\n */\n\nexport * from './form-definition.model';\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of form-management\n */\n\nexport * from './lib/form-management.service';\nexport * from './lib/form-management.component';\nexport * from './lib/form-management.module';\nexport * from './lib/models';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {FormManagementCreateComponent as ɵa} from './lib/form-management-create/form-management-create.component';\nexport {FormManagementEditComponent as ɵc} from './lib/form-management-edit/form-management-edit.component';\nexport {FormManagementListComponent as ɵb} from './lib/form-management-list/form-management-list.component';\nexport {FormManagementRoutingModule as ɵe} from './lib/form-management-routing.module';\nexport {FormManagementUploadComponent as ɵd} from './lib/form-management-upload/form-management-upload.component';"],"names":["Injectable","HttpClient","ConfigService","Component","FormControl","Validators","combineLatest","take","FormBuilder","Router","AlertService","ActivatedRoute","BehaviorSubject","Subscription","first","ViewEncapsulation","ROLE_ADMIN","AuthGuardService","NgModule","RouterModule","EventEmitter","Subject","DocumentService","TranslateService","ViewChild","Input","Output","FormIoModule","CommonModule","ReactiveFormsModule","FormsModule","WidgetModule","ListModule","TranslateModule","NgbTooltipModule","DropzoneModule","ModalModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;;;;QA4BE,+BAAoB,IAAgB,EAAU,aAA4B;YAAtD,SAAI,GAAJ,IAAI,CAAY;YAAU,kBAAa,GAAb,aAAa,CAAe;YACxE,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC;SACzD;QAED,iDAAiB,GAAjB,UAAkB,gBAAwB;YACxC,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CACf,IAAI,CAAC,gBAAgB,CAAC,WAAW,wBAAmB,gBAAkB,CAC1E,CAAC;SACH;QAED,oDAAoB,GAApB,UAAqB,MAAY;YAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAI,IAAI,CAAC,gBAAgB,CAAC,WAAW,oBAAiB,EAAE;gBAC1E,OAAO,EAAE,UAAU;gBACnB,MAAM,EAAE,MAAM;aACf,CA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BAROmB,0BAAe;gBAFfC,qBAAgB;;;wBAYrBC,YAAS,SAAC,2BAA2B;wBAErCC,QAAK;qCACLC,SAAM;;;ICxCT;;;;;;;;;;;;;;;;QA0DA;;;;;gBAvBCR,WAAQ,SAAC;oBACR,YAAY,EAAE;wBACZ,uBAAuB;wBACvB,6BAA6B;wBAC7B,2BAA2B;wBAC3B,2BAA2B;wBAC3B,6BAA6B;qBAC9B;oBACD,OAAO,EAAE;wBACP,2BAA2B;wBAC3BS,uBAAY;wBACZC,mBAAY;wBACZC,yBAAmB;wBACnBC,iBAAW;wBACXC,uBAAY;wBACZC,qBAAU;wBACVC,oBAAe;wBACfC,4BAAgB;wBAChBC,yBAAc;wBACdC,sBAAW;qBACZ;oBACD,OAAO,EAAE,CAAC,uBAAuB,CAAC;iBACnC;;;ICzDD;;;;;;;;;;;;;;;aAkBgB,sBAAsB,CAAC,GAAmB,EAAE,GAAmB;QAC7E,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,IAAI,EAAE;YAChC,OAAO,IAAI,CAAC;SACb;QACD,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,IAAI,EAAE;YAChC,OAAO,KAAK,CAAC;SACd;QACD,OAAO,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;IAC3B;;IC1BA;;;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"valtimo-form-management.umd.js","sources":["../../../../projects/valtimo/form-management/src/lib/form-management.service.ts","../../../../projects/valtimo/form-management/src/lib/form-management.component.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../projects/valtimo/form-management/src/lib/form-management-create/form-management-create.component.ts","../../../../projects/valtimo/form-management/src/lib/form-management-edit/form-management-edit.component.ts","../../../../projects/valtimo/form-management/src/lib/form-management-routing.module.ts","../../../../projects/valtimo/form-management/src/lib/form-management-list/form-management-list.component.ts","../../../../projects/valtimo/form-management/src/lib/form-management-upload/form-management-upload.component.ts","../../../../projects/valtimo/form-management/src/lib/form-management.module.ts","../../../../projects/valtimo/form-management/src/lib/models/form-definition.model.ts","../../../../projects/valtimo/form-management/src/lib/models/index.ts","../../../../projects/valtimo/form-management/src/public-api.ts","../../../../projects/valtimo/form-management/src/valtimo-form-management.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {CreateFormDefinitionRequest, FormDefinition, ModifyFormDefinitionRequest} from './models';\nimport {Observable} from 'rxjs';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class FormManagementService {\n private valtimoApiConfig: any;\n\n constructor(private http: HttpClient, private configService: ConfigService) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getFormDefinition(formDefinitionId: string): Observable<FormDefinition> {\n return this.http.get<FormDefinition>(\n `${this.valtimoApiConfig.endpointUri}form-management/${formDefinitionId}`\n );\n }\n\n queryFormDefinitions(params?: any): Observable<any> {\n return this.http.get(`${this.valtimoApiConfig.endpointUri}form-management`, {\n observe: 'response',\n params: params,\n });\n }\n\n createFormDefinition(request: CreateFormDefinitionRequest): Observable<FormDefinition> {\n return this.http.post<FormDefinition>(\n `${this.valtimoApiConfig.endpointUri}form-management`,\n request\n );\n }\n\n modifyFormDefinition(request: ModifyFormDefinitionRequest): Observable<FormDefinition> {\n return this.http.put<FormDefinition>(\n `${this.valtimoApiConfig.endpointUri}form-management`,\n request\n );\n }\n\n deleteFormDefinition(formDefinitionId: string): Observable<void> {\n return this.http.delete<void>(\n `${this.valtimoApiConfig.endpointUri}form-management/${formDefinitionId}`\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\n\n@Component({\n selector: 'valtimo-form-management',\n templateUrl: './form-management.component.html',\n styleUrls: ['./form-management.component.scss'],\n})\nexport class FormManagementComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {AlertService} from '@valtimo/components';\nimport {FormManagementService} from '../form-management.service';\nimport {CreateFormDefinitionRequest} from '../models';\nimport {combineLatest} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-form-management-create',\n templateUrl: './form-management-create.component.html',\n styleUrls: ['./form-management-create.component.scss'],\n})\nexport class FormManagementCreateComponent implements OnInit {\n public form: FormGroup;\n\n constructor(\n private formManagementService: FormManagementService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService,\n private route: ActivatedRoute\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n name: new FormControl('', Validators.required),\n });\n }\n\n reset() {\n this.form.setValue({\n name: '',\n });\n }\n\n createFormDefinition() {\n const emptyForm = {\n display: 'form',\n components: [],\n };\n const request: CreateFormDefinitionRequest = {\n name: this.form.value.name,\n formDefinition: JSON.stringify(emptyForm),\n };\n combineLatest([\n this.formManagementService.createFormDefinition(request),\n this.route.queryParams,\n ])\n .pipe(take(1))\n .subscribe(\n ([formDefinition, params]) => {\n this.alertService.success('Created new Form');\n\n if (params?.upload === 'true') {\n this.router.navigate(['/form-management/edit', formDefinition.id], {\n queryParams: {upload: 'true'},\n });\n } else {\n this.router.navigate(['/form-management/edit', formDefinition.id]);\n }\n },\n err => {\n this.alertService.error('Error creating new Form');\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnDestroy, OnInit, ViewEncapsulation} from '@angular/core';\nimport {FormManagementService} from '../form-management.service';\nimport {AlertService} from '@valtimo/components';\nimport {FormDefinition, ModifyFormDefinitionRequest} from '../models';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {first, take} from 'rxjs/operators';\nimport {BehaviorSubject, Subscription} from 'rxjs';\nimport {FormioForm} from 'angular-formio';\n\n@Component({\n selector: 'valtimo-form-management-edit',\n templateUrl: './form-management-edit.component.html',\n styleUrls: ['./form-management-edit.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class FormManagementEditComponent implements OnInit, OnDestroy {\n readonly showModal$ = new BehaviorSubject<boolean>(false);\n readonly reloading$ = new BehaviorSubject<boolean>(false);\n public modifiedFormDefinition: FormioForm = null;\n public formDefinition: FormDefinition | null = null;\n private alertSub: Subscription = Subscription.EMPTY;\n private formDefinitionId: string | null = null;\n\n constructor(\n private formManagementService: FormManagementService,\n private alertService: AlertService,\n private route: ActivatedRoute,\n private router: Router\n ) {}\n\n ngOnInit() {\n this.loadFormDefinition();\n this.checkToOpenUploadModal();\n }\n\n ngOnDestroy() {\n this.alertSub.unsubscribe();\n }\n\n loadFormDefinition() {\n this.formDefinitionId = this.route.snapshot.paramMap.get('id');\n this.formManagementService.getFormDefinition(this.formDefinitionId).subscribe(\n formDefinition => {\n this.formDefinition = formDefinition;\n },\n () => {\n this.alertService.error('Error retrieving Form Definition');\n }\n );\n }\n\n modifyFormDefinition() {\n const form = JSON.stringify(\n this.modifiedFormDefinition != null\n ? this.modifiedFormDefinition\n : this.formDefinition.formDefinition\n );\n const request: ModifyFormDefinitionRequest = {\n id: this.formDefinition.id,\n name: this.formDefinition.name,\n formDefinition: form,\n };\n this.formManagementService.modifyFormDefinition(request).subscribe(\n () => {\n this.router.navigate(['/form-management']);\n this.alertService.success('Form deployed');\n },\n err => {\n this.alertService.error('Error deploying Form');\n }\n );\n }\n\n public formBuilderChanged(event) {\n this.modifiedFormDefinition = event.form;\n }\n\n public delete() {\n if (!this.alertSub.closed) {\n return;\n }\n const mssg = 'Delete Form?';\n const confirmations = [\n {\n label: 'Cancel',\n class: 'btn btn-default',\n value: false,\n },\n {\n label: 'Delete',\n class: 'btn btn-primary',\n value: true,\n },\n ];\n this.alertService.notification(mssg, confirmations);\n this.alertSub = this.alertService\n .getAlertConfirmChangeEmitter()\n .pipe(first())\n .subscribe(alert => {\n if (alert.confirm === true) {\n this.deleteFormDefinition();\n }\n });\n }\n\n deleteFormDefinition() {\n this.formManagementService.deleteFormDefinition(this.formDefinition.id).subscribe(\n () => {\n this.router.navigate(['/form-management']);\n this.alertService.success('Form deleted');\n },\n err => {\n this.alertService.error('Error deleting Form');\n }\n );\n }\n\n downloadFormDefinition() {\n const file = new Blob([JSON.stringify(this.formDefinition)], {type: 'text/json'});\n const link = document.createElement('a');\n link.download = `form_${this.formDefinition.name}.json`;\n link.href = window.URL.createObjectURL(file);\n link.click();\n window.URL.revokeObjectURL(link.href);\n link.remove();\n }\n\n showModal() {\n this.showModal$.next(true);\n }\n\n setFormDefinition(formDefinition: any) {\n this.reloading$.next(true);\n\n const definition = JSON.parse(formDefinition);\n const components = definition?.formDefinition?.components;\n const currentDefinition = this.modifiedFormDefinition || this.formDefinition.formDefinition;\n const newDefinition = {...currentDefinition, ...(components && {components})};\n\n this.modifiedFormDefinition = newDefinition;\n this.formDefinition.formDefinition = newDefinition;\n\n this.reloading$.next(false);\n }\n\n private checkToOpenUploadModal(): void {\n this.route.queryParams.pipe(take(1)).subscribe(params => {\n if (params?.upload === 'true') {\n this.showModal();\n }\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {FormManagementComponent} from './form-management.component';\nimport {AuthGuardService} from '@valtimo/security';\nimport {FormManagementCreateComponent} from './form-management-create/form-management-create.component';\nimport {FormManagementEditComponent} from './form-management-edit/form-management-edit.component';\nimport {ROLE_ADMIN} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'form-management',\n component: FormManagementComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Form management', roles: [ROLE_ADMIN]},\n },\n {\n path: 'form-management/create',\n component: FormManagementCreateComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Create new Form', roles: [ROLE_ADMIN]},\n },\n {\n path: 'form-management/edit/:id',\n component: FormManagementEditComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Form Builder', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule],\n declarations: [],\n})\nexport class FormManagementRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormDefinition} from '../models';\nimport {FormManagementService} from '../form-management.service';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'valtimo-form-management-list',\n templateUrl: './form-management-list.component.html',\n styleUrls: ['./form-management-list.component.scss'],\n})\nexport class FormManagementListComponent implements OnInit {\n public formDefinitions: FormDefinition[] = [];\n public formDefinitionFields: any[] = [\n {key: 'name', label: 'Name'},\n {key: 'readOnly', label: 'Read-only'},\n ];\n public pagination = {\n collectionSize: 0,\n page: 1,\n size: 10,\n maxPaginationItemSize: 5,\n };\n public pageParam = 0;\n\n public paginationClicked(page) {\n this.pageParam = page - 1;\n this.loadFormDefinitions();\n }\n\n constructor(private formManagementService: FormManagementService, private router: Router) {}\n\n ngOnInit() {}\n\n paginationSet() {\n this.loadFormDefinitions();\n }\n\n loadFormDefinitions(searchTerm?: string) {\n const params = {page: this.pageParam, size: this.pagination.size};\n if (searchTerm) {\n params['searchTerm'] = searchTerm;\n }\n this.formManagementService.queryFormDefinitions(params).subscribe(results => {\n this.pagination.collectionSize = results.body.totalElements;\n this.formDefinitions = results.body.content;\n });\n }\n\n editFormDefinition(formDefinition: FormDefinition) {\n this.router.navigate(['/form-management/edit', formDefinition.id]);\n }\n\n searchTermEntered(searchTerm: string) {\n this.loadFormDefinitions(searchTerm);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n AfterViewInit,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {ModalComponent} from '@valtimo/components';\nimport {DocumentService} from '@valtimo/document';\nimport {BehaviorSubject, Observable, Subject, Subscription} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-form-management-upload',\n templateUrl: './form-management-upload.component.html',\n styleUrls: ['./form-management-upload.component.scss'],\n})\nexport class FormManagementUploadComponent implements AfterViewInit, OnDestroy {\n @ViewChild('uploadFormDefinitionModal') modal: ModalComponent;\n\n @Input() show$: Observable<boolean>;\n @Output() definitionUploaded: EventEmitter<any> = new EventEmitter();\n\n readonly clear$ = new Subject();\n readonly jsonString$ = new BehaviorSubject<string>('');\n readonly error$ = new BehaviorSubject<string>('');\n readonly disabled$ = new BehaviorSubject<boolean>(false);\n\n private showSubscription: Subscription;\n private fileSubscription: Subscription;\n private errorSubscription: Subscription;\n\n private readonly file$ = new BehaviorSubject<File>(undefined);\n\n constructor(\n private readonly documentService: DocumentService,\n private readonly translateService: TranslateService\n ) {}\n\n ngAfterViewInit(): void {\n this.openShowSubscription();\n this.openFileSubscription();\n }\n\n ngOnDestroy(): void {\n this.showSubscription.unsubscribe();\n this.fileSubscription.unsubscribe();\n this.closeErrorSubscription();\n }\n\n setFile(file: File): void {\n this.clearError();\n this.file$.next(file);\n }\n\n uploadDefinition(): void {\n this.disable();\n\n this.jsonString$.pipe(take(1)).subscribe(definition => {\n this.closeErrorSubscription();\n this.clearError();\n this.enable();\n this.hideModal();\n this.definitionUploaded.emit(definition);\n });\n }\n\n private openErrorSubscription(errorCode: string): void {\n this.closeErrorSubscription();\n this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {\n this.error$.next(error);\n });\n }\n\n private closeErrorSubscription(): void {\n if (this.errorSubscription) {\n this.errorSubscription.unsubscribe();\n }\n }\n\n private clearError(): void {\n this.error$.next('');\n }\n\n private openFileSubscription(): void {\n this.fileSubscription = this.file$.subscribe(file => {\n if (file) {\n const reader = new FileReader();\n\n reader.onloadend = () => {\n const result = reader.result.toString();\n if (this.stringIsValidJson(result)) {\n this.jsonString$.next(result);\n }\n };\n\n reader.readAsText(file);\n } else {\n this.clearJsonString();\n }\n });\n }\n\n private openShowSubscription(): void {\n this.showSubscription = this.show$.subscribe(show => {\n if (show) {\n this.showModal();\n } else {\n this.hideModal();\n }\n\n this.clearJsonString();\n this.clearError();\n this.clearDropzone();\n });\n }\n\n private clearJsonString(): void {\n this.jsonString$.next('');\n }\n\n private clearDropzone(): void {\n this.clear$.next();\n }\n\n private showModal(): void {\n this.modal.show();\n }\n\n private hideModal(): void {\n this.modal.hide();\n }\n\n private stringIsValidJson(string: string) {\n try {\n // tslint:disable-next-line\n JSON.parse(string)?.formDefinition?.components;\n } catch (e) {\n this.clearDropzone();\n this.openErrorSubscription('dropzone.error.invalidFormDef');\n return false;\n }\n return true;\n }\n\n private disable(): void {\n this.disabled$.next(true);\n }\n\n private enable(): void {\n this.disabled$.next(false);\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {FormManagementComponent} from './form-management.component';\nimport {FormManagementRoutingModule} from './form-management-routing.module';\nimport {\n DropzoneModule,\n FormIoModule,\n ListModule,\n ModalModule,\n WidgetModule,\n} from '@valtimo/components';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {FormManagementCreateComponent} from './form-management-create/form-management-create.component';\nimport {FormManagementListComponent} from './form-management-list/form-management-list.component';\nimport {FormManagementEditComponent} from './form-management-edit/form-management-edit.component';\nimport {TranslateModule} from '@ngx-translate/core';\nimport {NgbTooltipModule} from '@ng-bootstrap/ng-bootstrap';\nimport {FormManagementUploadComponent} from './form-management-upload/form-management-upload.component';\n\n@NgModule({\n declarations: [\n FormManagementComponent,\n FormManagementCreateComponent,\n FormManagementListComponent,\n FormManagementEditComponent,\n FormManagementUploadComponent,\n ],\n imports: [\n FormManagementRoutingModule,\n FormIoModule,\n CommonModule,\n ReactiveFormsModule,\n FormsModule,\n WidgetModule,\n ListModule,\n TranslateModule,\n NgbTooltipModule,\n DropzoneModule,\n ModalModule,\n ],\n exports: [FormManagementComponent],\n})\nexport class FormManagementModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {FormioForm} from 'angular-formio';\n\nexport function compareFormDefinitions(fd1: FormDefinition, fd2: FormDefinition) {\n if (fd1 === null && fd2 === null) {\n return true;\n }\n if (fd1 === null || fd2 === null) {\n return false;\n }\n return fd1.id === fd2.id;\n}\n\nexport interface FormDefinition {\n id: string;\n name: string;\n formDefinition: FormioForm;\n readOnly: boolean;\n}\n\nexport interface CreateFormDefinitionRequest {\n name: string;\n formDefinition: string;\n}\n\nexport interface ModifyFormDefinitionRequest {\n id: string;\n name: string;\n formDefinition: string;\n}\n","/*\n *\n * * Copyright 2015-2020 Ritense BV, the Netherlands.\n * *\n * * Licensed under EUPL, Version 1.2 (the \"License\");\n * * you may not use this file except in compliance with the License.\n * * You may obtain a copy of the License at\n * *\n * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n * *\n * * Unless required by applicable law or agreed to in writing, software\n * * distributed under the License is distributed on an \"AS IS\" basis,\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * * See the License for the specific language governing permissions and\n * * limitations under the License.\n *\n */\n\nexport * from './form-definition.model';\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of form-management\n */\n\nexport * from './lib/form-management.service';\nexport * from './lib/form-management.component';\nexport * from './lib/form-management.module';\nexport * from './lib/models';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {FormManagementCreateComponent as ɵa} from './lib/form-management-create/form-management-create.component';\nexport {FormManagementEditComponent as ɵc} from './lib/form-management-edit/form-management-edit.component';\nexport {FormManagementListComponent as ɵb} from './lib/form-management-list/form-management-list.component';\nexport {FormManagementRoutingModule as ɵe} from './lib/form-management-routing.module';\nexport {FormManagementUploadComponent as ɵd} from './lib/form-management-upload/form-management-upload.component';"],"names":["Injectable","HttpClient","ConfigService","Component","FormControl","Validators","combineLatest","take","FormBuilder","Router","AlertService","ActivatedRoute","BehaviorSubject","Subscription","first","ViewEncapsulation","ROLE_ADMIN","AuthGuardService","NgModule","RouterModule","EventEmitter","Subject","DocumentService","TranslateService","ViewChild","Input","Output","FormIoModule","CommonModule","ReactiveFormsModule","Form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,EAAE;YAChC,OAAO,IAAI,CAAC;SACb;QACD,IAAI,GAAG,KAAK,IAAI,IAAI,GAAG,KAAK,IAAI,EAAE;YAChC,OAAO,KAAK,CAAC;SACd;QACD,OAAO,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC;IAC3B;;IC1BA;;;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,2 +1,2 @@
1
- !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config"),require("@angular/router"),require("@valtimo/security"),require("@angular/forms"),require("@valtimo/components"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@ngx-translate/core"),require("@ng-bootstrap/ng-bootstrap"),require("@valtimo/document")):"function"==typeof define&&define.amd?define("@valtimo/form-management",["exports","@angular/core","@angular/common/http","@valtimo/config","@angular/router","@valtimo/security","@angular/forms","@valtimo/components","rxjs","rxjs/operators","@angular/common","@ngx-translate/core","@ng-bootstrap/ng-bootstrap","@valtimo/document"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo["form-management"]={}),e.ng.core,e.ng.common.http,e.config,e.ng.router,e.security,e.ng.forms,e.components,e.rxjs,e.rxjs.operators,e.ng.common,e.core$1,e.ngBootstrap,e.document$1)}(this,(function(e,n,t,i,o,r,a,s,l,c,d,u,m,p){"use strict";var f=function(){function e(e,n){this.http=e,this.configService=n,this.valtimoApiConfig=n.config.valtimoApi}return e.prototype.getFormDefinition=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"form-management/"+e)},e.prototype.queryFormDefinitions=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"form-management",{observe:"response",params:e})},e.prototype.createFormDefinition=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"form-management",e)},e.prototype.modifyFormDefinition=function(e){return this.http.put(this.valtimoApiConfig.endpointUri+"form-management",e)},e.prototype.deleteFormDefinition=function(e){return this.http.delete(this.valtimoApiConfig.endpointUri+"form-management/"+e)},e}();f.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new f(n.ɵɵinject(t.HttpClient),n.ɵɵinject(i.ConfigService))},token:f,providedIn:"root"}),f.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],f.ctorParameters=function(){return[{type:t.HttpClient},{type:i.ConfigService}]};var h=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();h.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content pt-0">\n <div class="container-fluid">\n <div class="text-right">\n <div class="btn-group mt-m3px mb-3">\n <button\n [routerLink]="\'create\'"\n [queryParams]="{upload: \'true\'}"\n class="btn btn-secondary btn-space"\n >\n <i class="icon mdi mdi-upload"></i>&nbsp;\n {{ \'Upload\' | translate }}\n </button>\n <button [routerLink]="\'create\'" class="btn btn-primary btn-space mr-0">\n <i class="icon mdi mdi-plus"></i> &nbsp;\n <span>{{ \'Create new Form\' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-form-management-list></valtimo-form-management-list>\n </valtimo-widget>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],h.ctorParameters=function(){return[]};Object.create;function b(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,o,r=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return a}Object.create;var g=function(){function e(e,n,t,i,o){this.formManagementService=e,this.formBuilder=n,this.router=t,this.alertService=i,this.route=o}return Object.defineProperty(e.prototype,"formControls",{get:function(){return this.form.controls},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.form=this.formBuilder.group({name:new a.FormControl("",a.Validators.required)})},e.prototype.reset=function(){this.form.setValue({name:""})},e.prototype.createFormDefinition=function(){var e=this,n={name:this.form.value.name,formDefinition:JSON.stringify({display:"form",components:[]})};l.combineLatest([this.formManagementService.createFormDefinition(n),this.route.queryParams]).pipe(c.take(1)).subscribe((function(n){var t=b(n,2),i=t[0],o=t[1];e.alertService.success("Created new Form"),"true"===(null==o?void 0:o.upload)?e.router.navigate(["/form-management/edit",i.id],{queryParams:{upload:"true"}}):e.router.navigate(["/form-management/edit",i.id])}),(function(n){e.alertService.error("Error creating new Form")}))},e}();g.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management-create",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content">\n <div class="container-fluid">\n <div class="col-12 px-0 mb-5">\n <valtimo-widget>\n <div class="bg-white p-5">\n <form [formGroup]="form" (ngSubmit)="createFormDefinition()">\n <div class="form-group row">\n <label class="col-12 col-sm-3 col-form-label text-sm-right" for="name">Name</label>\n <div class="col-12 col-sm-8 col-lg-6">\n <input\n type="text"\n id="name"\n formControlName="name"\n class="form-control"\n placeholder="Form definition name"\n [ngClass]="{\n \'is-valid\': formControls.name.touched && formControls.name.valid,\n \'is-invalid\': formControls.name.touched && formControls.name.errors\n }"\n required\n />\n <div\n *ngIf="formControls.name.touched && formControls.name.errors"\n class="invalid-feedback"\n >\n <div *ngIf="formControls.name.errors.required">Name is required</div>\n </div>\n </div>\n </div>\n <div class="row pt-3 mt-1">\n <div class="col-12 col-sm-6 text-left">\n <a [routerLink]="\'/forms\'" class="btn btn-space btn-default">Back</a>\n </div>\n <div class="col-12 col-sm-6 text-right">\n <button class="btn btn-space btn-secondary" type="button" (click)="reset()">\n Reset\n </button>\n <button class="btn btn-space btn-primary" type="submit" [disabled]="form.invalid">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],g.ctorParameters=function(){return[{type:f},{type:a.FormBuilder},{type:o.Router},{type:s.AlertService},{type:o.ActivatedRoute}]};var v=function(){function e(e,n,t,i){this.formManagementService=e,this.alertService=n,this.route=t,this.router=i,this.showModal$=new l.BehaviorSubject(!1),this.reloading$=new l.BehaviorSubject(!1),this.modifiedFormDefinition=null,this.formDefinition=null,this.alertSub=l.Subscription.EMPTY,this.formDefinitionId=null}return e.prototype.ngOnInit=function(){this.loadFormDefinition(),this.checkToOpenUploadModal()},e.prototype.ngOnDestroy=function(){this.alertSub.unsubscribe()},e.prototype.loadFormDefinition=function(){var e=this;this.formDefinitionId=this.route.snapshot.paramMap.get("id"),this.formManagementService.getFormDefinition(this.formDefinitionId).subscribe((function(n){e.formDefinition=n}),(function(){e.alertService.error("Error retrieving Form Definition")}))},e.prototype.modifyFormDefinition=function(){var e=this,n=JSON.stringify(null!=this.modifiedFormDefinition?this.modifiedFormDefinition:this.formDefinition.formDefinition),t={id:this.formDefinition.id,name:this.formDefinition.name,formDefinition:n};this.formManagementService.modifyFormDefinition(t).subscribe((function(){e.router.navigate(["/form-management"]),e.alertService.success("Form deployed")}),(function(n){e.alertService.error("Error deploying Form")}))},e.prototype.formBuilderChanged=function(e){this.modifiedFormDefinition=e.form},e.prototype.delete=function(){var e=this;if(this.alertSub.closed){this.alertService.notification("Delete Form?",[{label:"Cancel",class:"btn btn-default",value:!1},{label:"Delete",class:"btn btn-primary",value:!0}]),this.alertSub=this.alertService.getAlertConfirmChangeEmitter().pipe(c.first()).subscribe((function(n){!0===n.confirm&&e.deleteFormDefinition()}))}},e.prototype.deleteFormDefinition=function(){var e=this;this.formManagementService.deleteFormDefinition(this.formDefinition.id).subscribe((function(){e.router.navigate(["/form-management"]),e.alertService.success("Form deleted")}),(function(n){e.alertService.error("Error deleting Form")}))},e.prototype.downloadFormDefinition=function(){var e=new Blob([JSON.stringify(this.formDefinition)],{type:"text/json"}),n=document.createElement("a");n.download="form_"+this.formDefinition.name+".json",n.href=window.URL.createObjectURL(e),n.click(),window.URL.revokeObjectURL(n.href),n.remove()},e.prototype.showModal=function(){this.showModal$.next(!0)},e.prototype.setFormDefinition=function(e){var n;this.reloading$.next(!0);var t=JSON.parse(e),i=null===(n=null==t?void 0:t.formDefinition)||void 0===n?void 0:n.components,o=this.modifiedFormDefinition||this.formDefinition.formDefinition,r=Object.assign(Object.assign({},o),i&&{components:i});this.modifiedFormDefinition=r,this.formDefinition.formDefinition=r,this.reloading$.next(!1)},e.prototype.checkToOpenUploadModal=function(){var e=this;this.route.queryParams.pipe(c.take(1)).subscribe((function(n){"true"===(null==n?void 0:n.upload)&&e.showModal()}))},e}();v.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management-edit",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content pt-0">\n <div class="container-fluid" *ngIf="formDefinition">\n <div class="btn-group mt-m3px mb-3 float-right">\n <button class="btn btn-primary btn-space" (click)="downloadFormDefinition()">\n <i class="fa fa-save"></i>\n {{ \'Download\' | translate }}\n </button>\n <button\n class="btn btn-secondary btn-space"\n (click)="showModal()"\n [disabled]="formDefinition.readOnly"\n >\n <i class="icon mdi mdi-upload"></i>&nbsp;\n {{ \'Upload\' | translate }}\n </button>\n <button\n class="btn btn-danger btn-space"\n (click)="delete()"\n [disabled]="formDefinition.readOnly"\n >\n <i class="fa fa-trash"></i>&nbsp;Delete\n </button>\n <button\n class="btn btn-success btn-space"\n (click)="modifyFormDefinition()"\n [disabled]="formDefinition.readOnly"\n >\n <i class="fa fa-upload"></i>&nbsp;Deploy\n </button>\n </div>\n <div class="clearfix"></div>\n <div class="bg-light formbuilder-header overflow-auto">\n <h3 class="formbuilder-title">\n {{ formDefinition.name }}\n <div *ngIf="formDefinition.readOnly" class="pull-right">\n <span class="badge badge-pill badge-info increase-size">Read-only</span>\n </div>\n </h3>\n </div>\n <ng-container *ngIf="!(reloading$ | async)">\n <valtimo-form-io-builder\n [form]="formDefinition.formDefinition"\n (change)="formBuilderChanged($event)"\n ></valtimo-form-io-builder>\n </ng-container>\n </div>\n</div>\n\n<valtimo-form-management-upload\n [show$]="showModal$"\n (definitionUploaded)="setFormDefinition($event)"\n></valtimo-form-management-upload>\n',encapsulation:n.ViewEncapsulation.None,styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.btn.formcomponent.gu-mirror,.formbuilder .btn.formcomponent.drag-copy{background-color:silver;border-color:silver;color:#fff;font-weight:400}.btn.formcomponent.gu-mirror:active,.btn.formcomponent.gu-mirror:hover,.formbuilder .btn.formcomponent.drag-copy:active,.formbuilder .btn.formcomponent.drag-copy:hover{box-shadow:none}.btn.formcomponent.gu-mirror:active,.formbuilder .btn.formcomponent.drag-copy:active{background-color:silver;border-color:silver}.formbuilder-header{border:1px solid #dee2e6;border-bottom:0;font-size:18px;height:80px;padding-left:18px;padding-right:18px}.formbuilder-header .formbuilder-title{margin-bottom:7px;margin-top:21px}.formbuilder-header .formbuilder-subtitle{margin-bottom:12px;margin-top:0}.formbuilder{background:#fff;border:1px solid #dee2e6;margin-left:0!important;margin-right:0!important;padding:1rem}.formbuilder .form-builder-panel .builder-group-button[aria-expanded=""],.formbuilder .form-builder-panel .builder-group-button[aria-expanded=false]{color:#a9a9a9}.formbuilder .form-builder-panel .builder-group-button[aria-expanded=true]{color:#000}.formbuilder .drag-and-drop-alert{display:none}.formbuilder .formarea{background-color:#fff;border:1px solid silver;padding:10px}.increase-size{font-size:1rem}']}]}],v.ctorParameters=function(){return[{type:f},{type:s.AlertService},{type:o.ActivatedRoute},{type:o.Router}]};var y={title:"Form management",roles:[i.ROLE_ADMIN]},S={title:"Create new Form",roles:[i.ROLE_ADMIN]},D={title:"Form Builder",roles:[i.ROLE_ADMIN]},w=[{path:"form-management",component:h,canActivate:[r.AuthGuardService],data:y},{path:"form-management/create",component:g,canActivate:[r.AuthGuardService],data:S},{path:"form-management/edit/:id",component:v,canActivate:[r.AuthGuardService],data:D}],x=function(){};x.decorators=[{type:n.NgModule,args:[{imports:[o.RouterModule.forChild(w)],exports:[o.RouterModule],declarations:[]}]}];var F=function(){function e(e,n){this.formManagementService=e,this.router=n,this.formDefinitions=[],this.formDefinitionFields=[{key:"name",label:"Name"},{key:"readOnly",label:"Read-only"}],this.pagination={collectionSize:0,page:1,size:10,maxPaginationItemSize:5},this.pageParam=0}return e.prototype.paginationClicked=function(e){this.pageParam=e-1,this.loadFormDefinitions()},e.prototype.ngOnInit=function(){},e.prototype.paginationSet=function(){this.loadFormDefinitions()},e.prototype.loadFormDefinitions=function(e){var n=this,t={page:this.pageParam,size:this.pagination.size};e&&(t.searchTerm=e),this.formManagementService.queryFormDefinitions(t).subscribe((function(e){n.pagination.collectionSize=e.body.totalElements,n.formDefinitions=e.body.content}))},e.prototype.editFormDefinition=function(e){this.router.navigate(["/form-management/edit",e.id])},e.prototype.searchTermEntered=function(e){this.loadFormDefinitions(e)},e}();F.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management-list",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<valtimo-list\n [items]="formDefinitions"\n [fields]="formDefinitionFields"\n [viewMode]="true"\n [isSearchable]="true"\n [pagination]="pagination"\n paginationIdentifier="formManagementList"\n (paginationClicked)="paginationClicked($event)"\n (paginationSet)="paginationSet()"\n (rowClicked)="editFormDefinition($event)"\n [header]="true"\n (search)="searchTermEntered($event)"\n>\n <div header>\n <h3 class="list-header-title">{{ \'Forms\' | translate }}</h3>\n <h5 class="list-header-description">{{ \'Overview of all Forms\' | translate }}</h5>\n </div>\n</valtimo-list>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],F.ctorParameters=function(){return[{type:f},{type:o.Router}]};var L=function(){function e(e,t){this.documentService=e,this.translateService=t,this.definitionUploaded=new n.EventEmitter,this.clear$=new l.Subject,this.jsonString$=new l.BehaviorSubject(""),this.error$=new l.BehaviorSubject(""),this.disabled$=new l.BehaviorSubject(!1),this.file$=new l.BehaviorSubject(void 0)}return e.prototype.ngAfterViewInit=function(){this.openShowSubscription(),this.openFileSubscription()},e.prototype.ngOnDestroy=function(){this.showSubscription.unsubscribe(),this.fileSubscription.unsubscribe(),this.closeErrorSubscription()},e.prototype.setFile=function(e){this.clearError(),this.file$.next(e)},e.prototype.uploadDefinition=function(){var e=this;this.disable(),this.jsonString$.pipe(c.take(1)).subscribe((function(n){e.closeErrorSubscription(),e.clearError(),e.enable(),e.hideModal(),e.definitionUploaded.emit(n)}))},e.prototype.openErrorSubscription=function(e){var n=this;this.closeErrorSubscription(),this.errorSubscription=this.translateService.stream(e).subscribe((function(e){n.error$.next(e)}))},e.prototype.closeErrorSubscription=function(){this.errorSubscription&&this.errorSubscription.unsubscribe()},e.prototype.clearError=function(){this.error$.next("")},e.prototype.openFileSubscription=function(){var e=this;this.fileSubscription=this.file$.subscribe((function(n){if(n){var t=new FileReader;t.onloadend=function(){var n=t.result.toString();e.stringIsValidJson(n)&&e.jsonString$.next(n)},t.readAsText(n)}else e.clearJsonString()}))},e.prototype.openShowSubscription=function(){var e=this;this.showSubscription=this.show$.subscribe((function(n){n?e.showModal():e.hideModal(),e.clearJsonString(),e.clearError(),e.clearDropzone()}))},e.prototype.clearJsonString=function(){this.jsonString$.next("")},e.prototype.clearDropzone=function(){this.clear$.next()},e.prototype.showModal=function(){this.modal.show()},e.prototype.hideModal=function(){this.modal.hide()},e.prototype.stringIsValidJson=function(e){var n,t;try{null===(t=null===(n=JSON.parse(e))||void 0===n?void 0:n.formDefinition)||void 0===t||t.components}catch(e){return this.clearDropzone(),this.openErrorSubscription("dropzone.error.invalidFormDef"),!1}return!0},e.prototype.disable=function(){this.disabled$.next(!0)},e.prototype.enable=function(){this.disabled$.next(!1)},e}();L.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management-upload",template:'<valtimo-modal\n #uploadFormDefinitionModal\n [title]="\'uploadFormDefinition\' | translate"\n showFooter="true"\n>\n <div class="mt-2" body>\n <valtimo-dropzone\n [clear$]="clear$"\n (fileSelected)="setFile($event)"\n [disabled]="disabled$ | async"\n [subtitle]="\'dropzone.formJsonDocDef\' | translate"\n [externalError$]="error$"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf="(jsonString$ | async) && !(error$ | async); else pleaseSelect">\n <button [disabled]="disabled$ | async" class="btn btn-primary" (click)="uploadDefinition()">\n {{ \'Upload\' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #pleaseSelect>\n <button class="btn btn-primary" [disabled]="true">\n {{ \'Select a document definition\' | translate }}\n </button>\n</ng-template>\n',styles:[""]}]}],L.ctorParameters=function(){return[{type:p.DocumentService},{type:u.TranslateService}]},L.propDecorators={modal:[{type:n.ViewChild,args:["uploadFormDefinitionModal"]}],show$:[{type:n.Input}],definitionUploaded:[{type:n.Output}]};var I=function(){};I.decorators=[{type:n.NgModule,args:[{declarations:[h,g,F,v,L],imports:[x,s.FormIoModule,d.CommonModule,a.ReactiveFormsModule,a.FormsModule,s.WidgetModule,s.ListModule,u.TranslateModule,m.NgbTooltipModule,s.DropzoneModule,s.ModalModule],exports:[h]}]}],e.FormManagementComponent=h,e.FormManagementModule=I,e.FormManagementService=f,e.compareFormDefinitions=function(e,n){return null===e&&null===n||null!==e&&null!==n&&e.id===n.id},e.ɵa=g,e.ɵb=F,e.ɵc=v,e.ɵd=L,e.ɵe=x,Object.defineProperty(e,"__esModule",{value:!0})}));
1
+ !function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@angular/core"),require("@angular/common/http"),require("@valtimo/config"),require("@angular/router"),require("@valtimo/security"),require("@angular/forms"),require("@valtimo/components"),require("rxjs"),require("rxjs/operators"),require("@angular/common"),require("@ngx-translate/core"),require("@ng-bootstrap/ng-bootstrap"),require("@valtimo/document")):"function"==typeof define&&define.amd?define("@valtimo/form-management",["exports","@angular/core","@angular/common/http","@valtimo/config","@angular/router","@valtimo/security","@angular/forms","@valtimo/components","rxjs","rxjs/operators","@angular/common","@ngx-translate/core","@ng-bootstrap/ng-bootstrap","@valtimo/document"],n):n(((e=e||self).valtimo=e.valtimo||{},e.valtimo["form-management"]={}),e.ng.core,e.ng.common.http,e.config,e.ng.router,e.security,e.ng.forms,e.components,e.rxjs,e.rxjs.operators,e.ng.common,e.core$1,e.ngBootstrap,e.document$1)}(this,(function(e,n,t,i,o,r,a,s,l,c,m,d,u,p){"use strict";var f=function(){function e(e,n){this.http=e,this.configService=n,this.valtimoApiConfig=n.config.valtimoApi}return e.prototype.getFormDefinition=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"form-management/"+e)},e.prototype.queryFormDefinitions=function(e){return this.http.get(this.valtimoApiConfig.endpointUri+"form-management",{observe:"response",params:e})},e.prototype.createFormDefinition=function(e){return this.http.post(this.valtimoApiConfig.endpointUri+"form-management",e)},e.prototype.modifyFormDefinition=function(e){return this.http.put(this.valtimoApiConfig.endpointUri+"form-management",e)},e.prototype.deleteFormDefinition=function(e){return this.http.delete(this.valtimoApiConfig.endpointUri+"form-management/"+e)},e}();f.ɵprov=n.ɵɵdefineInjectable({factory:function(){return new f(n.ɵɵinject(t.HttpClient),n.ɵɵinject(i.ConfigService))},token:f,providedIn:"root"}),f.decorators=[{type:n.Injectable,args:[{providedIn:"root"}]}],f.ctorParameters=function(){return[{type:t.HttpClient},{type:i.ConfigService}]};var h=function(){function e(){}return e.prototype.ngOnInit=function(){},e}();h.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content pt-0">\n <div class="container-fluid">\n <div class="text-right">\n <div class="btn-group mt-m3px mb-3">\n <button\n [routerLink]="\'create\'"\n [queryParams]="{upload: \'true\'}"\n class="btn btn-secondary btn-space"\n >\n <i class="icon mdi mdi-upload mr-1"></i>\n {{ \'Upload\' | translate }}\n </button>\n <button [routerLink]="\'create\'" class="btn btn-primary btn-space mr-0">\n <i class="icon mdi mdi-plus mr-1"></i>\n <span>{{ \'Create new Form\' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-widget>\n <valtimo-form-management-list></valtimo-form-management-list>\n </valtimo-widget>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],h.ctorParameters=function(){return[]};Object.create;function b(e,n){var t="function"==typeof Symbol&&e[Symbol.iterator];if(!t)return e;var i,o,r=t.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(t=r.return)&&t.call(r)}finally{if(o)throw o.error}}return a}Object.create;var g=function(){function e(e,n,t,i,o){this.formManagementService=e,this.formBuilder=n,this.router=t,this.alertService=i,this.route=o}return Object.defineProperty(e.prototype,"formControls",{get:function(){return this.form.controls},enumerable:!1,configurable:!0}),e.prototype.ngOnInit=function(){this.form=this.formBuilder.group({name:new a.FormControl("",a.Validators.required)})},e.prototype.reset=function(){this.form.setValue({name:""})},e.prototype.createFormDefinition=function(){var e=this,n={name:this.form.value.name,formDefinition:JSON.stringify({display:"form",components:[]})};l.combineLatest([this.formManagementService.createFormDefinition(n),this.route.queryParams]).pipe(c.take(1)).subscribe((function(n){var t=b(n,2),i=t[0],o=t[1];e.alertService.success("Created new Form"),"true"===(null==o?void 0:o.upload)?e.router.navigate(["/form-management/edit",i.id],{queryParams:{upload:"true"}}):e.router.navigate(["/form-management/edit",i.id])}),(function(n){e.alertService.error("Error creating new Form")}))},e}();g.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management-create",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content">\n <div class="container-fluid">\n <div class="col-12 px-0 mb-5">\n <valtimo-widget>\n <div class="bg-white p-5">\n <form [formGroup]="form" (ngSubmit)="createFormDefinition()">\n <div class="form-group row">\n <label class="col-12 col-sm-3 col-form-label text-sm-right" for="name">{{\n \'formManagement.name\' | translate\n }}</label>\n <div class="col-12 col-sm-8 col-lg-6">\n <input\n type="text"\n id="name"\n formControlName="name"\n class="form-control"\n placeholder="Form definition name"\n [ngClass]="{\n \'is-valid\': formControls.name.touched && formControls.name.valid,\n \'is-invalid\': formControls.name.touched && formControls.name.errors\n }"\n required\n />\n <div\n *ngIf="formControls.name.touched && formControls.name.errors"\n class="invalid-feedback"\n >\n <div *ngIf="formControls.name.errors.required">\n {{ \'formManagement.nameIsRequired\' | translate }}\n </div>\n </div>\n </div>\n </div>\n <div class="row pt-3 mt-1">\n <div class="col-12 col-sm-6 text-left">\n <a [routerLink]="\'/forms\'" class="btn btn-space btn-default">{{\n \'formManagement.back\' | translate\n }}</a>\n </div>\n <div class="col-12 col-sm-6 text-right">\n <button class="btn btn-space btn-secondary" type="button" (click)="reset()">\n {{ \'formManagement.reset\' | translate }}\n </button>\n <button class="btn btn-space btn-primary" type="submit" [disabled]="form.invalid">\n {{ \'formManagement.submit\' | translate }}\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],g.ctorParameters=function(){return[{type:f},{type:a.FormBuilder},{type:o.Router},{type:s.AlertService},{type:o.ActivatedRoute}]};var v=function(){function e(e,n,t,i){this.formManagementService=e,this.alertService=n,this.route=t,this.router=i,this.showModal$=new l.BehaviorSubject(!1),this.reloading$=new l.BehaviorSubject(!1),this.modifiedFormDefinition=null,this.formDefinition=null,this.alertSub=l.Subscription.EMPTY,this.formDefinitionId=null}return e.prototype.ngOnInit=function(){this.loadFormDefinition(),this.checkToOpenUploadModal()},e.prototype.ngOnDestroy=function(){this.alertSub.unsubscribe()},e.prototype.loadFormDefinition=function(){var e=this;this.formDefinitionId=this.route.snapshot.paramMap.get("id"),this.formManagementService.getFormDefinition(this.formDefinitionId).subscribe((function(n){e.formDefinition=n}),(function(){e.alertService.error("Error retrieving Form Definition")}))},e.prototype.modifyFormDefinition=function(){var e=this,n=JSON.stringify(null!=this.modifiedFormDefinition?this.modifiedFormDefinition:this.formDefinition.formDefinition),t={id:this.formDefinition.id,name:this.formDefinition.name,formDefinition:n};this.formManagementService.modifyFormDefinition(t).subscribe((function(){e.router.navigate(["/form-management"]),e.alertService.success("Form deployed")}),(function(n){e.alertService.error("Error deploying Form")}))},e.prototype.formBuilderChanged=function(e){this.modifiedFormDefinition=e.form},e.prototype.delete=function(){var e=this;if(this.alertSub.closed){this.alertService.notification("Delete Form?",[{label:"Cancel",class:"btn btn-default",value:!1},{label:"Delete",class:"btn btn-primary",value:!0}]),this.alertSub=this.alertService.getAlertConfirmChangeEmitter().pipe(c.first()).subscribe((function(n){!0===n.confirm&&e.deleteFormDefinition()}))}},e.prototype.deleteFormDefinition=function(){var e=this;this.formManagementService.deleteFormDefinition(this.formDefinition.id).subscribe((function(){e.router.navigate(["/form-management"]),e.alertService.success("Form deleted")}),(function(n){e.alertService.error("Error deleting Form")}))},e.prototype.downloadFormDefinition=function(){var e=new Blob([JSON.stringify(this.formDefinition)],{type:"text/json"}),n=document.createElement("a");n.download="form_"+this.formDefinition.name+".json",n.href=window.URL.createObjectURL(e),n.click(),window.URL.revokeObjectURL(n.href),n.remove()},e.prototype.showModal=function(){this.showModal$.next(!0)},e.prototype.setFormDefinition=function(e){var n;this.reloading$.next(!0);var t=JSON.parse(e),i=null===(n=null==t?void 0:t.formDefinition)||void 0===n?void 0:n.components,o=this.modifiedFormDefinition||this.formDefinition.formDefinition,r=Object.assign(Object.assign({},o),i&&{components:i});this.modifiedFormDefinition=r,this.formDefinition.formDefinition=r,this.reloading$.next(!1)},e.prototype.checkToOpenUploadModal=function(){var e=this;this.route.queryParams.pipe(c.take(1)).subscribe((function(n){"true"===(null==n?void 0:n.upload)&&e.showModal()}))},e}();v.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management-edit",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="main-content pt-0">\n <div class="container-fluid" *ngIf="formDefinition">\n <div class="btn-group mt-m3px mb-3 float-right">\n <button class="btn btn-primary btn-space" (click)="downloadFormDefinition()">\n <i class="icon mdi mdi-download mr-1"></i>\n {{ \'Download\' | translate }}\n </button>\n <button\n class="btn btn-secondary btn-space"\n (click)="showModal()"\n [disabled]="formDefinition.readOnly"\n >\n <i class="icon mdi mdi-upload mr-1"></i>\n {{ \'Upload\' | translate }}\n </button>\n <button\n class="btn btn-danger btn-space"\n (click)="delete()"\n [disabled]="formDefinition.readOnly"\n >\n <i class="icon mdi mdi-delete mr-1"></i>{{ \'formManagement.delete\' | translate }}\n </button>\n <button\n class="btn btn-success btn-space"\n (click)="modifyFormDefinition()"\n [disabled]="formDefinition.readOnly"\n >\n <i class="icon mdi mdi-upload mr-1"></i>{{ \'formManagement.deploy\' | translate }}\n </button>\n </div>\n <div class="clearfix"></div>\n <div class="bg-light formbuilder-header overflow-auto">\n <h3 class="formbuilder-title">\n {{ formDefinition.name }}\n <div *ngIf="formDefinition.readOnly" class="pull-right">\n <span class="badge badge-pill badge-info increase-size">{{\n \'formManagement.readOnly\' | translate\n }}</span>\n </div>\n </h3>\n </div>\n <ng-container *ngIf="!(reloading$ | async)">\n <valtimo-form-io-builder\n [form]="formDefinition.formDefinition"\n (change)="formBuilderChanged($event)"\n ></valtimo-form-io-builder>\n </ng-container>\n </div>\n</div>\n\n<valtimo-form-management-upload\n [show$]="showModal$"\n (definitionUploaded)="setFormDefinition($event)"\n></valtimo-form-management-upload>\n',encapsulation:n.ViewEncapsulation.None,styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */.btn.formcomponent.gu-mirror,.formbuilder .btn.formcomponent.drag-copy{background-color:silver;border-color:silver;color:#fff;font-weight:400}.btn.formcomponent.gu-mirror:active,.btn.formcomponent.gu-mirror:hover,.formbuilder .btn.formcomponent.drag-copy:active,.formbuilder .btn.formcomponent.drag-copy:hover{box-shadow:none}.btn.formcomponent.gu-mirror:active,.formbuilder .btn.formcomponent.drag-copy:active{background-color:silver;border-color:silver}.formbuilder-header{border:1px solid #dee2e6;border-bottom:0;font-size:18px;height:80px;padding-left:18px;padding-right:18px}.formbuilder-header .formbuilder-title{margin-bottom:7px;margin-top:21px}.formbuilder-header .formbuilder-subtitle{margin-bottom:12px;margin-top:0}.formbuilder{background:#fff;border:1px solid #dee2e6;margin-left:0!important;margin-right:0!important;padding:1rem}.formbuilder .form-builder-panel .builder-group-button[aria-expanded=""],.formbuilder .form-builder-panel .builder-group-button[aria-expanded=false]{color:#a9a9a9}.formbuilder .form-builder-panel .builder-group-button[aria-expanded=true]{color:#000}.formbuilder .drag-and-drop-alert{display:none}.formbuilder .formarea{background-color:#fff;border:1px solid silver;padding:10px}.increase-size{font-size:1rem}']}]}],v.ctorParameters=function(){return[{type:f},{type:s.AlertService},{type:o.ActivatedRoute},{type:o.Router}]};var y={title:"Form management",roles:[i.ROLE_ADMIN]},S={title:"Create new Form",roles:[i.ROLE_ADMIN]},D={title:"Form Builder",roles:[i.ROLE_ADMIN]},w=[{path:"form-management",component:h,canActivate:[r.AuthGuardService],data:y},{path:"form-management/create",component:g,canActivate:[r.AuthGuardService],data:S},{path:"form-management/edit/:id",component:v,canActivate:[r.AuthGuardService],data:D}],x=function(){};x.decorators=[{type:n.NgModule,args:[{imports:[o.RouterModule.forChild(w)],exports:[o.RouterModule],declarations:[]}]}];var F=function(){function e(e,n){this.formManagementService=e,this.router=n,this.formDefinitions=[],this.formDefinitionFields=[{key:"name",label:"Name"},{key:"readOnly",label:"Read-only"}],this.pagination={collectionSize:0,page:1,size:10,maxPaginationItemSize:5},this.pageParam=0}return e.prototype.paginationClicked=function(e){this.pageParam=e-1,this.loadFormDefinitions()},e.prototype.ngOnInit=function(){},e.prototype.paginationSet=function(){this.loadFormDefinitions()},e.prototype.loadFormDefinitions=function(e){var n=this,t={page:this.pageParam,size:this.pagination.size};e&&(t.searchTerm=e),this.formManagementService.queryFormDefinitions(t).subscribe((function(e){n.pagination.collectionSize=e.body.totalElements,n.formDefinitions=e.body.content}))},e.prototype.editFormDefinition=function(e){this.router.navigate(["/form-management/edit",e.id])},e.prototype.searchTermEntered=function(e){this.loadFormDefinitions(e)},e}();F.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management-list",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<valtimo-list\n [items]="formDefinitions"\n [fields]="formDefinitionFields"\n [viewMode]="true"\n [isSearchable]="true"\n [pagination]="pagination"\n paginationIdentifier="formManagementList"\n (paginationClicked)="paginationClicked($event)"\n (paginationSet)="paginationSet()"\n (rowClicked)="editFormDefinition($event)"\n [header]="true"\n (search)="searchTermEntered($event)"\n>\n <div header>\n <h3 class="list-header-title">{{ \'Forms\' | translate }}</h3>\n <h5 class="list-header-description">{{ \'Overview of all Forms\' | translate }}</h5>\n </div>\n</valtimo-list>\n',styles:['/*!\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */']}]}],F.ctorParameters=function(){return[{type:f},{type:o.Router}]};var L=function(){function e(e,t){this.documentService=e,this.translateService=t,this.definitionUploaded=new n.EventEmitter,this.clear$=new l.Subject,this.jsonString$=new l.BehaviorSubject(""),this.error$=new l.BehaviorSubject(""),this.disabled$=new l.BehaviorSubject(!1),this.file$=new l.BehaviorSubject(void 0)}return e.prototype.ngAfterViewInit=function(){this.openShowSubscription(),this.openFileSubscription()},e.prototype.ngOnDestroy=function(){this.showSubscription.unsubscribe(),this.fileSubscription.unsubscribe(),this.closeErrorSubscription()},e.prototype.setFile=function(e){this.clearError(),this.file$.next(e)},e.prototype.uploadDefinition=function(){var e=this;this.disable(),this.jsonString$.pipe(c.take(1)).subscribe((function(n){e.closeErrorSubscription(),e.clearError(),e.enable(),e.hideModal(),e.definitionUploaded.emit(n)}))},e.prototype.openErrorSubscription=function(e){var n=this;this.closeErrorSubscription(),this.errorSubscription=this.translateService.stream(e).subscribe((function(e){n.error$.next(e)}))},e.prototype.closeErrorSubscription=function(){this.errorSubscription&&this.errorSubscription.unsubscribe()},e.prototype.clearError=function(){this.error$.next("")},e.prototype.openFileSubscription=function(){var e=this;this.fileSubscription=this.file$.subscribe((function(n){if(n){var t=new FileReader;t.onloadend=function(){var n=t.result.toString();e.stringIsValidJson(n)&&e.jsonString$.next(n)},t.readAsText(n)}else e.clearJsonString()}))},e.prototype.openShowSubscription=function(){var e=this;this.showSubscription=this.show$.subscribe((function(n){n?e.showModal():e.hideModal(),e.clearJsonString(),e.clearError(),e.clearDropzone()}))},e.prototype.clearJsonString=function(){this.jsonString$.next("")},e.prototype.clearDropzone=function(){this.clear$.next()},e.prototype.showModal=function(){this.modal.show()},e.prototype.hideModal=function(){this.modal.hide()},e.prototype.stringIsValidJson=function(e){var n,t;try{null===(t=null===(n=JSON.parse(e))||void 0===n?void 0:n.formDefinition)||void 0===t||t.components}catch(e){return this.clearDropzone(),this.openErrorSubscription("dropzone.error.invalidFormDef"),!1}return!0},e.prototype.disable=function(){this.disabled$.next(!0)},e.prototype.enable=function(){this.disabled$.next(!1)},e}();L.decorators=[{type:n.Component,args:[{selector:"valtimo-form-management-upload",template:'<valtimo-modal\n #uploadFormDefinitionModal\n [title]="\'uploadFormDefinition\' | translate"\n showFooter="true"\n>\n <div class="mt-2" body>\n <valtimo-dropzone\n [clear$]="clear$"\n (fileSelected)="setFile($event)"\n [disabled]="disabled$ | async"\n [subtitle]="\'dropzone.formJsonDocDef\' | translate"\n [externalError$]="error$"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf="(jsonString$ | async) && !(error$ | async); else pleaseSelect">\n <button [disabled]="disabled$ | async" class="btn btn-primary" (click)="uploadDefinition()">\n {{ \'Upload\' | translate }}\n </button>\n </ng-container>\n </div>\n</valtimo-modal>\n\n<ng-template #pleaseSelect>\n <button class="btn btn-primary" [disabled]="true">\n {{ \'Select a document definition\' | translate }}\n </button>\n</ng-template>\n',styles:[""]}]}],L.ctorParameters=function(){return[{type:p.DocumentService},{type:d.TranslateService}]},L.propDecorators={modal:[{type:n.ViewChild,args:["uploadFormDefinitionModal"]}],show$:[{type:n.Input}],definitionUploaded:[{type:n.Output}]};var I=function(){};I.decorators=[{type:n.NgModule,args:[{declarations:[h,g,F,v,L],imports:[x,s.FormIoModule,m.CommonModule,a.ReactiveFormsModule,a.FormsModule,s.WidgetModule,s.ListModule,d.TranslateModule,u.NgbTooltipModule,s.DropzoneModule,s.ModalModule],exports:[h]}]}],e.FormManagementComponent=h,e.FormManagementModule=I,e.FormManagementService=f,e.compareFormDefinitions=function(e,n){return null===e&&null===n||null!==e&&null!==n&&e.id===n.id},e.ɵa=g,e.ɵb=F,e.ɵc=v,e.ɵd=L,e.ɵe=x,Object.defineProperty(e,"__esModule",{value:!0})}));
2
2
  //# sourceMappingURL=valtimo-form-management.umd.min.js.map