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