@valtimo/form-management 4.15.2-next-main.15 → 4.15.3-next-main.16

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.
Files changed (29) hide show
  1. package/README.md +14 -6
  2. package/bundles/valtimo-form-management.umd.js +932 -913
  3. package/bundles/valtimo-form-management.umd.js.map +1 -1
  4. package/bundles/valtimo-form-management.umd.min.js +1 -1
  5. package/bundles/valtimo-form-management.umd.min.js.map +1 -1
  6. package/esm2015/lib/form-management-create/form-management-create.component.js +87 -82
  7. package/esm2015/lib/form-management-edit/form-management-edit.component.js +149 -147
  8. package/esm2015/lib/form-management-list/form-management-list.component.js +72 -73
  9. package/esm2015/lib/form-management-routing.module.js +54 -58
  10. package/esm2015/lib/form-management-upload/form-management-upload.component.js +148 -150
  11. package/esm2015/lib/form-management.component.js +29 -31
  12. package/esm2015/lib/form-management.module.js +55 -55
  13. package/esm2015/lib/form-management.service.js +57 -54
  14. package/esm2015/public-api.js +22 -22
  15. package/esm2015/valtimo-form-management.js +10 -10
  16. package/fesm2015/valtimo-form-management.js +602 -601
  17. package/fesm2015/valtimo-form-management.js.map +1 -1
  18. package/lib/form-management-create/form-management-create.component.d.ts +20 -20
  19. package/lib/form-management-edit/form-management-edit.component.d.ts +31 -31
  20. package/lib/form-management-list/form-management-list.component.d.ts +24 -24
  21. package/lib/form-management-routing.module.d.ts +2 -2
  22. package/lib/form-management-upload/form-management-upload.component.d.ts +37 -37
  23. package/lib/form-management.component.d.ts +5 -5
  24. package/lib/form-management.module.d.ts +2 -2
  25. package/lib/form-management.service.d.ts +15 -15
  26. package/package.json +1 -1
  27. package/public-api.d.ts +3 -3
  28. package/valtimo-form-management.d.ts +9 -9
  29. package/valtimo-form-management.metadata.json +1 -1
@@ -13,625 +13,626 @@ import { TranslateService, TranslateModule } from '@ngx-translate/core';
13
13
  import { NgbTooltipModule } from '@ng-bootstrap/ng-bootstrap';
14
14
  import { DocumentService } from '@valtimo/document';
15
15
 
16
- /*
17
- * Copyright 2015-2020 Ritense BV, the Netherlands.
18
- *
19
- * Licensed under EUPL, Version 1.2 (the "License");
20
- * you may not use this file except in compliance with the License.
21
- * You may obtain a copy of the License at
22
- *
23
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
24
- *
25
- * Unless required by applicable law or agreed to in writing, software
26
- * distributed under the License is distributed on an "AS IS" basis,
27
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
- * See the License for the specific language governing permissions and
29
- * limitations under the License.
30
- */
31
- class FormManagementService {
32
- constructor(http, configService) {
33
- this.http = http;
34
- this.configService = configService;
35
- this.valtimoApiConfig = configService.config.valtimoApi;
36
- }
37
- getFormDefinition(formDefinitionId) {
38
- return this.http.get(`${this.valtimoApiConfig.endpointUri}form-management/${formDefinitionId}`);
39
- }
40
- queryFormDefinitions(params) {
41
- return this.http.get(`${this.valtimoApiConfig.endpointUri}form-management`, { observe: 'response', params: params });
42
- }
43
- createFormDefinition(request) {
44
- return this.http.post(`${this.valtimoApiConfig.endpointUri}form-management`, request);
45
- }
46
- modifyFormDefinition(request) {
47
- return this.http.put(`${this.valtimoApiConfig.endpointUri}form-management`, request);
48
- }
49
- deleteFormDefinition(formDefinitionId) {
50
- return this.http.delete(`${this.valtimoApiConfig.endpointUri}form-management/${formDefinitionId}`);
51
- }
52
- }
53
- FormManagementService.ɵprov = ɵɵdefineInjectable({ factory: function FormManagementService_Factory() { return new FormManagementService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: FormManagementService, providedIn: "root" });
54
- FormManagementService.decorators = [
55
- { type: Injectable, args: [{
56
- providedIn: 'root'
57
- },] }
58
- ];
59
- FormManagementService.ctorParameters = () => [
60
- { type: HttpClient },
61
- { type: ConfigService }
16
+ /*
17
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
18
+ *
19
+ * Licensed under EUPL, Version 1.2 (the "License");
20
+ * you may not use this file except in compliance with the License.
21
+ * You may obtain a copy of the License at
22
+ *
23
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
24
+ *
25
+ * Unless required by applicable law or agreed to in writing, software
26
+ * distributed under the License is distributed on an "AS IS" basis,
27
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
+ * See the License for the specific language governing permissions and
29
+ * limitations under the License.
30
+ */
31
+ class FormManagementService {
32
+ constructor(http, configService) {
33
+ this.http = http;
34
+ this.configService = configService;
35
+ this.valtimoApiConfig = configService.config.valtimoApi;
36
+ }
37
+ getFormDefinition(formDefinitionId) {
38
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}form-management/${formDefinitionId}`);
39
+ }
40
+ queryFormDefinitions(params) {
41
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}form-management`, {
42
+ observe: 'response',
43
+ params: params,
44
+ });
45
+ }
46
+ createFormDefinition(request) {
47
+ return this.http.post(`${this.valtimoApiConfig.endpointUri}form-management`, request);
48
+ }
49
+ modifyFormDefinition(request) {
50
+ return this.http.put(`${this.valtimoApiConfig.endpointUri}form-management`, request);
51
+ }
52
+ deleteFormDefinition(formDefinitionId) {
53
+ return this.http.delete(`${this.valtimoApiConfig.endpointUri}form-management/${formDefinitionId}`);
54
+ }
55
+ }
56
+ FormManagementService.ɵprov = ɵɵdefineInjectable({ factory: function FormManagementService_Factory() { return new FormManagementService(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: FormManagementService, providedIn: "root" });
57
+ FormManagementService.decorators = [
58
+ { type: Injectable, args: [{
59
+ providedIn: 'root',
60
+ },] }
61
+ ];
62
+ FormManagementService.ctorParameters = () => [
63
+ { type: HttpClient },
64
+ { type: ConfigService }
62
65
  ];
63
66
 
64
- /*
65
- * Copyright 2015-2020 Ritense BV, the Netherlands.
66
- *
67
- * Licensed under EUPL, Version 1.2 (the "License");
68
- * you may not use this file except in compliance with the License.
69
- * You may obtain a copy of the License at
70
- *
71
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
72
- *
73
- * Unless required by applicable law or agreed to in writing, software
74
- * distributed under the License is distributed on an "AS IS" basis,
75
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
76
- * See the License for the specific language governing permissions and
77
- * limitations under the License.
78
- */
79
- class FormManagementComponent {
80
- constructor() {
81
- }
82
- ngOnInit() {
83
- }
84
- }
85
- FormManagementComponent.decorators = [
86
- { type: Component, args: [{
87
- selector: 'valtimo-form-management',
88
- 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 [routerLink]=\"'create'\" [queryParams]=\"{'upload': 'true'}\" class=\"btn btn-secondary btn-space\">\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",
89
- 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 */"]
90
- },] }
91
- ];
67
+ /*
68
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
69
+ *
70
+ * Licensed under EUPL, Version 1.2 (the "License");
71
+ * you may not use this file except in compliance with the License.
72
+ * You may obtain a copy of the License at
73
+ *
74
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
75
+ *
76
+ * Unless required by applicable law or agreed to in writing, software
77
+ * distributed under the License is distributed on an "AS IS" basis,
78
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
79
+ * See the License for the specific language governing permissions and
80
+ * limitations under the License.
81
+ */
82
+ class FormManagementComponent {
83
+ constructor() { }
84
+ ngOnInit() { }
85
+ }
86
+ FormManagementComponent.decorators = [
87
+ { type: Component, args: [{
88
+ selector: 'valtimo-form-management',
89
+ 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",
90
+ 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 */"]
91
+ },] }
92
+ ];
92
93
  FormManagementComponent.ctorParameters = () => [];
93
94
 
94
- /*
95
- * Copyright 2015-2020 Ritense BV, the Netherlands.
96
- *
97
- * Licensed under EUPL, Version 1.2 (the "License");
98
- * you may not use this file except in compliance with the License.
99
- * You may obtain a copy of the License at
100
- *
101
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
102
- *
103
- * Unless required by applicable law or agreed to in writing, software
104
- * distributed under the License is distributed on an "AS IS" basis,
105
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
106
- * See the License for the specific language governing permissions and
107
- * limitations under the License.
108
- */
109
- class FormManagementCreateComponent {
110
- constructor(formManagementService, formBuilder, router, alertService, route) {
111
- this.formManagementService = formManagementService;
112
- this.formBuilder = formBuilder;
113
- this.router = router;
114
- this.alertService = alertService;
115
- this.route = route;
116
- }
117
- get formControls() {
118
- return this.form.controls;
119
- }
120
- ngOnInit() {
121
- this.form = this.formBuilder.group({
122
- name: new FormControl('', Validators.required)
123
- });
124
- }
125
- reset() {
126
- this.form.setValue({
127
- name: ''
128
- });
129
- }
130
- createFormDefinition() {
131
- const emptyForm = {
132
- display: 'form',
133
- components: []
134
- };
135
- const request = {
136
- name: this.form.value.name,
137
- formDefinition: JSON.stringify(emptyForm)
138
- };
139
- combineLatest([this.formManagementService.createFormDefinition(request), this.route.queryParams])
140
- .pipe(take(1))
141
- .subscribe(([formDefinition, params]) => {
142
- this.alertService.success('Created new Form');
143
- if ((params === null || params === void 0 ? void 0 : params.upload) === 'true') {
144
- this.router.navigate(['/form-management/edit', formDefinition.id], { queryParams: { upload: 'true' } });
145
- }
146
- else {
147
- this.router.navigate(['/form-management/edit', formDefinition.id]);
148
- }
149
- }, err => {
150
- this.alertService.error('Error creating new Form');
151
- });
152
- }
153
- }
154
- FormManagementCreateComponent.decorators = [
155
- { type: Component, args: [{
156
- selector: 'valtimo-form-management-create',
157
- 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 type=\"text\" id=\"name\" formControlName=\"name\"\n class=\"form-control\" placeholder=\"Form definition name\"\n [ngClass]=\"{'is-valid': formControls.name.touched && formControls.name.valid, 'is-invalid': formControls.name.touched && formControls.name.errors}\"\n required/>\n <div *ngIf=\"formControls.name.touched && formControls.name.errors\"\n class=\"invalid-feedback\">\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()\">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",
158
- 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 */"]
159
- },] }
160
- ];
161
- FormManagementCreateComponent.ctorParameters = () => [
162
- { type: FormManagementService },
163
- { type: FormBuilder },
164
- { type: Router },
165
- { type: AlertService },
166
- { type: ActivatedRoute }
95
+ /*
96
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
97
+ *
98
+ * Licensed under EUPL, Version 1.2 (the "License");
99
+ * you may not use this file except in compliance with the License.
100
+ * You may obtain a copy of the License at
101
+ *
102
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
103
+ *
104
+ * Unless required by applicable law or agreed to in writing, software
105
+ * distributed under the License is distributed on an "AS IS" basis,
106
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
107
+ * See the License for the specific language governing permissions and
108
+ * limitations under the License.
109
+ */
110
+ class FormManagementCreateComponent {
111
+ constructor(formManagementService, formBuilder, router, alertService, route) {
112
+ this.formManagementService = formManagementService;
113
+ this.formBuilder = formBuilder;
114
+ this.router = router;
115
+ this.alertService = alertService;
116
+ this.route = route;
117
+ }
118
+ get formControls() {
119
+ return this.form.controls;
120
+ }
121
+ ngOnInit() {
122
+ this.form = this.formBuilder.group({
123
+ name: new FormControl('', Validators.required),
124
+ });
125
+ }
126
+ reset() {
127
+ this.form.setValue({
128
+ name: '',
129
+ });
130
+ }
131
+ createFormDefinition() {
132
+ const emptyForm = {
133
+ display: 'form',
134
+ components: [],
135
+ };
136
+ const request = {
137
+ name: this.form.value.name,
138
+ formDefinition: JSON.stringify(emptyForm),
139
+ };
140
+ combineLatest([
141
+ this.formManagementService.createFormDefinition(request),
142
+ this.route.queryParams,
143
+ ])
144
+ .pipe(take(1))
145
+ .subscribe(([formDefinition, params]) => {
146
+ this.alertService.success('Created new Form');
147
+ if ((params === null || params === void 0 ? void 0 : params.upload) === 'true') {
148
+ this.router.navigate(['/form-management/edit', formDefinition.id], {
149
+ queryParams: { upload: 'true' },
150
+ });
151
+ }
152
+ else {
153
+ this.router.navigate(['/form-management/edit', formDefinition.id]);
154
+ }
155
+ }, err => {
156
+ this.alertService.error('Error creating new Form');
157
+ });
158
+ }
159
+ }
160
+ FormManagementCreateComponent.decorators = [
161
+ { type: Component, args: [{
162
+ selector: 'valtimo-form-management-create',
163
+ 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",
164
+ 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 */"]
165
+ },] }
166
+ ];
167
+ FormManagementCreateComponent.ctorParameters = () => [
168
+ { type: FormManagementService },
169
+ { type: FormBuilder },
170
+ { type: Router },
171
+ { type: AlertService },
172
+ { type: ActivatedRoute }
167
173
  ];
168
174
 
169
- /*
170
- * Copyright 2015-2020 Ritense BV, the Netherlands.
171
- *
172
- * Licensed under EUPL, Version 1.2 (the "License");
173
- * you may not use this file except in compliance with the License.
174
- * You may obtain a copy of the License at
175
- *
176
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
177
- *
178
- * Unless required by applicable law or agreed to in writing, software
179
- * distributed under the License is distributed on an "AS IS" basis,
180
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
181
- * See the License for the specific language governing permissions and
182
- * limitations under the License.
183
- */
184
- class FormManagementEditComponent {
185
- constructor(formManagementService, alertService, route, router) {
186
- this.formManagementService = formManagementService;
187
- this.alertService = alertService;
188
- this.route = route;
189
- this.router = router;
190
- this.showModal$ = new BehaviorSubject(false);
191
- this.reloading$ = new BehaviorSubject(false);
192
- this.modifiedFormDefinition = null;
193
- this.formDefinition = null;
194
- this.alertSub = Subscription.EMPTY;
195
- this.formDefinitionId = null;
196
- }
197
- ngOnInit() {
198
- this.loadFormDefinition();
199
- this.checkToOpenUploadModal();
200
- }
201
- ngOnDestroy() {
202
- this.alertSub.unsubscribe();
203
- }
204
- loadFormDefinition() {
205
- this.formDefinitionId = this.route.snapshot.paramMap.get('id');
206
- this.formManagementService.getFormDefinition(this.formDefinitionId).subscribe(formDefinition => {
207
- this.formDefinition = formDefinition;
208
- }, () => {
209
- this.alertService.error('Error retrieving Form Definition');
210
- });
211
- }
212
- modifyFormDefinition() {
213
- const form = JSON.stringify(this.modifiedFormDefinition != null ? this.modifiedFormDefinition : this.formDefinition.formDefinition);
214
- const request = {
215
- id: this.formDefinition.id,
216
- name: this.formDefinition.name,
217
- formDefinition: form
218
- };
219
- this.formManagementService.modifyFormDefinition(request).subscribe(() => {
220
- this.router.navigate(['/form-management']);
221
- this.alertService.success('Form deployed');
222
- }, err => {
223
- this.alertService.error('Error deploying Form');
224
- });
225
- }
226
- formBuilderChanged(event) {
227
- this.modifiedFormDefinition = event.form;
228
- }
229
- delete() {
230
- if (!this.alertSub.closed) {
231
- return;
232
- }
233
- const mssg = 'Delete Form?';
234
- const confirmations = [
235
- {
236
- label: 'Cancel',
237
- class: 'btn btn-default',
238
- value: false
239
- },
240
- {
241
- label: 'Delete',
242
- class: 'btn btn-primary',
243
- value: true
244
- }
245
- ];
246
- this.alertService.notification(mssg, confirmations);
247
- this.alertSub = this.alertService.getAlertConfirmChangeEmitter()
248
- .pipe(first())
249
- .subscribe(alert => {
250
- if (alert.confirm === true) {
251
- this.deleteFormDefinition();
252
- }
253
- });
254
- }
255
- deleteFormDefinition() {
256
- this.formManagementService.deleteFormDefinition(this.formDefinition.id).subscribe(() => {
257
- this.router.navigate(['/form-management']);
258
- this.alertService.success('Form deleted');
259
- }, err => {
260
- this.alertService.error('Error deleting Form');
261
- });
262
- }
263
- downloadFormDefinition() {
264
- const file = new Blob([JSON.stringify(this.formDefinition)], { type: 'text/json' });
265
- const link = document.createElement('a');
266
- link.download = `form_${this.formDefinition.name}.json`;
267
- link.href = window.URL.createObjectURL(file);
268
- link.click();
269
- window.URL.revokeObjectURL(link.href);
270
- link.remove();
271
- }
272
- showModal() {
273
- this.showModal$.next(true);
274
- }
275
- setFormDefinition(formDefinition) {
276
- var _a;
277
- this.reloading$.next(true);
278
- const definition = JSON.parse(formDefinition);
279
- const components = (_a = definition === null || definition === void 0 ? void 0 : definition.formDefinition) === null || _a === void 0 ? void 0 : _a.components;
280
- const currentDefinition = this.modifiedFormDefinition || this.formDefinition.formDefinition;
281
- const newDefinition = Object.assign(Object.assign({}, currentDefinition), (components && { components }));
282
- this.modifiedFormDefinition = newDefinition;
283
- this.formDefinition.formDefinition = newDefinition;
284
- this.reloading$.next(false);
285
- }
286
- checkToOpenUploadModal() {
287
- this.route.queryParams.pipe(take(1))
288
- .subscribe((params) => {
289
- if ((params === null || params === void 0 ? void 0 : params.upload) === 'true') {
290
- this.showModal();
291
- }
292
- });
293
- }
294
- }
295
- FormManagementEditComponent.decorators = [
296
- { type: Component, args: [{
297
- selector: 'valtimo-form-management-edit',
298
- 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 class=\"btn btn-secondary btn-space\" (click)=\"showModal()\" [disabled]=\"formDefinition.readOnly\">\n <i class=\"icon mdi mdi-upload\"></i>&nbsp;\n {{ 'Upload' | translate }}\n </button>\n <button class='btn btn-danger btn-space' (click)=\"delete()\" [disabled]=\"formDefinition.readOnly\">\n <i class=\"fa fa-trash\"></i>&nbsp;Delete\n </button>\n <button class='btn btn-success btn-space' (click)=\"modifyFormDefinition()\" [disabled]=\"formDefinition.readOnly\">\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\">{{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 [form]=\"formDefinition.formDefinition\" (change)=\"formBuilderChanged($event)\"></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",
299
- encapsulation: ViewEncapsulation.None,
300
- 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}"]
301
- },] }
302
- ];
303
- FormManagementEditComponent.ctorParameters = () => [
304
- { type: FormManagementService },
305
- { type: AlertService },
306
- { type: ActivatedRoute },
307
- { type: Router }
175
+ /*
176
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
177
+ *
178
+ * Licensed under EUPL, Version 1.2 (the "License");
179
+ * you may not use this file except in compliance with the License.
180
+ * You may obtain a copy of the License at
181
+ *
182
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
183
+ *
184
+ * Unless required by applicable law or agreed to in writing, software
185
+ * distributed under the License is distributed on an "AS IS" basis,
186
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
187
+ * See the License for the specific language governing permissions and
188
+ * limitations under the License.
189
+ */
190
+ class FormManagementEditComponent {
191
+ constructor(formManagementService, alertService, route, router) {
192
+ this.formManagementService = formManagementService;
193
+ this.alertService = alertService;
194
+ this.route = route;
195
+ this.router = router;
196
+ this.showModal$ = new BehaviorSubject(false);
197
+ this.reloading$ = new BehaviorSubject(false);
198
+ this.modifiedFormDefinition = null;
199
+ this.formDefinition = null;
200
+ this.alertSub = Subscription.EMPTY;
201
+ this.formDefinitionId = null;
202
+ }
203
+ ngOnInit() {
204
+ this.loadFormDefinition();
205
+ this.checkToOpenUploadModal();
206
+ }
207
+ ngOnDestroy() {
208
+ this.alertSub.unsubscribe();
209
+ }
210
+ loadFormDefinition() {
211
+ this.formDefinitionId = this.route.snapshot.paramMap.get('id');
212
+ this.formManagementService.getFormDefinition(this.formDefinitionId).subscribe(formDefinition => {
213
+ this.formDefinition = formDefinition;
214
+ }, () => {
215
+ this.alertService.error('Error retrieving Form Definition');
216
+ });
217
+ }
218
+ modifyFormDefinition() {
219
+ const form = JSON.stringify(this.modifiedFormDefinition != null
220
+ ? this.modifiedFormDefinition
221
+ : this.formDefinition.formDefinition);
222
+ const request = {
223
+ id: this.formDefinition.id,
224
+ name: this.formDefinition.name,
225
+ formDefinition: form,
226
+ };
227
+ this.formManagementService.modifyFormDefinition(request).subscribe(() => {
228
+ this.router.navigate(['/form-management']);
229
+ this.alertService.success('Form deployed');
230
+ }, err => {
231
+ this.alertService.error('Error deploying Form');
232
+ });
233
+ }
234
+ formBuilderChanged(event) {
235
+ this.modifiedFormDefinition = event.form;
236
+ }
237
+ delete() {
238
+ if (!this.alertSub.closed) {
239
+ return;
240
+ }
241
+ const mssg = 'Delete Form?';
242
+ const confirmations = [
243
+ {
244
+ label: 'Cancel',
245
+ class: 'btn btn-default',
246
+ value: false,
247
+ },
248
+ {
249
+ label: 'Delete',
250
+ class: 'btn btn-primary',
251
+ value: true,
252
+ },
253
+ ];
254
+ this.alertService.notification(mssg, confirmations);
255
+ this.alertSub = this.alertService
256
+ .getAlertConfirmChangeEmitter()
257
+ .pipe(first())
258
+ .subscribe(alert => {
259
+ if (alert.confirm === true) {
260
+ this.deleteFormDefinition();
261
+ }
262
+ });
263
+ }
264
+ deleteFormDefinition() {
265
+ this.formManagementService.deleteFormDefinition(this.formDefinition.id).subscribe(() => {
266
+ this.router.navigate(['/form-management']);
267
+ this.alertService.success('Form deleted');
268
+ }, err => {
269
+ this.alertService.error('Error deleting Form');
270
+ });
271
+ }
272
+ downloadFormDefinition() {
273
+ const file = new Blob([JSON.stringify(this.formDefinition)], { type: 'text/json' });
274
+ const link = document.createElement('a');
275
+ link.download = `form_${this.formDefinition.name}.json`;
276
+ link.href = window.URL.createObjectURL(file);
277
+ link.click();
278
+ window.URL.revokeObjectURL(link.href);
279
+ link.remove();
280
+ }
281
+ showModal() {
282
+ this.showModal$.next(true);
283
+ }
284
+ setFormDefinition(formDefinition) {
285
+ var _a;
286
+ this.reloading$.next(true);
287
+ const definition = JSON.parse(formDefinition);
288
+ const components = (_a = definition === null || definition === void 0 ? void 0 : definition.formDefinition) === null || _a === void 0 ? void 0 : _a.components;
289
+ const currentDefinition = this.modifiedFormDefinition || this.formDefinition.formDefinition;
290
+ const newDefinition = Object.assign(Object.assign({}, currentDefinition), (components && { components }));
291
+ this.modifiedFormDefinition = newDefinition;
292
+ this.formDefinition.formDefinition = newDefinition;
293
+ this.reloading$.next(false);
294
+ }
295
+ checkToOpenUploadModal() {
296
+ this.route.queryParams.pipe(take(1)).subscribe(params => {
297
+ if ((params === null || params === void 0 ? void 0 : params.upload) === 'true') {
298
+ this.showModal();
299
+ }
300
+ });
301
+ }
302
+ }
303
+ FormManagementEditComponent.decorators = [
304
+ { type: Component, args: [{
305
+ selector: 'valtimo-form-management-edit',
306
+ 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",
307
+ encapsulation: ViewEncapsulation.None,
308
+ 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}"]
309
+ },] }
310
+ ];
311
+ FormManagementEditComponent.ctorParameters = () => [
312
+ { type: FormManagementService },
313
+ { type: AlertService },
314
+ { type: ActivatedRoute },
315
+ { type: Router }
308
316
  ];
309
317
 
310
- /*
311
- * Copyright 2015-2020 Ritense BV, the Netherlands.
312
- *
313
- * Licensed under EUPL, Version 1.2 (the "License");
314
- * you may not use this file except in compliance with the License.
315
- * You may obtain a copy of the License at
316
- *
317
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
318
- *
319
- * Unless required by applicable law or agreed to in writing, software
320
- * distributed under the License is distributed on an "AS IS" basis,
321
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
322
- * See the License for the specific language governing permissions and
323
- * limitations under the License.
324
- */
325
- const ɵ0 = { title: 'Form management', roles: [ROLE_ADMIN] }, ɵ1 = { title: 'Create new Form', roles: [ROLE_ADMIN] }, ɵ2 = { title: 'Form Builder', roles: [ROLE_ADMIN] };
326
- const routes = [
327
- {
328
- path: 'form-management',
329
- component: FormManagementComponent,
330
- canActivate: [AuthGuardService],
331
- data: ɵ0
332
- },
333
- {
334
- path: 'form-management/create',
335
- component: FormManagementCreateComponent,
336
- canActivate: [AuthGuardService],
337
- data: ɵ1
338
- },
339
- {
340
- path: 'form-management/edit/:id',
341
- component: FormManagementEditComponent,
342
- canActivate: [AuthGuardService],
343
- data: ɵ2
344
- }
345
- ];
346
- class FormManagementRoutingModule {
347
- }
348
- FormManagementRoutingModule.decorators = [
349
- { type: NgModule, args: [{
350
- imports: [
351
- RouterModule.forChild(routes)
352
- ],
353
- exports: [
354
- RouterModule
355
- ],
356
- declarations: []
357
- },] }
318
+ /*
319
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
320
+ *
321
+ * Licensed under EUPL, Version 1.2 (the "License");
322
+ * you may not use this file except in compliance with the License.
323
+ * You may obtain a copy of the License at
324
+ *
325
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
326
+ *
327
+ * Unless required by applicable law or agreed to in writing, software
328
+ * distributed under the License is distributed on an "AS IS" basis,
329
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
330
+ * See the License for the specific language governing permissions and
331
+ * limitations under the License.
332
+ */
333
+ const ɵ0 = { title: 'Form management', roles: [ROLE_ADMIN] }, ɵ1 = { title: 'Create new Form', roles: [ROLE_ADMIN] }, ɵ2 = { title: 'Form Builder', roles: [ROLE_ADMIN] };
334
+ const routes = [
335
+ {
336
+ path: 'form-management',
337
+ component: FormManagementComponent,
338
+ canActivate: [AuthGuardService],
339
+ data: ɵ0,
340
+ },
341
+ {
342
+ path: 'form-management/create',
343
+ component: FormManagementCreateComponent,
344
+ canActivate: [AuthGuardService],
345
+ data: ɵ1,
346
+ },
347
+ {
348
+ path: 'form-management/edit/:id',
349
+ component: FormManagementEditComponent,
350
+ canActivate: [AuthGuardService],
351
+ data: ɵ2,
352
+ },
353
+ ];
354
+ class FormManagementRoutingModule {
355
+ }
356
+ FormManagementRoutingModule.decorators = [
357
+ { type: NgModule, args: [{
358
+ imports: [RouterModule.forChild(routes)],
359
+ exports: [RouterModule],
360
+ declarations: [],
361
+ },] }
358
362
  ];
359
363
 
360
- /*
361
- * Copyright 2015-2020 Ritense BV, the Netherlands.
362
- *
363
- * Licensed under EUPL, Version 1.2 (the "License");
364
- * you may not use this file except in compliance with the License.
365
- * You may obtain a copy of the License at
366
- *
367
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
368
- *
369
- * Unless required by applicable law or agreed to in writing, software
370
- * distributed under the License is distributed on an "AS IS" basis,
371
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
372
- * See the License for the specific language governing permissions and
373
- * limitations under the License.
374
- */
375
- class FormManagementListComponent {
376
- constructor(formManagementService, router) {
377
- this.formManagementService = formManagementService;
378
- this.router = router;
379
- this.formDefinitions = [];
380
- this.formDefinitionFields = [
381
- { key: 'name', label: 'Name' },
382
- { key: 'readOnly', label: 'Read-only' }
383
- ];
384
- this.pagination = {
385
- collectionSize: 0,
386
- page: 1,
387
- size: 10,
388
- maxPaginationItemSize: 5
389
- };
390
- this.pageParam = 0;
391
- }
392
- paginationClicked(page) {
393
- this.pageParam = page - 1;
394
- this.loadFormDefinitions();
395
- }
396
- ngOnInit() {
397
- }
398
- paginationSet() {
399
- this.loadFormDefinitions();
400
- }
401
- loadFormDefinitions(searchTerm) {
402
- const params = { page: this.pageParam, size: this.pagination.size };
403
- if (searchTerm) {
404
- params['searchTerm'] = searchTerm;
405
- }
406
- this.formManagementService.queryFormDefinitions(params).subscribe((results) => {
407
- this.pagination.collectionSize = results.body.totalElements;
408
- this.formDefinitions = results.body.content;
409
- });
410
- }
411
- editFormDefinition(formDefinition) {
412
- this.router.navigate(['/form-management/edit', formDefinition.id]);
413
- }
414
- searchTermEntered(searchTerm) {
415
- this.loadFormDefinitions(searchTerm);
416
- }
417
- }
418
- FormManagementListComponent.decorators = [
419
- { type: Component, args: [{
420
- selector: 'valtimo-form-management-list',
421
- 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<valtimo-list [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",
422
- 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 */"]
423
- },] }
424
- ];
425
- FormManagementListComponent.ctorParameters = () => [
426
- { type: FormManagementService },
427
- { type: Router }
364
+ /*
365
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
366
+ *
367
+ * Licensed under EUPL, Version 1.2 (the "License");
368
+ * you may not use this file except in compliance with the License.
369
+ * You may obtain a copy of the License at
370
+ *
371
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
372
+ *
373
+ * Unless required by applicable law or agreed to in writing, software
374
+ * distributed under the License is distributed on an "AS IS" basis,
375
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
376
+ * See the License for the specific language governing permissions and
377
+ * limitations under the License.
378
+ */
379
+ class FormManagementListComponent {
380
+ constructor(formManagementService, router) {
381
+ this.formManagementService = formManagementService;
382
+ this.router = router;
383
+ this.formDefinitions = [];
384
+ this.formDefinitionFields = [
385
+ { key: 'name', label: 'Name' },
386
+ { key: 'readOnly', label: 'Read-only' },
387
+ ];
388
+ this.pagination = {
389
+ collectionSize: 0,
390
+ page: 1,
391
+ size: 10,
392
+ maxPaginationItemSize: 5,
393
+ };
394
+ this.pageParam = 0;
395
+ }
396
+ paginationClicked(page) {
397
+ this.pageParam = page - 1;
398
+ this.loadFormDefinitions();
399
+ }
400
+ ngOnInit() { }
401
+ paginationSet() {
402
+ this.loadFormDefinitions();
403
+ }
404
+ loadFormDefinitions(searchTerm) {
405
+ const params = { page: this.pageParam, size: this.pagination.size };
406
+ if (searchTerm) {
407
+ params['searchTerm'] = searchTerm;
408
+ }
409
+ this.formManagementService.queryFormDefinitions(params).subscribe(results => {
410
+ this.pagination.collectionSize = results.body.totalElements;
411
+ this.formDefinitions = results.body.content;
412
+ });
413
+ }
414
+ editFormDefinition(formDefinition) {
415
+ this.router.navigate(['/form-management/edit', formDefinition.id]);
416
+ }
417
+ searchTermEntered(searchTerm) {
418
+ this.loadFormDefinitions(searchTerm);
419
+ }
420
+ }
421
+ FormManagementListComponent.decorators = [
422
+ { type: Component, args: [{
423
+ selector: 'valtimo-form-management-list',
424
+ 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<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",
425
+ 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 */"]
426
+ },] }
427
+ ];
428
+ FormManagementListComponent.ctorParameters = () => [
429
+ { type: FormManagementService },
430
+ { type: Router }
428
431
  ];
429
432
 
430
- /*
431
- * Copyright 2015-2020 Ritense BV, the Netherlands.
432
- *
433
- * Licensed under EUPL, Version 1.2 (the "License");
434
- * you may not use this file except in compliance with the License.
435
- * You may obtain a copy of the License at
436
- *
437
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
438
- *
439
- * Unless required by applicable law or agreed to in writing, software
440
- * distributed under the License is distributed on an "AS IS" basis,
441
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
442
- * See the License for the specific language governing permissions and
443
- * limitations under the License.
444
- */
445
- class FormManagementUploadComponent {
446
- constructor(documentService, translateService) {
447
- this.documentService = documentService;
448
- this.translateService = translateService;
449
- this.definitionUploaded = new EventEmitter();
450
- this.clear$ = new Subject();
451
- this.jsonString$ = new BehaviorSubject('');
452
- this.error$ = new BehaviorSubject('');
453
- this.disabled$ = new BehaviorSubject(false);
454
- this.file$ = new BehaviorSubject(undefined);
455
- }
456
- ngAfterViewInit() {
457
- this.openShowSubscription();
458
- this.openFileSubscription();
459
- }
460
- ngOnDestroy() {
461
- this.showSubscription.unsubscribe();
462
- this.fileSubscription.unsubscribe();
463
- this.closeErrorSubscription();
464
- }
465
- setFile(file) {
466
- this.clearError();
467
- this.file$.next(file);
468
- }
469
- uploadDefinition() {
470
- this.disable();
471
- this.jsonString$
472
- .pipe(take(1))
473
- .subscribe((definition) => {
474
- this.closeErrorSubscription();
475
- this.clearError();
476
- this.enable();
477
- this.hideModal();
478
- this.definitionUploaded.emit(definition);
479
- });
480
- }
481
- openErrorSubscription(errorCode) {
482
- this.closeErrorSubscription();
483
- this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {
484
- this.error$.next(error);
485
- });
486
- }
487
- closeErrorSubscription() {
488
- if (this.errorSubscription) {
489
- this.errorSubscription.unsubscribe();
490
- }
491
- }
492
- clearError() {
493
- this.error$.next('');
494
- }
495
- openFileSubscription() {
496
- this.fileSubscription = this.file$.subscribe(file => {
497
- if (file) {
498
- const reader = new FileReader();
499
- reader.onloadend = () => {
500
- const result = reader.result.toString();
501
- if (this.stringIsValidJson(result)) {
502
- this.jsonString$.next(result);
503
- }
504
- };
505
- reader.readAsText(file);
506
- }
507
- else {
508
- this.clearJsonString();
509
- }
510
- });
511
- }
512
- openShowSubscription() {
513
- this.showSubscription = this.show$.subscribe(show => {
514
- if (show) {
515
- this.showModal();
516
- }
517
- else {
518
- this.hideModal();
519
- }
520
- this.clearJsonString();
521
- this.clearError();
522
- this.clearDropzone();
523
- });
524
- }
525
- clearJsonString() {
526
- this.jsonString$.next('');
527
- }
528
- clearDropzone() {
529
- this.clear$.next();
530
- }
531
- showModal() {
532
- this.modal.show();
533
- }
534
- hideModal() {
535
- this.modal.hide();
536
- }
537
- stringIsValidJson(string) {
538
- var _a, _b;
539
- try {
540
- // tslint:disable-next-line
541
- (_b = (_a = JSON.parse(string)) === null || _a === void 0 ? void 0 : _a.formDefinition) === null || _b === void 0 ? void 0 : _b.components;
542
- }
543
- catch (e) {
544
- this.clearDropzone();
545
- this.openErrorSubscription('dropzone.error.invalidFormDef');
546
- return false;
547
- }
548
- return true;
549
- }
550
- disable() {
551
- this.disabled$.next(true);
552
- }
553
- enable() {
554
- this.disabled$.next(false);
555
- }
556
- }
557
- FormManagementUploadComponent.decorators = [
558
- { type: Component, args: [{
559
- selector: 'valtimo-form-management-upload',
560
- template: "<valtimo-modal #uploadFormDefinitionModal [title]=\"'uploadFormDefinition' | translate\" showFooter=\"true\">\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",
561
- styles: [""]
562
- },] }
563
- ];
564
- FormManagementUploadComponent.ctorParameters = () => [
565
- { type: DocumentService },
566
- { type: TranslateService }
567
- ];
568
- FormManagementUploadComponent.propDecorators = {
569
- modal: [{ type: ViewChild, args: ['uploadFormDefinitionModal',] }],
570
- show$: [{ type: Input }],
571
- definitionUploaded: [{ type: Output }]
433
+ /*
434
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
435
+ *
436
+ * Licensed under EUPL, Version 1.2 (the "License");
437
+ * you may not use this file except in compliance with the License.
438
+ * You may obtain a copy of the License at
439
+ *
440
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
441
+ *
442
+ * Unless required by applicable law or agreed to in writing, software
443
+ * distributed under the License is distributed on an "AS IS" basis,
444
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
445
+ * See the License for the specific language governing permissions and
446
+ * limitations under the License.
447
+ */
448
+ class FormManagementUploadComponent {
449
+ constructor(documentService, translateService) {
450
+ this.documentService = documentService;
451
+ this.translateService = translateService;
452
+ this.definitionUploaded = new EventEmitter();
453
+ this.clear$ = new Subject();
454
+ this.jsonString$ = new BehaviorSubject('');
455
+ this.error$ = new BehaviorSubject('');
456
+ this.disabled$ = new BehaviorSubject(false);
457
+ this.file$ = new BehaviorSubject(undefined);
458
+ }
459
+ ngAfterViewInit() {
460
+ this.openShowSubscription();
461
+ this.openFileSubscription();
462
+ }
463
+ ngOnDestroy() {
464
+ this.showSubscription.unsubscribe();
465
+ this.fileSubscription.unsubscribe();
466
+ this.closeErrorSubscription();
467
+ }
468
+ setFile(file) {
469
+ this.clearError();
470
+ this.file$.next(file);
471
+ }
472
+ uploadDefinition() {
473
+ this.disable();
474
+ this.jsonString$.pipe(take(1)).subscribe(definition => {
475
+ this.closeErrorSubscription();
476
+ this.clearError();
477
+ this.enable();
478
+ this.hideModal();
479
+ this.definitionUploaded.emit(definition);
480
+ });
481
+ }
482
+ openErrorSubscription(errorCode) {
483
+ this.closeErrorSubscription();
484
+ this.errorSubscription = this.translateService.stream(errorCode).subscribe(error => {
485
+ this.error$.next(error);
486
+ });
487
+ }
488
+ closeErrorSubscription() {
489
+ if (this.errorSubscription) {
490
+ this.errorSubscription.unsubscribe();
491
+ }
492
+ }
493
+ clearError() {
494
+ this.error$.next('');
495
+ }
496
+ openFileSubscription() {
497
+ this.fileSubscription = this.file$.subscribe(file => {
498
+ if (file) {
499
+ const reader = new FileReader();
500
+ reader.onloadend = () => {
501
+ const result = reader.result.toString();
502
+ if (this.stringIsValidJson(result)) {
503
+ this.jsonString$.next(result);
504
+ }
505
+ };
506
+ reader.readAsText(file);
507
+ }
508
+ else {
509
+ this.clearJsonString();
510
+ }
511
+ });
512
+ }
513
+ openShowSubscription() {
514
+ this.showSubscription = this.show$.subscribe(show => {
515
+ if (show) {
516
+ this.showModal();
517
+ }
518
+ else {
519
+ this.hideModal();
520
+ }
521
+ this.clearJsonString();
522
+ this.clearError();
523
+ this.clearDropzone();
524
+ });
525
+ }
526
+ clearJsonString() {
527
+ this.jsonString$.next('');
528
+ }
529
+ clearDropzone() {
530
+ this.clear$.next();
531
+ }
532
+ showModal() {
533
+ this.modal.show();
534
+ }
535
+ hideModal() {
536
+ this.modal.hide();
537
+ }
538
+ stringIsValidJson(string) {
539
+ var _a, _b;
540
+ try {
541
+ // tslint:disable-next-line
542
+ (_b = (_a = JSON.parse(string)) === null || _a === void 0 ? void 0 : _a.formDefinition) === null || _b === void 0 ? void 0 : _b.components;
543
+ }
544
+ catch (e) {
545
+ this.clearDropzone();
546
+ this.openErrorSubscription('dropzone.error.invalidFormDef');
547
+ return false;
548
+ }
549
+ return true;
550
+ }
551
+ disable() {
552
+ this.disabled$.next(true);
553
+ }
554
+ enable() {
555
+ this.disabled$.next(false);
556
+ }
557
+ }
558
+ FormManagementUploadComponent.decorators = [
559
+ { type: Component, args: [{
560
+ selector: 'valtimo-form-management-upload',
561
+ 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",
562
+ styles: [""]
563
+ },] }
564
+ ];
565
+ FormManagementUploadComponent.ctorParameters = () => [
566
+ { type: DocumentService },
567
+ { type: TranslateService }
568
+ ];
569
+ FormManagementUploadComponent.propDecorators = {
570
+ modal: [{ type: ViewChild, args: ['uploadFormDefinitionModal',] }],
571
+ show$: [{ type: Input }],
572
+ definitionUploaded: [{ type: Output }]
572
573
  };
573
574
 
574
- /*
575
- * Copyright 2015-2020 Ritense BV, the Netherlands.
576
- *
577
- * Licensed under EUPL, Version 1.2 (the "License");
578
- * you may not use this file except in compliance with the License.
579
- * You may obtain a copy of the License at
580
- *
581
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
582
- *
583
- * Unless required by applicable law or agreed to in writing, software
584
- * distributed under the License is distributed on an "AS IS" basis,
585
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
586
- * See the License for the specific language governing permissions and
587
- * limitations under the License.
588
- */
589
- class FormManagementModule {
590
- }
591
- FormManagementModule.decorators = [
592
- { type: NgModule, args: [{
593
- declarations: [
594
- FormManagementComponent,
595
- FormManagementCreateComponent,
596
- FormManagementListComponent,
597
- FormManagementEditComponent,
598
- FormManagementUploadComponent
599
- ],
600
- imports: [
601
- FormManagementRoutingModule,
602
- FormIoModule,
603
- CommonModule,
604
- ReactiveFormsModule,
605
- FormsModule,
606
- WidgetModule,
607
- ListModule,
608
- TranslateModule,
609
- NgbTooltipModule,
610
- DropzoneModule,
611
- ModalModule
612
- ],
613
- exports: [FormManagementComponent]
614
- },] }
575
+ /*
576
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
577
+ *
578
+ * Licensed under EUPL, Version 1.2 (the "License");
579
+ * you may not use this file except in compliance with the License.
580
+ * You may obtain a copy of the License at
581
+ *
582
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
583
+ *
584
+ * Unless required by applicable law or agreed to in writing, software
585
+ * distributed under the License is distributed on an "AS IS" basis,
586
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
587
+ * See the License for the specific language governing permissions and
588
+ * limitations under the License.
589
+ */
590
+ class FormManagementModule {
591
+ }
592
+ FormManagementModule.decorators = [
593
+ { type: NgModule, args: [{
594
+ declarations: [
595
+ FormManagementComponent,
596
+ FormManagementCreateComponent,
597
+ FormManagementListComponent,
598
+ FormManagementEditComponent,
599
+ FormManagementUploadComponent,
600
+ ],
601
+ imports: [
602
+ FormManagementRoutingModule,
603
+ FormIoModule,
604
+ CommonModule,
605
+ ReactiveFormsModule,
606
+ FormsModule,
607
+ WidgetModule,
608
+ ListModule,
609
+ TranslateModule,
610
+ NgbTooltipModule,
611
+ DropzoneModule,
612
+ ModalModule,
613
+ ],
614
+ exports: [FormManagementComponent],
615
+ },] }
615
616
  ];
616
617
 
617
- /*
618
- * Copyright 2015-2020 Ritense BV, the Netherlands.
619
- *
620
- * Licensed under EUPL, Version 1.2 (the "License");
621
- * you may not use this file except in compliance with the License.
622
- * You may obtain a copy of the License at
623
- *
624
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
625
- *
626
- * Unless required by applicable law or agreed to in writing, software
627
- * distributed under the License is distributed on an "AS IS" basis,
628
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
629
- * See the License for the specific language governing permissions and
630
- * limitations under the License.
618
+ /*
619
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
620
+ *
621
+ * Licensed under EUPL, Version 1.2 (the "License");
622
+ * you may not use this file except in compliance with the License.
623
+ * You may obtain a copy of the License at
624
+ *
625
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
626
+ *
627
+ * Unless required by applicable law or agreed to in writing, software
628
+ * distributed under the License is distributed on an "AS IS" basis,
629
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
630
+ * See the License for the specific language governing permissions and
631
+ * limitations under the License.
631
632
  */
632
633
 
633
- /**
634
- * Generated bundle index. Do not edit.
634
+ /**
635
+ * Generated bundle index. Do not edit.
635
636
  */
636
637
 
637
638
  export { FormManagementComponent, FormManagementModule, FormManagementService, FormManagementCreateComponent as ɵa, FormManagementListComponent as ɵb, FormManagementEditComponent as ɵc, FormManagementUploadComponent as ɵd, FormManagementRoutingModule as ɵe };