@valtimo/form-management 10.6.0 → 10.8.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 +4 -4
- package/esm2020/lib/form-management-duplicate/form-management-duplicate.component.mjs +5 -5
- package/esm2020/lib/form-management-edit/form-management-edit.component.mjs +21 -13
- package/esm2020/lib/form-management-list/form-management-list.component.mjs +4 -4
- package/esm2020/lib/form-management-routing.module.mjs +7 -7
- package/esm2020/lib/form-management-upload/form-management-upload.component.mjs +4 -4
- package/esm2020/lib/form-management.component.mjs +4 -4
- package/esm2020/lib/form-management.module.mjs +9 -9
- package/esm2020/lib/form-management.service.mjs +4 -4
- package/fesm2015/valtimo-form-management.mjs +59 -52
- package/fesm2015/valtimo-form-management.mjs.map +1 -1
- package/fesm2020/valtimo-form-management.mjs +59 -51
- package/fesm2020/valtimo-form-management.mjs.map +1 -1
- package/lib/form-management-edit/form-management-edit.component.d.ts +8 -7
- package/lib/form-management-edit/form-management-edit.component.d.ts.map +1 -1
- package/lib/form-management.module.d.ts +1 -1
- package/package.json +4 -4
|
@@ -5,12 +5,12 @@ import * as i2 from '@valtimo/config';
|
|
|
5
5
|
import { ROLE_ADMIN } from '@valtimo/config';
|
|
6
6
|
import * as i3 from '@angular/router';
|
|
7
7
|
import { RouterModule } from '@angular/router';
|
|
8
|
-
import * as
|
|
9
|
-
import { FormIoModule, WidgetModule, ListModule, DropzoneModule, ModalModule as ModalModule$2,
|
|
10
|
-
import * as i2$
|
|
8
|
+
import * as i2$1 from '@valtimo/components';
|
|
9
|
+
import { FormIoModule, WidgetModule, ListModule, DropzoneModule, ModalModule as ModalModule$2, ValtimoCdsModalDirectiveModule } from '@valtimo/components';
|
|
10
|
+
import * as i2$2 from '@ngx-translate/core';
|
|
11
11
|
import { TranslateModule } from '@ngx-translate/core';
|
|
12
12
|
import { AuthGuardService } from '@valtimo/security';
|
|
13
|
-
import * as i2$
|
|
13
|
+
import * as i2$3 from '@angular/forms';
|
|
14
14
|
import { FormControl, Validators, FormGroup, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
15
15
|
import { map, combineLatest, Subject, BehaviorSubject, Subscription } from 'rxjs';
|
|
16
16
|
import { take, first } from 'rxjs/operators';
|
|
@@ -67,9 +67,9 @@ class FormManagementService {
|
|
|
67
67
|
return this.http.delete(`${this.valtimoApiConfig.endpointUri}v1/form-management/${formDefinitionId}`);
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
FormManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
71
|
-
FormManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.
|
|
72
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
70
|
+
FormManagementService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
71
|
+
FormManagementService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementService, providedIn: 'root' });
|
|
72
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementService, decorators: [{
|
|
73
73
|
type: Injectable,
|
|
74
74
|
args: [{
|
|
75
75
|
providedIn: 'root',
|
|
@@ -133,9 +133,9 @@ class FormManagementListComponent {
|
|
|
133
133
|
this.loadFormDefinitions(searchTerm);
|
|
134
134
|
}
|
|
135
135
|
}
|
|
136
|
-
FormManagementListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
137
|
-
FormManagementListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
136
|
+
FormManagementListComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementListComponent, deps: [{ token: FormManagementService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
137
|
+
FormManagementListComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormManagementListComponent, selector: "valtimo-form-management-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-2023 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"], dependencies: [{ kind: "component", type: i2$1.ListComponent, selector: "valtimo-list", inputs: ["items", "fields", "pagination", "viewMode", "isSearchable", "header", "actions", "paginationIdentifier", "initialSortState", "lastColumnTemplate"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged"] }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }] });
|
|
138
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementListComponent, decorators: [{
|
|
139
139
|
type: Component,
|
|
140
140
|
args: [{ selector: 'valtimo-form-management-list', template: "<!--\n ~ Copyright 2015-2023 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-2023 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"] }]
|
|
141
141
|
}], ctorParameters: function () { return [{ type: FormManagementService }, { type: i3.Router }]; } });
|
|
@@ -159,9 +159,9 @@ class FormManagementComponent {
|
|
|
159
159
|
constructor() { }
|
|
160
160
|
ngOnInit() { }
|
|
161
161
|
}
|
|
162
|
-
FormManagementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
163
|
-
FormManagementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
162
|
+
FormManagementComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
163
|
+
FormManagementComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormManagementComponent, selector: "valtimo-form-management", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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-2023 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"], dependencies: [{ kind: "directive", type: i3.RouterLink, selector: ":not(a):not(area)[routerLink]", inputs: ["queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: i2$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: FormManagementListComponent, selector: "valtimo-form-management-list" }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }] });
|
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementComponent, decorators: [{
|
|
165
165
|
type: Component,
|
|
166
166
|
args: [{ selector: 'valtimo-form-management', template: "<!--\n ~ Copyright 2015-2023 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-2023 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"] }]
|
|
167
167
|
}], ctorParameters: function () { return []; } });
|
|
@@ -254,12 +254,12 @@ class FormManagementCreateComponent {
|
|
|
254
254
|
});
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
FormManagementCreateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
258
|
-
FormManagementCreateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
259
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
257
|
+
FormManagementCreateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementCreateComponent, deps: [{ token: FormManagementService }, { token: i2$3.FormBuilder }, { token: i3.Router }, { token: i2$1.AlertService }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component });
|
|
258
|
+
FormManagementCreateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormManagementCreateComponent, selector: "valtimo-form-management-create", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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 *ngIf=\"formControls.name.errors.duplicate\">\n {{ 'formManagement.nameIsInUse' | 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]=\"'/form-management'\" 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-2023 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"], dependencies: [{ kind: "directive", type: i3.RouterLinkWithHref, selector: "a[routerLink],area[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i5.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i2$1.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }] });
|
|
259
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementCreateComponent, decorators: [{
|
|
260
260
|
type: Component,
|
|
261
261
|
args: [{ selector: 'valtimo-form-management-create', template: "<!--\n ~ Copyright 2015-2023 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 *ngIf=\"formControls.name.errors.duplicate\">\n {{ 'formManagement.nameIsInUse' | 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]=\"'/form-management'\" 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-2023 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"] }]
|
|
262
|
-
}], ctorParameters: function () { return [{ type: FormManagementService }, { type: i2$
|
|
262
|
+
}], ctorParameters: function () { return [{ type: FormManagementService }, { type: i2$3.FormBuilder }, { type: i3.Router }, { type: i2$1.AlertService }, { type: i3.ActivatedRoute }]; } });
|
|
263
263
|
|
|
264
264
|
/*
|
|
265
265
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
@@ -324,15 +324,15 @@ class FormManagementDuplicateComponent extends BaseModal {
|
|
|
324
324
|
return this.formToDuplicate.name + '-duplicate';
|
|
325
325
|
}
|
|
326
326
|
}
|
|
327
|
-
FormManagementDuplicateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
328
|
-
FormManagementDuplicateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
329
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
327
|
+
FormManagementDuplicateComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementDuplicateComponent, deps: [{ token: 'formToDuplicate' }, { token: i1$1.ModalService }, { token: FormManagementService }, { token: i2$1.AlertService }, { token: i3.ActivatedRoute }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component });
|
|
328
|
+
FormManagementDuplicateComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormManagementDuplicateComponent, selector: "valtimo-form-management-duplicate-modal", usesInheritance: true, ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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<cds-modal\n valtimoCdsModal\n [open]=\"open\"\n (overlaySelected)=\"closeModal()\"\n [formGroup]=\"duplicateForm\"\n>\n <cds-modal-header (closeSelect)=\"closeModal()\">{{\n 'formManagement.duplicate' | translate\n }}</cds-modal-header>\n <section class=\"bx--modal-content p-2\">\n <cds-label labelState=\"error\">\n {{ 'formManagement.name' | translate }}\n <input cdsText formControlName=\"duplicateFormName\" [invalid]=\"duplicateFormName.invalid\" />\n </cds-label>\n <div\n *ngIf=\"duplicateFormName.invalid && (duplicateFormName.dirty || duplicateFormName.touched)\"\n class=\"bg-warning text-black mb-0 p-2 pl-3 pr-3\"\n role=\"alert\"\n >\n <div *ngIf=\"duplicateFormName.errors.required\">\n {{ 'formManagement.nameIsRequired' | translate }}\n </div>\n <div *ngIf=\"duplicateFormName.errors.duplicate\">\n {{ 'formManagement.nameIsInUse' | translate }}\n </div>\n </div>\n </section>\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n modal-primary-focus\n (click)=\"duplicate()\"\n [disabled]=\"duplicateForm.invalid\"\n >\n {{ 'formManagement.submit' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$3.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$3.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i7.Modal, selector: "cds-modal, ibm-modal", inputs: ["size", "theme", "ariaLabel", "open", "trigger", "hasScrollingContent"], outputs: ["overlaySelected", "close"] }, { kind: "component", type: i7.ModalHeader, selector: "cds-modal-header, ibm-modal-header", inputs: ["theme", "closeLabel", "showCloseButton"], outputs: ["closeSelect"] }, { kind: "component", type: i7.ModalFooter, selector: "cds-modal-footer, ibm-modal-footer" }, { kind: "component", type: i7.Label, selector: "cds-label, ibm-label", inputs: ["labelInputID", "disabled", "skeleton", "helperText", "invalidText", "invalid", "warn", "warnText", "ariaLabel"] }, { kind: "directive", type: i7.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "directive", type: i7.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i2$1.ValtimoCdsModalDirective, selector: "[valtimoCdsModal]" }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }] });
|
|
329
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementDuplicateComponent, decorators: [{
|
|
330
330
|
type: Component,
|
|
331
|
-
args: [{ selector: 'valtimo-form-management-duplicate-modal', template: "<!--\n ~ Copyright 2015-2023 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<
|
|
331
|
+
args: [{ selector: 'valtimo-form-management-duplicate-modal', template: "<!--\n ~ Copyright 2015-2023 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<cds-modal\n valtimoCdsModal\n [open]=\"open\"\n (overlaySelected)=\"closeModal()\"\n [formGroup]=\"duplicateForm\"\n>\n <cds-modal-header (closeSelect)=\"closeModal()\">{{\n 'formManagement.duplicate' | translate\n }}</cds-modal-header>\n <section class=\"bx--modal-content p-2\">\n <cds-label labelState=\"error\">\n {{ 'formManagement.name' | translate }}\n <input cdsText formControlName=\"duplicateFormName\" [invalid]=\"duplicateFormName.invalid\" />\n </cds-label>\n <div\n *ngIf=\"duplicateFormName.invalid && (duplicateFormName.dirty || duplicateFormName.touched)\"\n class=\"bg-warning text-black mb-0 p-2 pl-3 pr-3\"\n role=\"alert\"\n >\n <div *ngIf=\"duplicateFormName.errors.required\">\n {{ 'formManagement.nameIsRequired' | translate }}\n </div>\n <div *ngIf=\"duplicateFormName.errors.duplicate\">\n {{ 'formManagement.nameIsInUse' | translate }}\n </div>\n </div>\n </section>\n <cds-modal-footer>\n <button cdsButton=\"secondary\" (click)=\"closeModal()\">\n {{ 'interface.cancel' | translate }}\n </button>\n <button\n cdsButton=\"primary\"\n [attr.modal-primary-focus]=\"true\"\n modal-primary-focus\n (click)=\"duplicate()\"\n [disabled]=\"duplicateForm.invalid\"\n >\n {{ 'formManagement.submit' | translate }}\n </button>\n </cds-modal-footer>\n</cds-modal>\n", styles: ["/*!\n * Copyright 2015-2023 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"] }]
|
|
332
332
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
333
333
|
type: Inject,
|
|
334
334
|
args: ['formToDuplicate']
|
|
335
|
-
}] }, { type: i1$1.ModalService }, { type: FormManagementService }, { type:
|
|
335
|
+
}] }, { type: i1$1.ModalService }, { type: FormManagementService }, { type: i2$1.AlertService }, { type: i3.ActivatedRoute }, { type: i3.Router }]; } });
|
|
336
336
|
|
|
337
337
|
/*
|
|
338
338
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
@@ -462,12 +462,12 @@ class FormManagementUploadComponent {
|
|
|
462
462
|
this.disabled$.next(false);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
FormManagementUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
466
|
-
FormManagementUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
467
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
465
|
+
FormManagementUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementUploadComponent, deps: [{ token: i1$2.DocumentService }, { token: i2$2.TranslateService }], target: i0.ɵɵFactoryTarget.Component });
|
|
466
|
+
FormManagementUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", 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: "<!--\n ~ Copyright 2015-2023 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-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 [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && (error$ | async) === ''; else disabledUpload\">\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 #disabledUpload>\n <button [disabled]=\"true\" class=\"btn btn-primary\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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"], dependencies: [{ kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2$1.DropzoneComponent, selector: "valtimo-dropzone", inputs: ["title", "hideTitle", "subtitle", "externalError$", "maxFileSize", "showMaxFileSize", "acceptedFiles", "clear$", "disabled", "hideFilePreview", "uploading", "camera", "maxFiles"], outputs: ["fileSelected"] }, { kind: "component", type: i2$1.ModalComponent, selector: "valtimo-modal", inputs: ["elementId", "title", "subtitle", "templateBelowSubtitle", "showFooter"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }] });
|
|
467
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementUploadComponent, decorators: [{
|
|
468
468
|
type: Component,
|
|
469
469
|
args: [{ selector: 'valtimo-form-management-upload', template: "<!--\n ~ Copyright 2015-2023 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-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 [maxFiles]=\"1\"\n ></valtimo-dropzone>\n </div>\n <div footer>\n <ng-container *ngIf=\"(jsonString$ | async) && (error$ | async) === ''; else disabledUpload\">\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 #disabledUpload>\n <button [disabled]=\"true\" class=\"btn btn-primary\">\n <i class=\"icon mdi mdi-upload mr-1\"></i>\n {{ 'Upload' | translate }}\n </button>\n</ng-template>\n", styles: ["/*!\n * Copyright 2015-2023 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"] }]
|
|
470
|
-
}], ctorParameters: function () { return [{ type: i1$2.DocumentService }, { type: i2$
|
|
470
|
+
}], ctorParameters: function () { return [{ type: i1$2.DocumentService }, { type: i2$2.TranslateService }]; }, propDecorators: { modal: [{
|
|
471
471
|
type: ViewChild,
|
|
472
472
|
args: ['uploadFormDefinitionModal']
|
|
473
473
|
}], show$: [{
|
|
@@ -492,12 +492,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
492
492
|
* limitations under the License.
|
|
493
493
|
*/
|
|
494
494
|
class FormManagementEditComponent {
|
|
495
|
-
constructor(formManagementService, alertService, route, router, modalService) {
|
|
495
|
+
constructor(formManagementService, alertService, route, router, modalService, pageTitleService) {
|
|
496
496
|
this.formManagementService = formManagementService;
|
|
497
497
|
this.alertService = alertService;
|
|
498
498
|
this.route = route;
|
|
499
499
|
this.router = router;
|
|
500
500
|
this.modalService = modalService;
|
|
501
|
+
this.pageTitleService = pageTitleService;
|
|
501
502
|
this.showModal$ = new BehaviorSubject(false);
|
|
502
503
|
this.reloading$ = new BehaviorSubject(false);
|
|
503
504
|
this.modifiedFormDefinition = null;
|
|
@@ -516,6 +517,7 @@ class FormManagementEditComponent {
|
|
|
516
517
|
this.formDefinitionId = this.route.snapshot.paramMap.get('id');
|
|
517
518
|
this.formManagementService.getFormDefinition(this.formDefinitionId).subscribe(formDefinition => {
|
|
518
519
|
this.formDefinition = formDefinition;
|
|
520
|
+
this.pageTitleService.setCustomPageTitle(formDefinition.name);
|
|
519
521
|
}, () => {
|
|
520
522
|
this.alertService.error('Error retrieving Form Definition');
|
|
521
523
|
});
|
|
@@ -599,12 +601,18 @@ class FormManagementEditComponent {
|
|
|
599
601
|
setFormDefinition(formDefinition) {
|
|
600
602
|
this.reloading$.next(true);
|
|
601
603
|
const definition = JSON.parse(formDefinition);
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
604
|
+
if (!definition?.components) {
|
|
605
|
+
this.reloading$.next(false);
|
|
606
|
+
this.alertService.error('Invalid JSON. Missing form.io JSON field "components".');
|
|
607
|
+
}
|
|
608
|
+
else {
|
|
609
|
+
const components = definition.components;
|
|
610
|
+
const currentDefinition = this.modifiedFormDefinition || this.formDefinition.formDefinition;
|
|
611
|
+
const newDefinition = { ...currentDefinition, ...(components && { components }) };
|
|
612
|
+
this.modifiedFormDefinition = newDefinition;
|
|
613
|
+
this.formDefinition.formDefinition = newDefinition;
|
|
614
|
+
this.reloading$.next(false);
|
|
615
|
+
}
|
|
608
616
|
}
|
|
609
617
|
checkToOpenUploadModal() {
|
|
610
618
|
this.route.queryParams.pipe(take(1)).subscribe(params => {
|
|
@@ -614,12 +622,12 @@ class FormManagementEditComponent {
|
|
|
614
622
|
});
|
|
615
623
|
}
|
|
616
624
|
}
|
|
617
|
-
FormManagementEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
618
|
-
FormManagementEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.
|
|
619
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
625
|
+
FormManagementEditComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementEditComponent, deps: [{ token: FormManagementService }, { token: i2$1.AlertService }, { token: i3.ActivatedRoute }, { token: i3.Router }, { token: i7.ModalService }, { token: i2$1.PageTitleService }], target: i0.ɵɵFactoryTarget.Component });
|
|
626
|
+
FormManagementEditComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: FormManagementEditComponent, selector: "valtimo-form-management-edit", ngImport: i0, template: "<!--\n ~ Copyright 2015-2023 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)=\"showUploadModal()\"\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 <button class=\"btn btn-secondary btn-space\" (click)=\"showDuplicateModal()\">\n <i class=\"icon mdi mdi-content-duplicate mr-1\"></i\n >{{ 'formManagement.duplicate' | 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 <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\n<cds-placeholder></cds-placeholder>\n", styles: ["/*!\n * Copyright 2015-2023 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"], dependencies: [{ kind: "component", type: i2$1.FormioBuilderComponent, selector: "valtimo-form-io-builder", inputs: ["form"], outputs: ["change"] }, { kind: "directive", type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i7.Placeholder, selector: "cds-placeholder, ibm-placeholder", inputs: ["id"] }, { kind: "component", type: FormManagementUploadComponent, selector: "valtimo-form-management-upload", inputs: ["show$"], outputs: ["definitionUploaded"] }, { kind: "pipe", type: i5.AsyncPipe, name: "async" }, { kind: "pipe", type: i2$2.TranslatePipe, name: "translate" }], encapsulation: i0.ViewEncapsulation.None });
|
|
627
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementEditComponent, decorators: [{
|
|
620
628
|
type: Component,
|
|
621
|
-
args: [{ selector: 'valtimo-form-management-edit', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 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)=\"showUploadModal()\"\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 <button class=\"btn btn-secondary btn-space\" (click)=\"showDuplicateModal()\">\n <i class=\"icon mdi mdi-content-duplicate mr-1\"></i\n >{{ 'formManagement.duplicate' | 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
|
|
622
|
-
}], ctorParameters: function () { return [{ type: FormManagementService }, { type:
|
|
629
|
+
args: [{ selector: 'valtimo-form-management-edit', encapsulation: ViewEncapsulation.None, template: "<!--\n ~ Copyright 2015-2023 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)=\"showUploadModal()\"\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 <button class=\"btn btn-secondary btn-space\" (click)=\"showDuplicateModal()\">\n <i class=\"icon mdi mdi-content-duplicate mr-1\"></i\n >{{ 'formManagement.duplicate' | 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 <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\n<cds-placeholder></cds-placeholder>\n", styles: ["/*!\n * Copyright 2015-2023 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"] }]
|
|
630
|
+
}], ctorParameters: function () { return [{ type: FormManagementService }, { type: i2$1.AlertService }, { type: i3.ActivatedRoute }, { type: i3.Router }, { type: i7.ModalService }, { type: i2$1.PageTitleService }]; } });
|
|
623
631
|
|
|
624
632
|
/*
|
|
625
633
|
* Copyright 2015-2023 Ritense BV, the Netherlands.
|
|
@@ -641,7 +649,7 @@ const routes = [
|
|
|
641
649
|
path: 'form-management',
|
|
642
650
|
component: FormManagementComponent,
|
|
643
651
|
canActivate: [AuthGuardService],
|
|
644
|
-
data: { title: '
|
|
652
|
+
data: { title: 'Forms', roles: [ROLE_ADMIN] },
|
|
645
653
|
},
|
|
646
654
|
{
|
|
647
655
|
path: 'form-management/create',
|
|
@@ -653,15 +661,15 @@ const routes = [
|
|
|
653
661
|
path: 'form-management/edit/:id',
|
|
654
662
|
component: FormManagementEditComponent,
|
|
655
663
|
canActivate: [AuthGuardService],
|
|
656
|
-
data: { title: 'Form Builder', roles: [ROLE_ADMIN] },
|
|
664
|
+
data: { title: 'Form Builder', roles: [ROLE_ADMIN], customPageTitle: true },
|
|
657
665
|
},
|
|
658
666
|
];
|
|
659
667
|
class FormManagementRoutingModule {
|
|
660
668
|
}
|
|
661
|
-
FormManagementRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
662
|
-
FormManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
663
|
-
FormManagementRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
664
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
669
|
+
FormManagementRoutingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
670
|
+
FormManagementRoutingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: FormManagementRoutingModule, imports: [i3.RouterModule], exports: [RouterModule] });
|
|
671
|
+
FormManagementRoutingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementRoutingModule, imports: [RouterModule.forChild(routes), RouterModule] });
|
|
672
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementRoutingModule, decorators: [{
|
|
665
673
|
type: NgModule,
|
|
666
674
|
args: [{
|
|
667
675
|
imports: [RouterModule.forChild(routes)],
|
|
@@ -687,8 +695,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
687
695
|
*/
|
|
688
696
|
class FormManagementModule {
|
|
689
697
|
}
|
|
690
|
-
FormManagementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.
|
|
691
|
-
FormManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
698
|
+
FormManagementModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
699
|
+
FormManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: FormManagementModule, declarations: [FormManagementComponent,
|
|
692
700
|
FormManagementCreateComponent,
|
|
693
701
|
FormManagementListComponent,
|
|
694
702
|
FormManagementEditComponent,
|
|
@@ -715,8 +723,8 @@ FormManagementModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", ve
|
|
|
715
723
|
InputModule$1,
|
|
716
724
|
PlaceholderModule,
|
|
717
725
|
ButtonModule$1,
|
|
718
|
-
|
|
719
|
-
FormManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
726
|
+
ValtimoCdsModalDirectiveModule], exports: [FormManagementComponent] });
|
|
727
|
+
FormManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementModule, imports: [FormManagementRoutingModule,
|
|
720
728
|
FormIoModule,
|
|
721
729
|
CommonModule,
|
|
722
730
|
ReactiveFormsModule,
|
|
@@ -738,8 +746,8 @@ FormManagementModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", ve
|
|
|
738
746
|
InputModule$1,
|
|
739
747
|
PlaceholderModule,
|
|
740
748
|
ButtonModule$1,
|
|
741
|
-
|
|
742
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.
|
|
749
|
+
ValtimoCdsModalDirectiveModule] });
|
|
750
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: FormManagementModule, decorators: [{
|
|
743
751
|
type: NgModule,
|
|
744
752
|
args: [{
|
|
745
753
|
declarations: [
|
|
@@ -773,7 +781,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
773
781
|
InputModule$1,
|
|
774
782
|
PlaceholderModule,
|
|
775
783
|
ButtonModule$1,
|
|
776
|
-
|
|
784
|
+
ValtimoCdsModalDirectiveModule,
|
|
777
785
|
],
|
|
778
786
|
exports: [FormManagementComponent],
|
|
779
787
|
}]
|