@valtimo/milestone 4.15.3-next-main.16 → 4.17.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.
Files changed (36) hide show
  1. package/bundles/valtimo-milestone.umd.js +1065 -1015
  2. package/bundles/valtimo-milestone.umd.js.map +1 -1
  3. package/bundles/valtimo-milestone.umd.min.js +1 -1
  4. package/bundles/valtimo-milestone.umd.min.js.map +1 -1
  5. package/esm2015/lib/milestone-create/milestone-create.component.js +110 -110
  6. package/esm2015/lib/milestone-edit/milestone-edit.component.js +150 -150
  7. package/esm2015/lib/milestone-list/milestone-list.component.js +90 -90
  8. package/esm2015/lib/milestone-routing.module.js +69 -69
  9. package/esm2015/lib/milestone-set-create/milestone-set-create.component.js +61 -61
  10. package/esm2015/lib/milestone-set-edit/milestone-set-edit.component.js +87 -87
  11. package/esm2015/lib/milestone.component.js +29 -29
  12. package/esm2015/lib/milestone.module.js +55 -55
  13. package/esm2015/lib/milestone.service.js +72 -72
  14. package/esm2015/lib/models/index.js +20 -0
  15. package/esm2015/lib/models/milestone-set.model.js +16 -0
  16. package/esm2015/lib/models/milestone.model.js +16 -0
  17. package/esm2015/public-api.js +23 -22
  18. package/esm2015/valtimo-milestone.js +11 -11
  19. package/fesm2015/valtimo-milestone.js +713 -664
  20. package/fesm2015/valtimo-milestone.js.map +1 -1
  21. package/lib/milestone-create/milestone-create.component.d.ts +28 -28
  22. package/lib/milestone-edit/milestone-edit.component.d.ts +33 -33
  23. package/lib/milestone-list/milestone-list.component.d.ts +23 -23
  24. package/lib/milestone-routing.module.d.ts +2 -2
  25. package/lib/milestone-set-create/milestone-set-create.component.d.ts +19 -19
  26. package/lib/milestone-set-edit/milestone-set-edit.component.d.ts +23 -23
  27. package/lib/milestone.component.d.ts +5 -5
  28. package/lib/milestone.module.d.ts +2 -2
  29. package/lib/milestone.service.d.ts +21 -21
  30. package/lib/models/index.d.ts +2 -0
  31. package/lib/models/milestone-set.model.d.ts +4 -0
  32. package/lib/models/milestone.model.d.ts +10 -0
  33. package/package.json +1 -1
  34. package/public-api.d.ts +4 -3
  35. package/valtimo-milestone.d.ts +10 -10
  36. package/valtimo-milestone.metadata.json +1 -1
@@ -1,1042 +1,1092 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@valtimo/config'), require('@angular/forms'), require('@valtimo/components'), require('@angular/router'), require('@angular/common'), require('@valtimo/security'), require('@valtimo/process'), require('rxjs/operators'), require('@valtimo/contract'), require('rxjs'), require('ngx-color-picker'), require('@ngx-translate/core')) :
3
- typeof define === 'function' && define.amd ? define('@valtimo/milestone', ['exports', '@angular/core', '@angular/common/http', '@valtimo/config', '@angular/forms', '@valtimo/components', '@angular/router', '@angular/common', '@valtimo/security', '@valtimo/process', 'rxjs/operators', '@valtimo/contract', 'rxjs', 'ngx-color-picker', '@ngx-translate/core'], factory) :
4
- (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.milestone = {}), global.ng.core, global.ng.common.http, global.config, global.ng.forms, global.components, global.ng.router, global.ng.common, global.security, global.process, global.rxjs.operators, global.contract, global.rxjs, global.ngxColorPicker, global.core$1));
5
- }(this, (function (exports, i0, i2, i1, forms, components, router, common, security, process, operators, contract, rxjs, ngxColorPicker, core) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('@valtimo/config'), require('@angular/forms'), require('@valtimo/components'), require('@angular/router'), require('@angular/common'), require('@valtimo/security'), require('@valtimo/process'), require('rxjs/operators'), require('rxjs'), require('ngx-color-picker'), require('@ngx-translate/core')) :
3
+ typeof define === 'function' && define.amd ? define('@valtimo/milestone', ['exports', '@angular/core', '@angular/common/http', '@valtimo/config', '@angular/forms', '@valtimo/components', '@angular/router', '@angular/common', '@valtimo/security', '@valtimo/process', 'rxjs/operators', 'rxjs', 'ngx-color-picker', '@ngx-translate/core'], factory) :
4
+ (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.milestone = {}), global.ng.core, global.ng.common.http, global.config, global.ng.forms, global.components, global.ng.router, global.ng.common, global.security, global.process, global.rxjs.operators, global.rxjs, global.ngxColorPicker, global.core$1));
5
+ }(this, (function (exports, i0, i2, i1, forms, components, router, common, security, process, operators, rxjs, ngxColorPicker, core) { 'use strict';
6
6
 
7
- /*
8
- * Copyright 2015-2020 Ritense BV, the Netherlands.
9
- *
10
- * Licensed under EUPL, Version 1.2 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" basis,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- var MilestoneService = /** @class */ (function () {
23
- function MilestoneService(configService, http) {
24
- this.configService = configService;
25
- this.http = http;
26
- this.valtimoApiConfig = configService.config.valtimoApi;
27
- }
28
- MilestoneService.prototype.getMilestones = function () {
29
- return this.http.get(this.valtimoApiConfig.endpointUri + "milestones");
30
- };
31
- MilestoneService.prototype.getMilestone = function (milestoneId) {
32
- return this.http.get(this.valtimoApiConfig.endpointUri + "milestones/" + milestoneId);
33
- };
34
- MilestoneService.prototype.createMilestone = function (milestone) {
35
- return this.http.post(this.valtimoApiConfig.endpointUri + "milestones", milestone);
36
- };
37
- MilestoneService.prototype.updateMilestone = function (milestone) {
38
- return this.http.post(this.valtimoApiConfig.endpointUri + "milestones", milestone);
39
- };
40
- MilestoneService.prototype.deleteMilestone = function (milestoneId) {
41
- return this.http.delete(this.valtimoApiConfig.endpointUri + "milestones/" + milestoneId);
42
- };
43
- MilestoneService.prototype.getMilestoneSets = function () {
44
- return this.http.get(this.valtimoApiConfig.endpointUri + "milestone-sets");
45
- };
46
- MilestoneService.prototype.getMilestoneSet = function (milestoneSetId) {
47
- return this.http.get(this.valtimoApiConfig.endpointUri + "milestone-sets/" + milestoneSetId);
48
- };
49
- MilestoneService.prototype.createMilestoneSet = function (milestoneSet) {
50
- return this.http.post(this.valtimoApiConfig.endpointUri + "milestone-sets", milestoneSet);
51
- };
52
- MilestoneService.prototype.updateMilestoneSet = function (milestoneSet) {
53
- return this.http.post(this.valtimoApiConfig.endpointUri + "milestone-sets", milestoneSet);
54
- };
55
- MilestoneService.prototype.deleteMilestoneSet = function (milestoneSetId) {
56
- return this.http.delete(this.valtimoApiConfig.endpointUri + "milestone-sets/" + milestoneSetId);
57
- };
58
- MilestoneService.prototype.getFlownodes = function (processDefinitionId) {
59
- return this.http.get(this.valtimoApiConfig.endpointUri + "milestones/" + processDefinitionId + "/flownodes");
60
- };
61
- return MilestoneService;
62
- }());
63
- MilestoneService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MilestoneService_Factory() { return new MilestoneService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i2.HttpClient)); }, token: MilestoneService, providedIn: "root" });
64
- MilestoneService.decorators = [
65
- { type: i0.Injectable, args: [{
66
- providedIn: 'root',
67
- },] }
68
- ];
69
- MilestoneService.ctorParameters = function () { return [
70
- { type: i1.ConfigService },
71
- { type: i2.HttpClient }
7
+ /*
8
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
9
+ *
10
+ * Licensed under EUPL, Version 1.2 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" basis,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+
23
+ /*
24
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
25
+ *
26
+ * Licensed under EUPL, Version 1.2 (the "License");
27
+ * you may not use this file except in compliance with the License.
28
+ * You may obtain a copy of the License at
29
+ *
30
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
31
+ *
32
+ * Unless required by applicable law or agreed to in writing, software
33
+ * distributed under the License is distributed on an "AS IS" basis,
34
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
35
+ * See the License for the specific language governing permissions and
36
+ * limitations under the License.
37
+ */
38
+
39
+ /*
40
+ *
41
+ * * Copyright 2015-2020 Ritense BV, the Netherlands.
42
+ * *
43
+ * * Licensed under EUPL, Version 1.2 (the "License");
44
+ * * you may not use this file except in compliance with the License.
45
+ * * You may obtain a copy of the License at
46
+ * *
47
+ * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
48
+ * *
49
+ * * Unless required by applicable law or agreed to in writing, software
50
+ * * distributed under the License is distributed on an "AS IS" basis,
51
+ * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
52
+ * * See the License for the specific language governing permissions and
53
+ * * limitations under the License.
54
+ *
55
+ */
56
+
57
+ /*
58
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
59
+ *
60
+ * Licensed under EUPL, Version 1.2 (the "License");
61
+ * you may not use this file except in compliance with the License.
62
+ * You may obtain a copy of the License at
63
+ *
64
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
65
+ *
66
+ * Unless required by applicable law or agreed to in writing, software
67
+ * distributed under the License is distributed on an "AS IS" basis,
68
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
69
+ * See the License for the specific language governing permissions and
70
+ * limitations under the License.
71
+ */
72
+ var MilestoneService = /** @class */ (function () {
73
+ function MilestoneService(configService, http) {
74
+ this.configService = configService;
75
+ this.http = http;
76
+ this.valtimoApiConfig = configService.config.valtimoApi;
77
+ }
78
+ MilestoneService.prototype.getMilestones = function () {
79
+ return this.http.get(this.valtimoApiConfig.endpointUri + "milestones");
80
+ };
81
+ MilestoneService.prototype.getMilestone = function (milestoneId) {
82
+ return this.http.get(this.valtimoApiConfig.endpointUri + "milestones/" + milestoneId);
83
+ };
84
+ MilestoneService.prototype.createMilestone = function (milestone) {
85
+ return this.http.post(this.valtimoApiConfig.endpointUri + "milestones", milestone);
86
+ };
87
+ MilestoneService.prototype.updateMilestone = function (milestone) {
88
+ return this.http.post(this.valtimoApiConfig.endpointUri + "milestones", milestone);
89
+ };
90
+ MilestoneService.prototype.deleteMilestone = function (milestoneId) {
91
+ return this.http.delete(this.valtimoApiConfig.endpointUri + "milestones/" + milestoneId);
92
+ };
93
+ MilestoneService.prototype.getMilestoneSets = function () {
94
+ return this.http.get(this.valtimoApiConfig.endpointUri + "milestone-sets");
95
+ };
96
+ MilestoneService.prototype.getMilestoneSet = function (milestoneSetId) {
97
+ return this.http.get(this.valtimoApiConfig.endpointUri + "milestone-sets/" + milestoneSetId);
98
+ };
99
+ MilestoneService.prototype.createMilestoneSet = function (milestoneSet) {
100
+ return this.http.post(this.valtimoApiConfig.endpointUri + "milestone-sets", milestoneSet);
101
+ };
102
+ MilestoneService.prototype.updateMilestoneSet = function (milestoneSet) {
103
+ return this.http.post(this.valtimoApiConfig.endpointUri + "milestone-sets", milestoneSet);
104
+ };
105
+ MilestoneService.prototype.deleteMilestoneSet = function (milestoneSetId) {
106
+ return this.http.delete(this.valtimoApiConfig.endpointUri + "milestone-sets/" + milestoneSetId);
107
+ };
108
+ MilestoneService.prototype.getFlownodes = function (processDefinitionId) {
109
+ return this.http.get(this.valtimoApiConfig.endpointUri + "milestones/" + processDefinitionId + "/flownodes");
110
+ };
111
+ return MilestoneService;
112
+ }());
113
+ MilestoneService.ɵprov = i0.ɵɵdefineInjectable({ factory: function MilestoneService_Factory() { return new MilestoneService(i0.ɵɵinject(i1.ConfigService), i0.ɵɵinject(i2.HttpClient)); }, token: MilestoneService, providedIn: "root" });
114
+ MilestoneService.decorators = [
115
+ { type: i0.Injectable, args: [{
116
+ providedIn: 'root',
117
+ },] }
118
+ ];
119
+ MilestoneService.ctorParameters = function () { return [
120
+ { type: i1.ConfigService },
121
+ { type: i2.HttpClient }
72
122
  ]; };
73
123
 
74
- /*
75
- * Copyright 2015-2020 Ritense BV, the Netherlands.
76
- *
77
- * Licensed under EUPL, Version 1.2 (the "License");
78
- * you may not use this file except in compliance with the License.
79
- * You may obtain a copy of the License at
80
- *
81
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
82
- *
83
- * Unless required by applicable law or agreed to in writing, software
84
- * distributed under the License is distributed on an "AS IS" basis,
85
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
86
- * See the License for the specific language governing permissions and
87
- * limitations under the License.
88
- */
89
- var MilestoneComponent = /** @class */ (function () {
90
- function MilestoneComponent() {
91
- }
92
- MilestoneComponent.prototype.ngOnInit = function () { };
93
- return MilestoneComponent;
94
- }());
95
- MilestoneComponent.decorators = [
96
- { type: i0.Component, args: [{
97
- selector: 'valtimo-milestone',
98
- template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'sets/create'\" class=\"btn btn-primary btn-space\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n <span>{{ 'Create new Milestone Set' | translate }}</span>\n </button>\n <button [routerLink]=\"'create'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n <span>{{ 'Create new Milestone' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-milestone-list></valtimo-milestone-list>\n </div>\n</div>\n",
99
- 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 */"]
100
- },] }
101
- ];
124
+ /*
125
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
126
+ *
127
+ * Licensed under EUPL, Version 1.2 (the "License");
128
+ * you may not use this file except in compliance with the License.
129
+ * You may obtain a copy of the License at
130
+ *
131
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
132
+ *
133
+ * Unless required by applicable law or agreed to in writing, software
134
+ * distributed under the License is distributed on an "AS IS" basis,
135
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
136
+ * See the License for the specific language governing permissions and
137
+ * limitations under the License.
138
+ */
139
+ var MilestoneComponent = /** @class */ (function () {
140
+ function MilestoneComponent() {
141
+ }
142
+ MilestoneComponent.prototype.ngOnInit = function () { };
143
+ return MilestoneComponent;
144
+ }());
145
+ MilestoneComponent.decorators = [
146
+ { type: i0.Component, args: [{
147
+ selector: 'valtimo-milestone',
148
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"main-content pt-0\">\n <div class=\"container-fluid\">\n <div class=\"text-right\">\n <div class=\"btn-group mt-m3px mb-3\">\n <button [routerLink]=\"'sets/create'\" class=\"btn btn-primary btn-space\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n <span>{{ 'Create new Milestone Set' | translate }}</span>\n </button>\n <button [routerLink]=\"'create'\" class=\"btn btn-primary btn-space mr-0\">\n <i class=\"icon mdi mdi-plus\"></i> &nbsp;\n <span>{{ 'Create new Milestone' | translate }}</span>\n </button>\n </div>\n </div>\n <valtimo-milestone-list></valtimo-milestone-list>\n </div>\n</div>\n",
149
+ 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 */"]
150
+ },] }
151
+ ];
102
152
  MilestoneComponent.ctorParameters = function () { return []; };
103
153
 
104
- /*
105
- * Copyright 2015-2020 Ritense BV, the Netherlands.
106
- *
107
- * Licensed under EUPL, Version 1.2 (the "License");
108
- * you may not use this file except in compliance with the License.
109
- * You may obtain a copy of the License at
110
- *
111
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
112
- *
113
- * Unless required by applicable law or agreed to in writing, software
114
- * distributed under the License is distributed on an "AS IS" basis,
115
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
116
- * See the License for the specific language governing permissions and
117
- * limitations under the License.
118
- */
119
- var MilestoneSetCreateComponent = /** @class */ (function () {
120
- function MilestoneSetCreateComponent(milestoneService, formBuilder, router, alertService) {
121
- this.milestoneService = milestoneService;
122
- this.formBuilder = formBuilder;
123
- this.router = router;
124
- this.alertService = alertService;
125
- }
126
- Object.defineProperty(MilestoneSetCreateComponent.prototype, "formControls", {
127
- get: function () {
128
- return this.form.controls;
129
- },
130
- enumerable: false,
131
- configurable: true
132
- });
133
- MilestoneSetCreateComponent.prototype.ngOnInit = function () {
134
- this.form = this.formBuilder.group({
135
- title: new forms.FormControl('', forms.Validators.required),
136
- });
137
- };
138
- MilestoneSetCreateComponent.prototype.reset = function () {
139
- this.form.setValue({
140
- title: '',
141
- });
142
- };
143
- MilestoneSetCreateComponent.prototype.createMilestoneSet = function () {
144
- var _this = this;
145
- this.milestoneService.createMilestoneSet(this.form.value).subscribe(function () {
146
- _this.router.navigate(['/milestones']);
147
- _this.alertService.success('New Milestone set has been created');
148
- });
149
- };
150
- return MilestoneSetCreateComponent;
151
- }());
152
- MilestoneSetCreateComponent.decorators = [
153
- { type: i0.Component, args: [{
154
- selector: 'valtimo-milestone-set-create',
155
- 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)=\"createMilestoneSet()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Milestone set title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/milestones'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
156
- 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 */"]
157
- },] }
158
- ];
159
- MilestoneSetCreateComponent.ctorParameters = function () { return [
160
- { type: MilestoneService },
161
- { type: forms.FormBuilder },
162
- { type: router.Router },
163
- { type: components.AlertService }
154
+ /*
155
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
156
+ *
157
+ * Licensed under EUPL, Version 1.2 (the "License");
158
+ * you may not use this file except in compliance with the License.
159
+ * You may obtain a copy of the License at
160
+ *
161
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
162
+ *
163
+ * Unless required by applicable law or agreed to in writing, software
164
+ * distributed under the License is distributed on an "AS IS" basis,
165
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
166
+ * See the License for the specific language governing permissions and
167
+ * limitations under the License.
168
+ */
169
+ var MilestoneSetCreateComponent = /** @class */ (function () {
170
+ function MilestoneSetCreateComponent(milestoneService, formBuilder, router, alertService) {
171
+ this.milestoneService = milestoneService;
172
+ this.formBuilder = formBuilder;
173
+ this.router = router;
174
+ this.alertService = alertService;
175
+ }
176
+ Object.defineProperty(MilestoneSetCreateComponent.prototype, "formControls", {
177
+ get: function () {
178
+ return this.form.controls;
179
+ },
180
+ enumerable: false,
181
+ configurable: true
182
+ });
183
+ MilestoneSetCreateComponent.prototype.ngOnInit = function () {
184
+ this.form = this.formBuilder.group({
185
+ title: new forms.FormControl('', forms.Validators.required),
186
+ });
187
+ };
188
+ MilestoneSetCreateComponent.prototype.reset = function () {
189
+ this.form.setValue({
190
+ title: '',
191
+ });
192
+ };
193
+ MilestoneSetCreateComponent.prototype.createMilestoneSet = function () {
194
+ var _this = this;
195
+ this.milestoneService.createMilestoneSet(this.form.value).subscribe(function () {
196
+ _this.router.navigate(['/milestones']);
197
+ _this.alertService.success('New Milestone set has been created');
198
+ });
199
+ };
200
+ return MilestoneSetCreateComponent;
201
+ }());
202
+ MilestoneSetCreateComponent.decorators = [
203
+ { type: i0.Component, args: [{
204
+ selector: 'valtimo-milestone-set-create',
205
+ 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)=\"createMilestoneSet()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Milestone set title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/milestones'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
206
+ 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 */"]
207
+ },] }
208
+ ];
209
+ MilestoneSetCreateComponent.ctorParameters = function () { return [
210
+ { type: MilestoneService },
211
+ { type: forms.FormBuilder },
212
+ { type: router.Router },
213
+ { type: components.AlertService }
164
214
  ]; };
165
215
 
166
- /*
167
- * Copyright 2015-2020 Ritense BV, the Netherlands.
168
- *
169
- * Licensed under EUPL, Version 1.2 (the "License");
170
- * you may not use this file except in compliance with the License.
171
- * You may obtain a copy of the License at
172
- *
173
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
174
- *
175
- * Unless required by applicable law or agreed to in writing, software
176
- * distributed under the License is distributed on an "AS IS" basis,
177
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
178
- * See the License for the specific language governing permissions and
179
- * limitations under the License.
180
- */
181
- var MilestoneCreateComponent = /** @class */ (function () {
182
- function MilestoneCreateComponent(milestoneService, formBuilder, router, alertService, processService) {
183
- this.milestoneService = milestoneService;
184
- this.formBuilder = formBuilder;
185
- this.router = router;
186
- this.alertService = alertService;
187
- this.processService = processService;
188
- this.milestoneSets = [];
189
- this.processDefinitions = [];
190
- this.taskDefinitions = [];
191
- }
192
- Object.defineProperty(MilestoneCreateComponent.prototype, "formControls", {
193
- get: function () {
194
- return this.form.controls;
195
- },
196
- enumerable: false,
197
- configurable: true
198
- });
199
- MilestoneCreateComponent.prototype.ngOnInit = function () {
200
- this.form = this.formBuilder.group({
201
- milestoneSet: new forms.FormControl('', forms.Validators.required),
202
- title: new forms.FormControl('', forms.Validators.required),
203
- processDefinitionKey: new forms.FormControl('', forms.Validators.required),
204
- taskDefinitionKey: new forms.FormControl('', forms.Validators.required),
205
- plannedIntervalInDays: new forms.FormControl('', [
206
- forms.Validators.required,
207
- forms.Validators.pattern('^[0-9]*$'),
208
- ]),
209
- color: new forms.FormControl('', [
210
- forms.Validators.required,
211
- forms.Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),
212
- ]),
213
- });
214
- this.getMilestoneSets();
215
- this.getMilestones();
216
- };
217
- MilestoneCreateComponent.prototype.reset = function () {
218
- this.form.patchValue({
219
- milestoneSet: '',
220
- title: '',
221
- processDefinitionKey: '',
222
- taskDefinitionKey: '',
223
- plannedIntervalInDays: '',
224
- color: '',
225
- });
226
- };
227
- MilestoneCreateComponent.prototype.getMilestoneSets = function () {
228
- var _this = this;
229
- this.milestoneService.getMilestoneSets().subscribe(function (milesetoneSets) {
230
- _this.milestoneSets = milesetoneSets;
231
- });
232
- };
233
- MilestoneCreateComponent.prototype.getMilestones = function () {
234
- var _this = this;
235
- this.processService
236
- .getProcessDefinitions()
237
- .subscribe(function (processDefinitions) {
238
- _this.processDefinitions = processDefinitions;
239
- });
240
- };
241
- MilestoneCreateComponent.prototype.getFlownodes = function (processDefinitionId) {
242
- var _this = this;
243
- if (processDefinitionId) {
244
- this.milestoneService.getFlownodes(processDefinitionId).subscribe(function (flowNodes) {
245
- _this.taskDefinitions = flowNodes['flowNodeMap'];
246
- _this.form.controls.taskDefinitionKey.setValue('');
247
- });
248
- }
249
- };
250
- MilestoneCreateComponent.prototype.createMilestone = function () {
251
- var _this = this;
252
- var milestone = this.form.value;
253
- milestone.processDefinitionKey = milestone.processDefinitionKey['key'];
254
- milestone.id = null;
255
- this.milestoneService.createMilestone(milestone).subscribe(function () {
256
- _this.router.navigate(['/milestones']);
257
- _this.alertService.success('New Milestone has been created');
258
- }, function (err) {
259
- _this.alertService.error('Error creating new milestone');
260
- });
261
- };
262
- return MilestoneCreateComponent;
263
- }());
264
- MilestoneCreateComponent.decorators = [
265
- { type: i0.Component, args: [{
266
- selector: 'valtimo-milestone-create',
267
- 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)=\"createMilestone()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Milestone set</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"milestoneSet\"\n formControlName=\"milestoneSet\"\n class=\"form-control\"\n [ngClass]=\"{\n 'is-valid':\n formControls.milestoneSet.touched && formControls.milestoneSet.valid,\n 'is-invalid':\n formControls.milestoneSet.touched && formControls.milestoneSet.errors\n }\"\n required\n >\n <option value=\"\" selected disabled>Choose a Milestone set</option>\n <option *ngFor=\"let milestoneSet of milestoneSets\" [value]=\"milestoneSet.id\">\n {{ milestoneSet.title }} ({{ milestoneSet.id }})\n </option>\n </select>\n <div\n *ngIf=\"formControls.milestoneSet.touched && formControls.milestoneSet.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.milestoneSet.errors.required\">\n Milestone set is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Milestone title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"process\"\n >Process definition</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"process\"\n formControlName=\"processDefinitionKey\"\n class=\"form-control\"\n (ngModelChange)=\"getFlownodes($event.id)\"\n [ngClass]=\"{\n 'is-valid':\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.valid,\n 'is-invalid':\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.errors\n }\"\n required\n >\n <option value=\"\" selected disabled>Choose a process</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n <div\n *ngIf=\"\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.processDefinitionKey.errors.required\">\n Process is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"process\">Task</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"task\"\n formControlName=\"taskDefinitionKey\"\n class=\"form-control\"\n [ngClass]=\"{\n 'is-valid':\n formControls.taskDefinitionKey.touched &&\n formControls.taskDefinitionKey.valid,\n 'is-invalid':\n formControls.taskDefinitionKey.touched &&\n formControls.taskDefinitionKey.errors\n }\"\n required\n >\n <option value=\"\" selected disabled>Choose a task</option>\n <option\n *ngFor=\"let taskDefinition of taskDefinitions | keyvalue\"\n [value]=\"taskDefinition.key\"\n >\n {{ taskDefinition.value }} ({{ taskDefinition.key }})\n </option>\n </select>\n <div\n *ngIf=\"\n formControls.taskDefinitionKey.touched && formControls.taskDefinitionKey.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.taskDefinitionKey.errors.required\">Task is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"interval\"\n >Interval (in days)</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"interval\"\n formControlName=\"plannedIntervalInDays\"\n class=\"form-control\"\n placeholder=\"Interval (in days)\"\n [ngClass]=\"{\n 'is-valid':\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.valid,\n 'is-invalid':\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.errors\n }\"\n required\n />\n <div\n *ngIf=\"\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.plannedIntervalInDays.errors.required\">\n Interval is required\n </div>\n <div *ngIf=\"formControls.plannedIntervalInDays.errors.pattern\">\n Interval is not a valid number\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"color\">Color</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n [colorPicker]=\"form.value.color\"\n (colorPickerChange)=\"form.controls.color.setValue($event)\"\n [style.background]=\"form.value.color\"\n type=\"text\"\n id=\"color\"\n formControlName=\"color\"\n class=\"form-control\"\n placeholder=\"Color\"\n [ngClass]=\"{\n 'is-valid': formControls.color.touched && formControls.color.valid,\n 'is-invalid': formControls.color.touched && formControls.color.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.color.touched && formControls.color.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.color.errors.required\">Interval is required</div>\n <div *ngIf=\"formControls.color.errors.pattern\">Color is not a valid hex code</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/milestones'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
268
- 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 */"]
269
- },] }
270
- ];
271
- MilestoneCreateComponent.ctorParameters = function () { return [
272
- { type: MilestoneService },
273
- { type: forms.FormBuilder },
274
- { type: router.Router },
275
- { type: components.AlertService },
276
- { type: process.ProcessService }
216
+ /*
217
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
218
+ *
219
+ * Licensed under EUPL, Version 1.2 (the "License");
220
+ * you may not use this file except in compliance with the License.
221
+ * You may obtain a copy of the License at
222
+ *
223
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
224
+ *
225
+ * Unless required by applicable law or agreed to in writing, software
226
+ * distributed under the License is distributed on an "AS IS" basis,
227
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
228
+ * See the License for the specific language governing permissions and
229
+ * limitations under the License.
230
+ */
231
+ var MilestoneCreateComponent = /** @class */ (function () {
232
+ function MilestoneCreateComponent(milestoneService, formBuilder, router, alertService, processService) {
233
+ this.milestoneService = milestoneService;
234
+ this.formBuilder = formBuilder;
235
+ this.router = router;
236
+ this.alertService = alertService;
237
+ this.processService = processService;
238
+ this.milestoneSets = [];
239
+ this.processDefinitions = [];
240
+ this.taskDefinitions = [];
241
+ }
242
+ Object.defineProperty(MilestoneCreateComponent.prototype, "formControls", {
243
+ get: function () {
244
+ return this.form.controls;
245
+ },
246
+ enumerable: false,
247
+ configurable: true
248
+ });
249
+ MilestoneCreateComponent.prototype.ngOnInit = function () {
250
+ this.form = this.formBuilder.group({
251
+ milestoneSet: new forms.FormControl('', forms.Validators.required),
252
+ title: new forms.FormControl('', forms.Validators.required),
253
+ processDefinitionKey: new forms.FormControl('', forms.Validators.required),
254
+ taskDefinitionKey: new forms.FormControl('', forms.Validators.required),
255
+ plannedIntervalInDays: new forms.FormControl('', [
256
+ forms.Validators.required,
257
+ forms.Validators.pattern('^[0-9]*$'),
258
+ ]),
259
+ color: new forms.FormControl('', [
260
+ forms.Validators.required,
261
+ forms.Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),
262
+ ]),
263
+ });
264
+ this.getMilestoneSets();
265
+ this.getMilestones();
266
+ };
267
+ MilestoneCreateComponent.prototype.reset = function () {
268
+ this.form.patchValue({
269
+ milestoneSet: '',
270
+ title: '',
271
+ processDefinitionKey: '',
272
+ taskDefinitionKey: '',
273
+ plannedIntervalInDays: '',
274
+ color: '',
275
+ });
276
+ };
277
+ MilestoneCreateComponent.prototype.getMilestoneSets = function () {
278
+ var _this = this;
279
+ this.milestoneService.getMilestoneSets().subscribe(function (milesetoneSets) {
280
+ _this.milestoneSets = milesetoneSets;
281
+ });
282
+ };
283
+ MilestoneCreateComponent.prototype.getMilestones = function () {
284
+ var _this = this;
285
+ this.processService
286
+ .getProcessDefinitions()
287
+ .subscribe(function (processDefinitions) {
288
+ _this.processDefinitions = processDefinitions;
289
+ });
290
+ };
291
+ MilestoneCreateComponent.prototype.getFlownodes = function (processDefinitionId) {
292
+ var _this = this;
293
+ if (processDefinitionId) {
294
+ this.milestoneService.getFlownodes(processDefinitionId).subscribe(function (flowNodes) {
295
+ _this.taskDefinitions = flowNodes['flowNodeMap'];
296
+ _this.form.controls.taskDefinitionKey.setValue('');
297
+ });
298
+ }
299
+ };
300
+ MilestoneCreateComponent.prototype.createMilestone = function () {
301
+ var _this = this;
302
+ var milestone = this.form.value;
303
+ milestone.processDefinitionKey = milestone.processDefinitionKey['key'];
304
+ milestone.id = null;
305
+ this.milestoneService.createMilestone(milestone).subscribe(function () {
306
+ _this.router.navigate(['/milestones']);
307
+ _this.alertService.success('New Milestone has been created');
308
+ }, function (err) {
309
+ _this.alertService.error('Error creating new milestone');
310
+ });
311
+ };
312
+ return MilestoneCreateComponent;
313
+ }());
314
+ MilestoneCreateComponent.decorators = [
315
+ { type: i0.Component, args: [{
316
+ selector: 'valtimo-milestone-create',
317
+ 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)=\"createMilestone()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Milestone set</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"milestoneSet\"\n formControlName=\"milestoneSet\"\n class=\"form-control\"\n [ngClass]=\"{\n 'is-valid':\n formControls.milestoneSet.touched && formControls.milestoneSet.valid,\n 'is-invalid':\n formControls.milestoneSet.touched && formControls.milestoneSet.errors\n }\"\n required\n >\n <option value=\"\" selected disabled>Choose a Milestone set</option>\n <option *ngFor=\"let milestoneSet of milestoneSets\" [value]=\"milestoneSet.id\">\n {{ milestoneSet.title }} ({{ milestoneSet.id }})\n </option>\n </select>\n <div\n *ngIf=\"formControls.milestoneSet.touched && formControls.milestoneSet.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.milestoneSet.errors.required\">\n Milestone set is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Milestone title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"process\"\n >Process definition</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"process\"\n formControlName=\"processDefinitionKey\"\n class=\"form-control\"\n (ngModelChange)=\"getFlownodes($event.id)\"\n [ngClass]=\"{\n 'is-valid':\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.valid,\n 'is-invalid':\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.errors\n }\"\n required\n >\n <option value=\"\" selected disabled>Choose a process</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n <div\n *ngIf=\"\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.processDefinitionKey.errors.required\">\n Process is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"process\">Task</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"task\"\n formControlName=\"taskDefinitionKey\"\n class=\"form-control\"\n [ngClass]=\"{\n 'is-valid':\n formControls.taskDefinitionKey.touched &&\n formControls.taskDefinitionKey.valid,\n 'is-invalid':\n formControls.taskDefinitionKey.touched &&\n formControls.taskDefinitionKey.errors\n }\"\n required\n >\n <option value=\"\" selected disabled>Choose a task</option>\n <option\n *ngFor=\"let taskDefinition of taskDefinitions | keyvalue\"\n [value]=\"taskDefinition.key\"\n >\n {{ taskDefinition.value }} ({{ taskDefinition.key }})\n </option>\n </select>\n <div\n *ngIf=\"\n formControls.taskDefinitionKey.touched && formControls.taskDefinitionKey.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.taskDefinitionKey.errors.required\">Task is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"interval\"\n >Interval (in days)</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"interval\"\n formControlName=\"plannedIntervalInDays\"\n class=\"form-control\"\n placeholder=\"Interval (in days)\"\n [ngClass]=\"{\n 'is-valid':\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.valid,\n 'is-invalid':\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.errors\n }\"\n required\n />\n <div\n *ngIf=\"\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.plannedIntervalInDays.errors.required\">\n Interval is required\n </div>\n <div *ngIf=\"formControls.plannedIntervalInDays.errors.pattern\">\n Interval is not a valid number\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"color\">Color</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n [colorPicker]=\"form.value.color\"\n (colorPickerChange)=\"form.controls.color.setValue($event)\"\n [style.background]=\"form.value.color\"\n type=\"text\"\n id=\"color\"\n formControlName=\"color\"\n class=\"form-control\"\n placeholder=\"Color\"\n [ngClass]=\"{\n 'is-valid': formControls.color.touched && formControls.color.valid,\n 'is-invalid': formControls.color.touched && formControls.color.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.color.touched && formControls.color.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.color.errors.required\">Interval is required</div>\n <div *ngIf=\"formControls.color.errors.pattern\">Color is not a valid hex code</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/milestones'\" class=\"btn btn-space btn-default\">Back</a>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
318
+ 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 */"]
319
+ },] }
320
+ ];
321
+ MilestoneCreateComponent.ctorParameters = function () { return [
322
+ { type: MilestoneService },
323
+ { type: forms.FormBuilder },
324
+ { type: router.Router },
325
+ { type: components.AlertService },
326
+ { type: process.ProcessService }
277
327
  ]; };
278
328
 
279
- /*
280
- * Copyright 2015-2020 Ritense BV, the Netherlands.
281
- *
282
- * Licensed under EUPL, Version 1.2 (the "License");
283
- * you may not use this file except in compliance with the License.
284
- * You may obtain a copy of the License at
285
- *
286
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
287
- *
288
- * Unless required by applicable law or agreed to in writing, software
289
- * distributed under the License is distributed on an "AS IS" basis,
290
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
291
- * See the License for the specific language governing permissions and
292
- * limitations under the License.
293
- */
294
- var MilestoneSetEditComponent = /** @class */ (function () {
295
- function MilestoneSetEditComponent(milestoneService, formBuilder, router, alertService, route) {
296
- this.milestoneService = milestoneService;
297
- this.formBuilder = formBuilder;
298
- this.router = router;
299
- this.alertService = alertService;
300
- this.route = route;
301
- }
302
- Object.defineProperty(MilestoneSetEditComponent.prototype, "formControls", {
303
- get: function () {
304
- return this.form.controls;
305
- },
306
- enumerable: false,
307
- configurable: true
308
- });
309
- MilestoneSetEditComponent.prototype.ngOnInit = function () {
310
- this.form = this.formBuilder.group({
311
- id: new forms.FormControl({ value: '', disabled: true }, forms.Validators.required),
312
- title: new forms.FormControl({}, forms.Validators.required),
313
- });
314
- this.getMilestoneSet();
315
- };
316
- MilestoneSetEditComponent.prototype.reset = function () {
317
- this.form.controls.title.setValue('');
318
- };
319
- MilestoneSetEditComponent.prototype.getMilestoneSet = function () {
320
- var _this = this;
321
- var milestoneSetId = this.route.snapshot.paramMap.get('id');
322
- this.milestoneService
323
- .getMilestoneSet(+milestoneSetId)
324
- .subscribe(function (milestoneSet) {
325
- _this.form.setValue({
326
- id: milestoneSet.id,
327
- title: milestoneSet.title,
328
- });
329
- });
330
- };
331
- MilestoneSetEditComponent.prototype.delete = function () {
332
- // Todo: add confirmation dialog after it's fixed
333
- this.deleteMilestoneSet();
334
- };
335
- MilestoneSetEditComponent.prototype.deleteMilestoneSet = function () {
336
- var _this = this;
337
- this.milestoneService.deleteMilestoneSet(this.form.getRawValue().id).subscribe(function () {
338
- _this.router.navigate(['/milestones']);
339
- _this.alertService.success('Milestone set has been deleted');
340
- }, function (err) {
341
- _this.router.navigate(['/milestones']);
342
- _this.alertService.error('Could not delete Milestone set. Make sure this Milestone set does not contain any milestones.');
343
- });
344
- };
345
- MilestoneSetEditComponent.prototype.updateMilestoneSet = function () {
346
- var _this = this;
347
- this.milestoneService.updateMilestoneSet(this.form.getRawValue()).subscribe(function () {
348
- _this.router.navigate(['/milestones']);
349
- _this.alertService.success('Milestone set has been updated');
350
- });
351
- };
352
- return MilestoneSetEditComponent;
353
- }());
354
- MilestoneSetEditComponent.decorators = [
355
- { type: i0.Component, args: [{
356
- selector: 'valtimo-milestone-set-edit',
357
- 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=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ form.getRawValue().id }}</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"updateMilestoneSet()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Milestone set title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/milestones'\" class=\"btn btn-space btn-default\">Back</a>\n <button type=\"button\" class=\"btn btn-space btn-danger\" (click)=\"delete()\">\n Delete\n </button>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
358
- 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 */"]
359
- },] }
360
- ];
361
- MilestoneSetEditComponent.ctorParameters = function () { return [
362
- { type: MilestoneService },
363
- { type: forms.FormBuilder },
364
- { type: router.Router },
365
- { type: components.AlertService },
366
- { type: router.ActivatedRoute }
329
+ /*
330
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
331
+ *
332
+ * Licensed under EUPL, Version 1.2 (the "License");
333
+ * you may not use this file except in compliance with the License.
334
+ * You may obtain a copy of the License at
335
+ *
336
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
337
+ *
338
+ * Unless required by applicable law or agreed to in writing, software
339
+ * distributed under the License is distributed on an "AS IS" basis,
340
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
341
+ * See the License for the specific language governing permissions and
342
+ * limitations under the License.
343
+ */
344
+ var MilestoneSetEditComponent = /** @class */ (function () {
345
+ function MilestoneSetEditComponent(milestoneService, formBuilder, router, alertService, route) {
346
+ this.milestoneService = milestoneService;
347
+ this.formBuilder = formBuilder;
348
+ this.router = router;
349
+ this.alertService = alertService;
350
+ this.route = route;
351
+ }
352
+ Object.defineProperty(MilestoneSetEditComponent.prototype, "formControls", {
353
+ get: function () {
354
+ return this.form.controls;
355
+ },
356
+ enumerable: false,
357
+ configurable: true
358
+ });
359
+ MilestoneSetEditComponent.prototype.ngOnInit = function () {
360
+ this.form = this.formBuilder.group({
361
+ id: new forms.FormControl({ value: '', disabled: true }, forms.Validators.required),
362
+ title: new forms.FormControl({}, forms.Validators.required),
363
+ });
364
+ this.getMilestoneSet();
365
+ };
366
+ MilestoneSetEditComponent.prototype.reset = function () {
367
+ this.form.controls.title.setValue('');
368
+ };
369
+ MilestoneSetEditComponent.prototype.getMilestoneSet = function () {
370
+ var _this = this;
371
+ var milestoneSetId = this.route.snapshot.paramMap.get('id');
372
+ this.milestoneService
373
+ .getMilestoneSet(+milestoneSetId)
374
+ .subscribe(function (milestoneSet) {
375
+ _this.form.setValue({
376
+ id: milestoneSet.id,
377
+ title: milestoneSet.title,
378
+ });
379
+ });
380
+ };
381
+ MilestoneSetEditComponent.prototype.delete = function () {
382
+ // Todo: add confirmation dialog after it's fixed
383
+ this.deleteMilestoneSet();
384
+ };
385
+ MilestoneSetEditComponent.prototype.deleteMilestoneSet = function () {
386
+ var _this = this;
387
+ this.milestoneService.deleteMilestoneSet(this.form.getRawValue().id).subscribe(function () {
388
+ _this.router.navigate(['/milestones']);
389
+ _this.alertService.success('Milestone set has been deleted');
390
+ }, function (err) {
391
+ _this.router.navigate(['/milestones']);
392
+ _this.alertService.error('Could not delete Milestone set. Make sure this Milestone set does not contain any milestones.');
393
+ });
394
+ };
395
+ MilestoneSetEditComponent.prototype.updateMilestoneSet = function () {
396
+ var _this = this;
397
+ this.milestoneService.updateMilestoneSet(this.form.getRawValue()).subscribe(function () {
398
+ _this.router.navigate(['/milestones']);
399
+ _this.alertService.success('Milestone set has been updated');
400
+ });
401
+ };
402
+ return MilestoneSetEditComponent;
403
+ }());
404
+ MilestoneSetEditComponent.decorators = [
405
+ { type: i0.Component, args: [{
406
+ selector: 'valtimo-milestone-set-edit',
407
+ 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=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ form.getRawValue().id }}</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"updateMilestoneSet()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Milestone set title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/milestones'\" class=\"btn btn-space btn-default\">Back</a>\n <button type=\"button\" class=\"btn btn-space btn-danger\" (click)=\"delete()\">\n Delete\n </button>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
408
+ 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 */"]
409
+ },] }
410
+ ];
411
+ MilestoneSetEditComponent.ctorParameters = function () { return [
412
+ { type: MilestoneService },
413
+ { type: forms.FormBuilder },
414
+ { type: router.Router },
415
+ { type: components.AlertService },
416
+ { type: router.ActivatedRoute }
367
417
  ]; };
368
418
 
369
- /*
370
- * Copyright 2015-2020 Ritense BV, the Netherlands.
371
- *
372
- * Licensed under EUPL, Version 1.2 (the "License");
373
- * you may not use this file except in compliance with the License.
374
- * You may obtain a copy of the License at
375
- *
376
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
377
- *
378
- * Unless required by applicable law or agreed to in writing, software
379
- * distributed under the License is distributed on an "AS IS" basis,
380
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
381
- * See the License for the specific language governing permissions and
382
- * limitations under the License.
383
- */
384
- var MilestoneEditComponent = /** @class */ (function () {
385
- function MilestoneEditComponent(milestoneService, formBuilder, router, alertService, processService, route) {
386
- this.milestoneService = milestoneService;
387
- this.formBuilder = formBuilder;
388
- this.router = router;
389
- this.alertService = alertService;
390
- this.processService = processService;
391
- this.route = route;
392
- this.milestoneSets = [];
393
- this.processDefinitions = [];
394
- this.taskDefinitions = [];
395
- }
396
- Object.defineProperty(MilestoneEditComponent.prototype, "formControls", {
397
- get: function () {
398
- return this.form.controls;
399
- },
400
- enumerable: false,
401
- configurable: true
402
- });
403
- MilestoneEditComponent.prototype.ngOnInit = function () {
404
- this.form = this.formBuilder.group({
405
- id: new forms.FormControl({ value: '', disabled: true }, forms.Validators.required),
406
- milestoneSet: new forms.FormControl('', forms.Validators.required),
407
- title: new forms.FormControl('', forms.Validators.required),
408
- processDefinitionKey: new forms.FormControl('', forms.Validators.required),
409
- taskDefinitionKey: new forms.FormControl('', forms.Validators.required),
410
- plannedIntervalInDays: new forms.FormControl('', [
411
- forms.Validators.required,
412
- forms.Validators.pattern('^[0-9]*$'),
413
- ]),
414
- color: new forms.FormControl('', [
415
- forms.Validators.required,
416
- forms.Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),
417
- ]),
418
- });
419
- this.getMilestone();
420
- this.getMilestoneSets();
421
- this.getProcessDefinitions();
422
- };
423
- MilestoneEditComponent.prototype.reset = function () {
424
- this.form.patchValue({
425
- milestoneSet: '',
426
- title: '',
427
- processDefinitionKey: '',
428
- taskDefinitionKey: '',
429
- plannedIntervalInDays: '',
430
- color: '',
431
- });
432
- };
433
- MilestoneEditComponent.prototype.getMilestone = function () {
434
- var _this = this;
435
- var milestoneId = this.route.snapshot.paramMap.get('id');
436
- this.milestoneService
437
- .getMilestone(+milestoneId)
438
- .pipe(operators.switchMap(function (milestone) {
439
- _this.form.patchValue({
440
- id: milestone.id,
441
- milestoneSet: milestone.milestoneSet.id,
442
- title: milestone.title,
443
- plannedIntervalInDays: milestone.plannedIntervalInDays,
444
- color: milestone.color,
445
- taskDefinitionKey: milestone.taskDefinitionKey,
446
- });
447
- return _this.processService.getProcessDefinition(milestone.processDefinitionKey);
448
- }))
449
- .subscribe(function (processDefinition) {
450
- _this.form.patchValue({
451
- processDefinitionKey: processDefinition,
452
- });
453
- });
454
- };
455
- MilestoneEditComponent.prototype.compareProcessDefinitions = function (processDefinition1, processDefinition2) {
456
- return processDefinition1.id === processDefinition2.id;
457
- };
458
- MilestoneEditComponent.prototype.getMilestoneSets = function () {
459
- var _this = this;
460
- this.milestoneService.getMilestoneSets().subscribe(function (milesetoneSets) {
461
- _this.milestoneSets = milesetoneSets;
462
- });
463
- };
464
- MilestoneEditComponent.prototype.getProcessDefinitions = function () {
465
- var _this = this;
466
- this.processService
467
- .getProcessDefinitions()
468
- .subscribe(function (processDefinitions) {
469
- _this.processDefinitions = processDefinitions;
470
- });
471
- };
472
- MilestoneEditComponent.prototype.getFlownodes = function (processDefinitionId) {
473
- var _this = this;
474
- if (processDefinitionId) {
475
- this.milestoneService.getFlownodes(processDefinitionId).subscribe(function (flowNodes) {
476
- _this.taskDefinitions = flowNodes['flowNodeMap'];
477
- });
478
- }
479
- };
480
- MilestoneEditComponent.prototype.delete = function () {
481
- // Todo: add confirmation dialog after it's fixed
482
- this.deleteMilestone();
483
- };
484
- MilestoneEditComponent.prototype.deleteMilestone = function () {
485
- var _this = this;
486
- this.milestoneService.deleteMilestone(this.form.getRawValue().id).subscribe(function () {
487
- _this.router.navigate(['/milestones']);
488
- _this.alertService.success('Milestone has been deleted');
489
- }, function (err) {
490
- _this.router.navigate(['/milestones']);
491
- _this.alertService.error('Could not delete Milestone');
492
- });
493
- };
494
- MilestoneEditComponent.prototype.updateMilestone = function () {
495
- var _this = this;
496
- var milestone = this.form.getRawValue();
497
- milestone.processDefinitionKey = milestone.processDefinitionKey['key'];
498
- this.milestoneService.updateMilestone(milestone).subscribe(function () {
499
- _this.router.navigate(['/milestones']);
500
- _this.alertService.success('Milestone has been updated');
501
- }, function (err) {
502
- _this.alertService.error('Error updating milestone');
503
- });
504
- };
505
- return MilestoneEditComponent;
506
- }());
507
- MilestoneEditComponent.decorators = [
508
- { type: i0.Component, args: [{
509
- selector: 'valtimo-milestone-edit',
510
- 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=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ form.getRawValue().id }}</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"updateMilestone()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Milestone set</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"milestoneSet\"\n formControlName=\"milestoneSet\"\n class=\"form-control\"\n [ngClass]=\"{\n 'is-valid':\n formControls.milestoneSet.touched && formControls.milestoneSet.valid,\n 'is-invalid':\n formControls.milestoneSet.touched && formControls.milestoneSet.errors\n }\"\n required\n >\n <option value=\"\" selected disabled>Choose a Milestone set</option>\n <option *ngFor=\"let milestoneSet of milestoneSets\" [value]=\"milestoneSet.id\">\n {{ milestoneSet.title }} ({{ milestoneSet.id }})\n </option>\n </select>\n <div\n *ngIf=\"formControls.milestoneSet.touched && formControls.milestoneSet.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.milestoneSet.errors.required\">\n Milestone set is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Milestone title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"process\"\n >Process definition</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"process\"\n formControlName=\"processDefinitionKey\"\n class=\"form-control\"\n (ngModelChange)=\"getFlownodes($event.id)\"\n [ngClass]=\"{\n 'is-valid':\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.valid,\n 'is-invalid':\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.errors\n }\"\n required\n [compareWith]=\"compareProcessDefinitions\"\n >\n <option value=\"\" disabled>Choose a process</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n <div\n *ngIf=\"\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.processDefinitionKey.errors.required\">\n Process is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"process\">Task</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"task\"\n formControlName=\"taskDefinitionKey\"\n class=\"form-control\"\n [ngClass]=\"{\n 'is-valid':\n formControls.taskDefinitionKey.touched &&\n formControls.taskDefinitionKey.valid,\n 'is-invalid':\n formControls.taskDefinitionKey.touched &&\n formControls.taskDefinitionKey.errors\n }\"\n required\n >\n <option value=\"\" disabled>Choose a task</option>\n <option\n *ngFor=\"let taskDefinition of taskDefinitions | keyvalue\"\n [value]=\"taskDefinition.key\"\n >\n {{ taskDefinition.value }} ({{ taskDefinition.key }})\n </option>\n </select>\n <div\n *ngIf=\"\n formControls.taskDefinitionKey.touched && formControls.taskDefinitionKey.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.taskDefinitionKey.errors.required\">Task is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"interval\"\n >Interval (in days)</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"interval\"\n formControlName=\"plannedIntervalInDays\"\n class=\"form-control\"\n placeholder=\"Interval (in days)\"\n [ngClass]=\"{\n 'is-valid':\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.valid,\n 'is-invalid':\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.errors\n }\"\n required\n />\n <div\n *ngIf=\"\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.plannedIntervalInDays.errors.required\">\n Interval is required\n </div>\n <div *ngIf=\"formControls.plannedIntervalInDays.errors.pattern\">\n Interval is not a valid number\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"color\">Color</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n [colorPicker]=\"form.value.color\"\n (colorPickerChange)=\"form.controls.color.setValue($event)\"\n [style.background]=\"form.value.color\"\n type=\"text\"\n id=\"color\"\n formControlName=\"color\"\n class=\"form-control\"\n placeholder=\"Color\"\n [ngClass]=\"{\n 'is-valid': formControls.color.touched && formControls.color.valid,\n 'is-invalid': formControls.color.touched && formControls.color.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.color.touched && formControls.color.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.color.errors.required\">Color is required</div>\n <div *ngIf=\"formControls.color.errors.pattern\">Color is not a valid hex code</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/milestones'\" class=\"btn btn-space btn-default\">Back</a>\n <button type=\"button\" class=\"btn btn-space btn-danger\" (click)=\"delete()\">\n Delete\n </button>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
511
- 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 */"]
512
- },] }
513
- ];
514
- MilestoneEditComponent.ctorParameters = function () { return [
515
- { type: MilestoneService },
516
- { type: forms.FormBuilder },
517
- { type: router.Router },
518
- { type: components.AlertService },
519
- { type: process.ProcessService },
520
- { type: router.ActivatedRoute }
419
+ /*
420
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
421
+ *
422
+ * Licensed under EUPL, Version 1.2 (the "License");
423
+ * you may not use this file except in compliance with the License.
424
+ * You may obtain a copy of the License at
425
+ *
426
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
427
+ *
428
+ * Unless required by applicable law or agreed to in writing, software
429
+ * distributed under the License is distributed on an "AS IS" basis,
430
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
431
+ * See the License for the specific language governing permissions and
432
+ * limitations under the License.
433
+ */
434
+ var MilestoneEditComponent = /** @class */ (function () {
435
+ function MilestoneEditComponent(milestoneService, formBuilder, router, alertService, processService, route) {
436
+ this.milestoneService = milestoneService;
437
+ this.formBuilder = formBuilder;
438
+ this.router = router;
439
+ this.alertService = alertService;
440
+ this.processService = processService;
441
+ this.route = route;
442
+ this.milestoneSets = [];
443
+ this.processDefinitions = [];
444
+ this.taskDefinitions = [];
445
+ }
446
+ Object.defineProperty(MilestoneEditComponent.prototype, "formControls", {
447
+ get: function () {
448
+ return this.form.controls;
449
+ },
450
+ enumerable: false,
451
+ configurable: true
452
+ });
453
+ MilestoneEditComponent.prototype.ngOnInit = function () {
454
+ this.form = this.formBuilder.group({
455
+ id: new forms.FormControl({ value: '', disabled: true }, forms.Validators.required),
456
+ milestoneSet: new forms.FormControl('', forms.Validators.required),
457
+ title: new forms.FormControl('', forms.Validators.required),
458
+ processDefinitionKey: new forms.FormControl('', forms.Validators.required),
459
+ taskDefinitionKey: new forms.FormControl('', forms.Validators.required),
460
+ plannedIntervalInDays: new forms.FormControl('', [
461
+ forms.Validators.required,
462
+ forms.Validators.pattern('^[0-9]*$'),
463
+ ]),
464
+ color: new forms.FormControl('', [
465
+ forms.Validators.required,
466
+ forms.Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),
467
+ ]),
468
+ });
469
+ this.getMilestone();
470
+ this.getMilestoneSets();
471
+ this.getProcessDefinitions();
472
+ };
473
+ MilestoneEditComponent.prototype.reset = function () {
474
+ this.form.patchValue({
475
+ milestoneSet: '',
476
+ title: '',
477
+ processDefinitionKey: '',
478
+ taskDefinitionKey: '',
479
+ plannedIntervalInDays: '',
480
+ color: '',
481
+ });
482
+ };
483
+ MilestoneEditComponent.prototype.getMilestone = function () {
484
+ var _this = this;
485
+ var milestoneId = this.route.snapshot.paramMap.get('id');
486
+ this.milestoneService
487
+ .getMilestone(+milestoneId)
488
+ .pipe(operators.switchMap(function (milestone) {
489
+ _this.form.patchValue({
490
+ id: milestone.id,
491
+ milestoneSet: milestone.milestoneSet.id,
492
+ title: milestone.title,
493
+ plannedIntervalInDays: milestone.plannedIntervalInDays,
494
+ color: milestone.color,
495
+ taskDefinitionKey: milestone.taskDefinitionKey,
496
+ });
497
+ return _this.processService.getProcessDefinition(milestone.processDefinitionKey);
498
+ }))
499
+ .subscribe(function (processDefinition) {
500
+ _this.form.patchValue({
501
+ processDefinitionKey: processDefinition,
502
+ });
503
+ });
504
+ };
505
+ MilestoneEditComponent.prototype.compareProcessDefinitions = function (processDefinition1, processDefinition2) {
506
+ return processDefinition1.id === processDefinition2.id;
507
+ };
508
+ MilestoneEditComponent.prototype.getMilestoneSets = function () {
509
+ var _this = this;
510
+ this.milestoneService.getMilestoneSets().subscribe(function (milesetoneSets) {
511
+ _this.milestoneSets = milesetoneSets;
512
+ });
513
+ };
514
+ MilestoneEditComponent.prototype.getProcessDefinitions = function () {
515
+ var _this = this;
516
+ this.processService
517
+ .getProcessDefinitions()
518
+ .subscribe(function (processDefinitions) {
519
+ _this.processDefinitions = processDefinitions;
520
+ });
521
+ };
522
+ MilestoneEditComponent.prototype.getFlownodes = function (processDefinitionId) {
523
+ var _this = this;
524
+ if (processDefinitionId) {
525
+ this.milestoneService.getFlownodes(processDefinitionId).subscribe(function (flowNodes) {
526
+ _this.taskDefinitions = flowNodes['flowNodeMap'];
527
+ });
528
+ }
529
+ };
530
+ MilestoneEditComponent.prototype.delete = function () {
531
+ // Todo: add confirmation dialog after it's fixed
532
+ this.deleteMilestone();
533
+ };
534
+ MilestoneEditComponent.prototype.deleteMilestone = function () {
535
+ var _this = this;
536
+ this.milestoneService.deleteMilestone(this.form.getRawValue().id).subscribe(function () {
537
+ _this.router.navigate(['/milestones']);
538
+ _this.alertService.success('Milestone has been deleted');
539
+ }, function (err) {
540
+ _this.router.navigate(['/milestones']);
541
+ _this.alertService.error('Could not delete Milestone');
542
+ });
543
+ };
544
+ MilestoneEditComponent.prototype.updateMilestone = function () {
545
+ var _this = this;
546
+ var milestone = this.form.getRawValue();
547
+ milestone.processDefinitionKey = milestone.processDefinitionKey['key'];
548
+ this.milestoneService.updateMilestone(milestone).subscribe(function () {
549
+ _this.router.navigate(['/milestones']);
550
+ _this.alertService.success('Milestone has been updated');
551
+ }, function (err) {
552
+ _this.alertService.error('Error updating milestone');
553
+ });
554
+ };
555
+ return MilestoneEditComponent;
556
+ }());
557
+ MilestoneEditComponent.decorators = [
558
+ { type: i0.Component, args: [{
559
+ selector: 'valtimo-milestone-edit',
560
+ 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=\"card-body bg-light\">\n <div class=\"row py-5\">\n <div class=\"col-12\">\n <div class=\"row\">\n <div class=\"col-12 col-sm-3 text-sm-right\"><strong>ID</strong></div>\n <div class=\"col-12 col-sm-8 col-lg-6\">{{ form.getRawValue().id }}</div>\n </div>\n </div>\n </div>\n </div>\n <div class=\"bg-white p-5\">\n <form [formGroup]=\"form\" (ngSubmit)=\"updateMilestone()\">\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\"\n >Milestone set</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"milestoneSet\"\n formControlName=\"milestoneSet\"\n class=\"form-control\"\n [ngClass]=\"{\n 'is-valid':\n formControls.milestoneSet.touched && formControls.milestoneSet.valid,\n 'is-invalid':\n formControls.milestoneSet.touched && formControls.milestoneSet.errors\n }\"\n required\n >\n <option value=\"\" selected disabled>Choose a Milestone set</option>\n <option *ngFor=\"let milestoneSet of milestoneSets\" [value]=\"milestoneSet.id\">\n {{ milestoneSet.title }} ({{ milestoneSet.id }})\n </option>\n </select>\n <div\n *ngIf=\"formControls.milestoneSet.touched && formControls.milestoneSet.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.milestoneSet.errors.required\">\n Milestone set is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"title\">Title</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"title\"\n formControlName=\"title\"\n class=\"form-control\"\n placeholder=\"Milestone title\"\n [ngClass]=\"{\n 'is-valid': formControls.title.touched && formControls.title.valid,\n 'is-invalid': formControls.title.touched && formControls.title.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.title.touched && formControls.title.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.title.errors.required\">Title is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"process\"\n >Process definition</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"process\"\n formControlName=\"processDefinitionKey\"\n class=\"form-control\"\n (ngModelChange)=\"getFlownodes($event.id)\"\n [ngClass]=\"{\n 'is-valid':\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.valid,\n 'is-invalid':\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.errors\n }\"\n required\n [compareWith]=\"compareProcessDefinitions\"\n >\n <option value=\"\" disabled>Choose a process</option>\n <option\n *ngFor=\"let processDefinition of processDefinitions\"\n [ngValue]=\"processDefinition\"\n >\n {{ processDefinition.name }} ({{ processDefinition.key }})\n </option>\n </select>\n <div\n *ngIf=\"\n formControls.processDefinitionKey.touched &&\n formControls.processDefinitionKey.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.processDefinitionKey.errors.required\">\n Process is required\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"process\">Task</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <select\n type=\"text\"\n id=\"task\"\n formControlName=\"taskDefinitionKey\"\n class=\"form-control\"\n [ngClass]=\"{\n 'is-valid':\n formControls.taskDefinitionKey.touched &&\n formControls.taskDefinitionKey.valid,\n 'is-invalid':\n formControls.taskDefinitionKey.touched &&\n formControls.taskDefinitionKey.errors\n }\"\n required\n >\n <option value=\"\" disabled>Choose a task</option>\n <option\n *ngFor=\"let taskDefinition of taskDefinitions | keyvalue\"\n [value]=\"taskDefinition.key\"\n >\n {{ taskDefinition.value }} ({{ taskDefinition.key }})\n </option>\n </select>\n <div\n *ngIf=\"\n formControls.taskDefinitionKey.touched && formControls.taskDefinitionKey.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.taskDefinitionKey.errors.required\">Task is required</div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"interval\"\n >Interval (in days)</label\n >\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n type=\"text\"\n id=\"interval\"\n formControlName=\"plannedIntervalInDays\"\n class=\"form-control\"\n placeholder=\"Interval (in days)\"\n [ngClass]=\"{\n 'is-valid':\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.valid,\n 'is-invalid':\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.errors\n }\"\n required\n />\n <div\n *ngIf=\"\n formControls.plannedIntervalInDays.touched &&\n formControls.plannedIntervalInDays.errors\n \"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.plannedIntervalInDays.errors.required\">\n Interval is required\n </div>\n <div *ngIf=\"formControls.plannedIntervalInDays.errors.pattern\">\n Interval is not a valid number\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"form-group row\">\n <label class=\"col-12 col-sm-3 col-form-label text-sm-right\" for=\"color\">Color</label>\n <div class=\"col-12 col-sm-8 col-lg-6\">\n <input\n [colorPicker]=\"form.value.color\"\n (colorPickerChange)=\"form.controls.color.setValue($event)\"\n [style.background]=\"form.value.color\"\n type=\"text\"\n id=\"color\"\n formControlName=\"color\"\n class=\"form-control\"\n placeholder=\"Color\"\n [ngClass]=\"{\n 'is-valid': formControls.color.touched && formControls.color.valid,\n 'is-invalid': formControls.color.touched && formControls.color.errors\n }\"\n required\n />\n <div\n *ngIf=\"formControls.color.touched && formControls.color.errors\"\n class=\"invalid-feedback\"\n >\n <div *ngIf=\"formControls.color.errors.required\">Color is required</div>\n <div *ngIf=\"formControls.color.errors.pattern\">Color is not a valid hex code</div>\n </div>\n </div>\n </div>\n\n <div class=\"row pt-3 mt-1\">\n <div class=\"col-12 col-sm-6 text-left\">\n <a [routerLink]=\"'/milestones'\" class=\"btn btn-space btn-default\">Back</a>\n <button type=\"button\" class=\"btn btn-space btn-danger\" (click)=\"delete()\">\n Delete\n </button>\n </div>\n <div class=\"col-12 col-sm-6 text-right\">\n <button class=\"btn btn-space btn-secondary\" type=\"button\" (click)=\"reset()\">\n Reset\n </button>\n <button class=\"btn btn-space btn-primary\" type=\"submit\" [disabled]=\"form.invalid\">\n Submit\n </button>\n </div>\n </div>\n </form>\n </div>\n </valtimo-widget>\n </div>\n </div>\n</div>\n",
561
+ 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 */"]
562
+ },] }
563
+ ];
564
+ MilestoneEditComponent.ctorParameters = function () { return [
565
+ { type: MilestoneService },
566
+ { type: forms.FormBuilder },
567
+ { type: router.Router },
568
+ { type: components.AlertService },
569
+ { type: process.ProcessService },
570
+ { type: router.ActivatedRoute }
521
571
  ]; };
522
572
 
523
- /*
524
- * Copyright 2015-2020 Ritense BV, the Netherlands.
525
- *
526
- * Licensed under EUPL, Version 1.2 (the "License");
527
- * you may not use this file except in compliance with the License.
528
- * You may obtain a copy of the License at
529
- *
530
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
531
- *
532
- * Unless required by applicable law or agreed to in writing, software
533
- * distributed under the License is distributed on an "AS IS" basis,
534
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
535
- * See the License for the specific language governing permissions and
536
- * limitations under the License.
537
- */
538
- var ɵ0 = { title: 'Milestones', roles: [contract.ROLE_ADMIN] }, ɵ1 = { title: 'Create new Milestone Set', roles: [contract.ROLE_ADMIN] }, ɵ2 = { title: 'Create new Milestone', roles: [contract.ROLE_ADMIN] }, ɵ3 = { title: 'Milestone Set details', roles: [contract.ROLE_ADMIN] }, ɵ4 = { title: 'Milestone details', roles: [contract.ROLE_ADMIN] };
539
- var routes = [
540
- {
541
- path: 'milestones',
542
- component: MilestoneComponent,
543
- canActivate: [security.AuthGuardService],
544
- data: ɵ0,
545
- },
546
- {
547
- path: 'milestones/sets/create',
548
- component: MilestoneSetCreateComponent,
549
- canActivate: [security.AuthGuardService],
550
- data: ɵ1,
551
- },
552
- {
553
- path: 'milestones/create',
554
- component: MilestoneCreateComponent,
555
- canActivate: [security.AuthGuardService],
556
- data: ɵ2,
557
- },
558
- {
559
- path: 'milestones/sets/set/:id',
560
- component: MilestoneSetEditComponent,
561
- canActivate: [security.AuthGuardService],
562
- data: ɵ3,
563
- },
564
- {
565
- path: 'milestones/milestone/:id',
566
- component: MilestoneEditComponent,
567
- canActivate: [security.AuthGuardService],
568
- data: ɵ4,
569
- },
570
- ];
571
- var MilestoneRoutingModule = /** @class */ (function () {
572
- function MilestoneRoutingModule() {
573
- }
574
- return MilestoneRoutingModule;
575
- }());
576
- MilestoneRoutingModule.decorators = [
577
- { type: i0.NgModule, args: [{
578
- declarations: [],
579
- imports: [common.CommonModule, router.RouterModule.forChild(routes)],
580
- exports: [router.RouterModule],
581
- },] }
573
+ /*
574
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
575
+ *
576
+ * Licensed under EUPL, Version 1.2 (the "License");
577
+ * you may not use this file except in compliance with the License.
578
+ * You may obtain a copy of the License at
579
+ *
580
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
581
+ *
582
+ * Unless required by applicable law or agreed to in writing, software
583
+ * distributed under the License is distributed on an "AS IS" basis,
584
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
585
+ * See the License for the specific language governing permissions and
586
+ * limitations under the License.
587
+ */
588
+ var ɵ0 = { title: 'Milestones', roles: [i1.ROLE_ADMIN] }, ɵ1 = { title: 'Create new Milestone Set', roles: [i1.ROLE_ADMIN] }, ɵ2 = { title: 'Create new Milestone', roles: [i1.ROLE_ADMIN] }, ɵ3 = { title: 'Milestone Set details', roles: [i1.ROLE_ADMIN] }, ɵ4 = { title: 'Milestone details', roles: [i1.ROLE_ADMIN] };
589
+ var routes = [
590
+ {
591
+ path: 'milestones',
592
+ component: MilestoneComponent,
593
+ canActivate: [security.AuthGuardService],
594
+ data: ɵ0,
595
+ },
596
+ {
597
+ path: 'milestones/sets/create',
598
+ component: MilestoneSetCreateComponent,
599
+ canActivate: [security.AuthGuardService],
600
+ data: ɵ1,
601
+ },
602
+ {
603
+ path: 'milestones/create',
604
+ component: MilestoneCreateComponent,
605
+ canActivate: [security.AuthGuardService],
606
+ data: ɵ2,
607
+ },
608
+ {
609
+ path: 'milestones/sets/set/:id',
610
+ component: MilestoneSetEditComponent,
611
+ canActivate: [security.AuthGuardService],
612
+ data: ɵ3,
613
+ },
614
+ {
615
+ path: 'milestones/milestone/:id',
616
+ component: MilestoneEditComponent,
617
+ canActivate: [security.AuthGuardService],
618
+ data: ɵ4,
619
+ },
620
+ ];
621
+ var MilestoneRoutingModule = /** @class */ (function () {
622
+ function MilestoneRoutingModule() {
623
+ }
624
+ return MilestoneRoutingModule;
625
+ }());
626
+ MilestoneRoutingModule.decorators = [
627
+ { type: i0.NgModule, args: [{
628
+ declarations: [],
629
+ imports: [common.CommonModule, router.RouterModule.forChild(routes)],
630
+ exports: [router.RouterModule],
631
+ },] }
582
632
  ];
583
633
 
584
- /*! *****************************************************************************
585
- Copyright (c) Microsoft Corporation.
586
-
587
- Permission to use, copy, modify, and/or distribute this software for any
588
- purpose with or without fee is hereby granted.
589
-
590
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
591
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
592
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
593
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
594
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
595
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
596
- PERFORMANCE OF THIS SOFTWARE.
597
- ***************************************************************************** */
598
- /* global Reflect, Promise */
599
- var extendStatics = function (d, b) {
600
- extendStatics = Object.setPrototypeOf ||
601
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
602
- function (d, b) { for (var p in b)
603
- if (Object.prototype.hasOwnProperty.call(b, p))
604
- d[p] = b[p]; };
605
- return extendStatics(d, b);
606
- };
607
- function __extends(d, b) {
608
- if (typeof b !== "function" && b !== null)
609
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
610
- extendStatics(d, b);
611
- function __() { this.constructor = d; }
612
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
613
- }
614
- var __assign = function () {
615
- __assign = Object.assign || function __assign(t) {
616
- for (var s, i = 1, n = arguments.length; i < n; i++) {
617
- s = arguments[i];
618
- for (var p in s)
619
- if (Object.prototype.hasOwnProperty.call(s, p))
620
- t[p] = s[p];
621
- }
622
- return t;
623
- };
624
- return __assign.apply(this, arguments);
625
- };
626
- function __rest(s, e) {
627
- var t = {};
628
- for (var p in s)
629
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
630
- t[p] = s[p];
631
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
632
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
633
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
634
- t[p[i]] = s[p[i]];
635
- }
636
- return t;
637
- }
638
- function __decorate(decorators, target, key, desc) {
639
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
640
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
641
- r = Reflect.decorate(decorators, target, key, desc);
642
- else
643
- for (var i = decorators.length - 1; i >= 0; i--)
644
- if (d = decorators[i])
645
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
646
- return c > 3 && r && Object.defineProperty(target, key, r), r;
647
- }
648
- function __param(paramIndex, decorator) {
649
- return function (target, key) { decorator(target, key, paramIndex); };
650
- }
651
- function __metadata(metadataKey, metadataValue) {
652
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
653
- return Reflect.metadata(metadataKey, metadataValue);
654
- }
655
- function __awaiter(thisArg, _arguments, P, generator) {
656
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
657
- return new (P || (P = Promise))(function (resolve, reject) {
658
- function fulfilled(value) { try {
659
- step(generator.next(value));
660
- }
661
- catch (e) {
662
- reject(e);
663
- } }
664
- function rejected(value) { try {
665
- step(generator["throw"](value));
666
- }
667
- catch (e) {
668
- reject(e);
669
- } }
670
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
671
- step((generator = generator.apply(thisArg, _arguments || [])).next());
672
- });
673
- }
674
- function __generator(thisArg, body) {
675
- var _ = { label: 0, sent: function () { if (t[0] & 1)
676
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
677
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
678
- function verb(n) { return function (v) { return step([n, v]); }; }
679
- function step(op) {
680
- if (f)
681
- throw new TypeError("Generator is already executing.");
682
- while (_)
683
- try {
684
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
685
- return t;
686
- if (y = 0, t)
687
- op = [op[0] & 2, t.value];
688
- switch (op[0]) {
689
- case 0:
690
- case 1:
691
- t = op;
692
- break;
693
- case 4:
694
- _.label++;
695
- return { value: op[1], done: false };
696
- case 5:
697
- _.label++;
698
- y = op[1];
699
- op = [0];
700
- continue;
701
- case 7:
702
- op = _.ops.pop();
703
- _.trys.pop();
704
- continue;
705
- default:
706
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
707
- _ = 0;
708
- continue;
709
- }
710
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
711
- _.label = op[1];
712
- break;
713
- }
714
- if (op[0] === 6 && _.label < t[1]) {
715
- _.label = t[1];
716
- t = op;
717
- break;
718
- }
719
- if (t && _.label < t[2]) {
720
- _.label = t[2];
721
- _.ops.push(op);
722
- break;
723
- }
724
- if (t[2])
725
- _.ops.pop();
726
- _.trys.pop();
727
- continue;
728
- }
729
- op = body.call(thisArg, _);
730
- }
731
- catch (e) {
732
- op = [6, e];
733
- y = 0;
734
- }
735
- finally {
736
- f = t = 0;
737
- }
738
- if (op[0] & 5)
739
- throw op[1];
740
- return { value: op[0] ? op[1] : void 0, done: true };
741
- }
742
- }
743
- var __createBinding = Object.create ? (function (o, m, k, k2) {
744
- if (k2 === undefined)
745
- k2 = k;
746
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
747
- }) : (function (o, m, k, k2) {
748
- if (k2 === undefined)
749
- k2 = k;
750
- o[k2] = m[k];
751
- });
752
- function __exportStar(m, o) {
753
- for (var p in m)
754
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
755
- __createBinding(o, m, p);
756
- }
757
- function __values(o) {
758
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
759
- if (m)
760
- return m.call(o);
761
- if (o && typeof o.length === "number")
762
- return {
763
- next: function () {
764
- if (o && i >= o.length)
765
- o = void 0;
766
- return { value: o && o[i++], done: !o };
767
- }
768
- };
769
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
770
- }
771
- function __read(o, n) {
772
- var m = typeof Symbol === "function" && o[Symbol.iterator];
773
- if (!m)
774
- return o;
775
- var i = m.call(o), r, ar = [], e;
776
- try {
777
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
778
- ar.push(r.value);
779
- }
780
- catch (error) {
781
- e = { error: error };
782
- }
783
- finally {
784
- try {
785
- if (r && !r.done && (m = i["return"]))
786
- m.call(i);
787
- }
788
- finally {
789
- if (e)
790
- throw e.error;
791
- }
792
- }
793
- return ar;
794
- }
795
- /** @deprecated */
796
- function __spread() {
797
- for (var ar = [], i = 0; i < arguments.length; i++)
798
- ar = ar.concat(__read(arguments[i]));
799
- return ar;
800
- }
801
- /** @deprecated */
802
- function __spreadArrays() {
803
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
804
- s += arguments[i].length;
805
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
806
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
807
- r[k] = a[j];
808
- return r;
809
- }
810
- function __spreadArray(to, from, pack) {
811
- if (pack || arguments.length === 2)
812
- for (var i = 0, l = from.length, ar; i < l; i++) {
813
- if (ar || !(i in from)) {
814
- if (!ar)
815
- ar = Array.prototype.slice.call(from, 0, i);
816
- ar[i] = from[i];
817
- }
818
- }
819
- return to.concat(ar || Array.prototype.slice.call(from));
820
- }
821
- function __await(v) {
822
- return this instanceof __await ? (this.v = v, this) : new __await(v);
823
- }
824
- function __asyncGenerator(thisArg, _arguments, generator) {
825
- if (!Symbol.asyncIterator)
826
- throw new TypeError("Symbol.asyncIterator is not defined.");
827
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
828
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
829
- function verb(n) { if (g[n])
830
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
831
- function resume(n, v) { try {
832
- step(g[n](v));
833
- }
834
- catch (e) {
835
- settle(q[0][3], e);
836
- } }
837
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
838
- function fulfill(value) { resume("next", value); }
839
- function reject(value) { resume("throw", value); }
840
- function settle(f, v) { if (f(v), q.shift(), q.length)
841
- resume(q[0][0], q[0][1]); }
842
- }
843
- function __asyncDelegator(o) {
844
- var i, p;
845
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
846
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
847
- }
848
- function __asyncValues(o) {
849
- if (!Symbol.asyncIterator)
850
- throw new TypeError("Symbol.asyncIterator is not defined.");
851
- var m = o[Symbol.asyncIterator], i;
852
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
853
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
854
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
855
- }
856
- function __makeTemplateObject(cooked, raw) {
857
- if (Object.defineProperty) {
858
- Object.defineProperty(cooked, "raw", { value: raw });
859
- }
860
- else {
861
- cooked.raw = raw;
862
- }
863
- return cooked;
864
- }
865
- ;
866
- var __setModuleDefault = Object.create ? (function (o, v) {
867
- Object.defineProperty(o, "default", { enumerable: true, value: v });
868
- }) : function (o, v) {
869
- o["default"] = v;
870
- };
871
- function __importStar(mod) {
872
- if (mod && mod.__esModule)
873
- return mod;
874
- var result = {};
875
- if (mod != null)
876
- for (var k in mod)
877
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
878
- __createBinding(result, mod, k);
879
- __setModuleDefault(result, mod);
880
- return result;
881
- }
882
- function __importDefault(mod) {
883
- return (mod && mod.__esModule) ? mod : { default: mod };
884
- }
885
- function __classPrivateFieldGet(receiver, state, kind, f) {
886
- if (kind === "a" && !f)
887
- throw new TypeError("Private accessor was defined without a getter");
888
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
889
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
890
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
891
- }
892
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
893
- if (kind === "m")
894
- throw new TypeError("Private method is not writable");
895
- if (kind === "a" && !f)
896
- throw new TypeError("Private accessor was defined without a setter");
897
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
898
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
899
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
634
+ /*! *****************************************************************************
635
+ Copyright (c) Microsoft Corporation.
636
+
637
+ Permission to use, copy, modify, and/or distribute this software for any
638
+ purpose with or without fee is hereby granted.
639
+
640
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
641
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
642
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
643
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
644
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
645
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
646
+ PERFORMANCE OF THIS SOFTWARE.
647
+ ***************************************************************************** */
648
+ /* global Reflect, Promise */
649
+ var extendStatics = function (d, b) {
650
+ extendStatics = Object.setPrototypeOf ||
651
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
652
+ function (d, b) { for (var p in b)
653
+ if (Object.prototype.hasOwnProperty.call(b, p))
654
+ d[p] = b[p]; };
655
+ return extendStatics(d, b);
656
+ };
657
+ function __extends(d, b) {
658
+ if (typeof b !== "function" && b !== null)
659
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
660
+ extendStatics(d, b);
661
+ function __() { this.constructor = d; }
662
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
663
+ }
664
+ var __assign = function () {
665
+ __assign = Object.assign || function __assign(t) {
666
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
667
+ s = arguments[i];
668
+ for (var p in s)
669
+ if (Object.prototype.hasOwnProperty.call(s, p))
670
+ t[p] = s[p];
671
+ }
672
+ return t;
673
+ };
674
+ return __assign.apply(this, arguments);
675
+ };
676
+ function __rest(s, e) {
677
+ var t = {};
678
+ for (var p in s)
679
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
680
+ t[p] = s[p];
681
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
682
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
683
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
684
+ t[p[i]] = s[p[i]];
685
+ }
686
+ return t;
687
+ }
688
+ function __decorate(decorators, target, key, desc) {
689
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
690
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
691
+ r = Reflect.decorate(decorators, target, key, desc);
692
+ else
693
+ for (var i = decorators.length - 1; i >= 0; i--)
694
+ if (d = decorators[i])
695
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
696
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
697
+ }
698
+ function __param(paramIndex, decorator) {
699
+ return function (target, key) { decorator(target, key, paramIndex); };
700
+ }
701
+ function __metadata(metadataKey, metadataValue) {
702
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
703
+ return Reflect.metadata(metadataKey, metadataValue);
704
+ }
705
+ function __awaiter(thisArg, _arguments, P, generator) {
706
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
707
+ return new (P || (P = Promise))(function (resolve, reject) {
708
+ function fulfilled(value) { try {
709
+ step(generator.next(value));
710
+ }
711
+ catch (e) {
712
+ reject(e);
713
+ } }
714
+ function rejected(value) { try {
715
+ step(generator["throw"](value));
716
+ }
717
+ catch (e) {
718
+ reject(e);
719
+ } }
720
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
721
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
722
+ });
723
+ }
724
+ function __generator(thisArg, body) {
725
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
726
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
727
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
728
+ function verb(n) { return function (v) { return step([n, v]); }; }
729
+ function step(op) {
730
+ if (f)
731
+ throw new TypeError("Generator is already executing.");
732
+ while (_)
733
+ try {
734
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
735
+ return t;
736
+ if (y = 0, t)
737
+ op = [op[0] & 2, t.value];
738
+ switch (op[0]) {
739
+ case 0:
740
+ case 1:
741
+ t = op;
742
+ break;
743
+ case 4:
744
+ _.label++;
745
+ return { value: op[1], done: false };
746
+ case 5:
747
+ _.label++;
748
+ y = op[1];
749
+ op = [0];
750
+ continue;
751
+ case 7:
752
+ op = _.ops.pop();
753
+ _.trys.pop();
754
+ continue;
755
+ default:
756
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
757
+ _ = 0;
758
+ continue;
759
+ }
760
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
761
+ _.label = op[1];
762
+ break;
763
+ }
764
+ if (op[0] === 6 && _.label < t[1]) {
765
+ _.label = t[1];
766
+ t = op;
767
+ break;
768
+ }
769
+ if (t && _.label < t[2]) {
770
+ _.label = t[2];
771
+ _.ops.push(op);
772
+ break;
773
+ }
774
+ if (t[2])
775
+ _.ops.pop();
776
+ _.trys.pop();
777
+ continue;
778
+ }
779
+ op = body.call(thisArg, _);
780
+ }
781
+ catch (e) {
782
+ op = [6, e];
783
+ y = 0;
784
+ }
785
+ finally {
786
+ f = t = 0;
787
+ }
788
+ if (op[0] & 5)
789
+ throw op[1];
790
+ return { value: op[0] ? op[1] : void 0, done: true };
791
+ }
792
+ }
793
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
794
+ if (k2 === undefined)
795
+ k2 = k;
796
+ Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
797
+ }) : (function (o, m, k, k2) {
798
+ if (k2 === undefined)
799
+ k2 = k;
800
+ o[k2] = m[k];
801
+ });
802
+ function __exportStar(m, o) {
803
+ for (var p in m)
804
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
805
+ __createBinding(o, m, p);
806
+ }
807
+ function __values(o) {
808
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
809
+ if (m)
810
+ return m.call(o);
811
+ if (o && typeof o.length === "number")
812
+ return {
813
+ next: function () {
814
+ if (o && i >= o.length)
815
+ o = void 0;
816
+ return { value: o && o[i++], done: !o };
817
+ }
818
+ };
819
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
820
+ }
821
+ function __read(o, n) {
822
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
823
+ if (!m)
824
+ return o;
825
+ var i = m.call(o), r, ar = [], e;
826
+ try {
827
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
828
+ ar.push(r.value);
829
+ }
830
+ catch (error) {
831
+ e = { error: error };
832
+ }
833
+ finally {
834
+ try {
835
+ if (r && !r.done && (m = i["return"]))
836
+ m.call(i);
837
+ }
838
+ finally {
839
+ if (e)
840
+ throw e.error;
841
+ }
842
+ }
843
+ return ar;
844
+ }
845
+ /** @deprecated */
846
+ function __spread() {
847
+ for (var ar = [], i = 0; i < arguments.length; i++)
848
+ ar = ar.concat(__read(arguments[i]));
849
+ return ar;
850
+ }
851
+ /** @deprecated */
852
+ function __spreadArrays() {
853
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
854
+ s += arguments[i].length;
855
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
856
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
857
+ r[k] = a[j];
858
+ return r;
859
+ }
860
+ function __spreadArray(to, from, pack) {
861
+ if (pack || arguments.length === 2)
862
+ for (var i = 0, l = from.length, ar; i < l; i++) {
863
+ if (ar || !(i in from)) {
864
+ if (!ar)
865
+ ar = Array.prototype.slice.call(from, 0, i);
866
+ ar[i] = from[i];
867
+ }
868
+ }
869
+ return to.concat(ar || Array.prototype.slice.call(from));
870
+ }
871
+ function __await(v) {
872
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
873
+ }
874
+ function __asyncGenerator(thisArg, _arguments, generator) {
875
+ if (!Symbol.asyncIterator)
876
+ throw new TypeError("Symbol.asyncIterator is not defined.");
877
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
878
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
879
+ function verb(n) { if (g[n])
880
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
881
+ function resume(n, v) { try {
882
+ step(g[n](v));
883
+ }
884
+ catch (e) {
885
+ settle(q[0][3], e);
886
+ } }
887
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
888
+ function fulfill(value) { resume("next", value); }
889
+ function reject(value) { resume("throw", value); }
890
+ function settle(f, v) { if (f(v), q.shift(), q.length)
891
+ resume(q[0][0], q[0][1]); }
892
+ }
893
+ function __asyncDelegator(o) {
894
+ var i, p;
895
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
896
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
897
+ }
898
+ function __asyncValues(o) {
899
+ if (!Symbol.asyncIterator)
900
+ throw new TypeError("Symbol.asyncIterator is not defined.");
901
+ var m = o[Symbol.asyncIterator], i;
902
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
903
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
904
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
905
+ }
906
+ function __makeTemplateObject(cooked, raw) {
907
+ if (Object.defineProperty) {
908
+ Object.defineProperty(cooked, "raw", { value: raw });
909
+ }
910
+ else {
911
+ cooked.raw = raw;
912
+ }
913
+ return cooked;
914
+ }
915
+ ;
916
+ var __setModuleDefault = Object.create ? (function (o, v) {
917
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
918
+ }) : function (o, v) {
919
+ o["default"] = v;
920
+ };
921
+ function __importStar(mod) {
922
+ if (mod && mod.__esModule)
923
+ return mod;
924
+ var result = {};
925
+ if (mod != null)
926
+ for (var k in mod)
927
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
928
+ __createBinding(result, mod, k);
929
+ __setModuleDefault(result, mod);
930
+ return result;
931
+ }
932
+ function __importDefault(mod) {
933
+ return (mod && mod.__esModule) ? mod : { default: mod };
934
+ }
935
+ function __classPrivateFieldGet(receiver, state, kind, f) {
936
+ if (kind === "a" && !f)
937
+ throw new TypeError("Private accessor was defined without a getter");
938
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
939
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
940
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
941
+ }
942
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
943
+ if (kind === "m")
944
+ throw new TypeError("Private method is not writable");
945
+ if (kind === "a" && !f)
946
+ throw new TypeError("Private accessor was defined without a setter");
947
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
948
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
949
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
900
950
  }
901
951
 
902
- var MilestoneListComponent = /** @class */ (function () {
903
- function MilestoneListComponent(milestoneService, router) {
904
- this.milestoneService = milestoneService;
905
- this.router = router;
906
- this.milestones = [];
907
- this.milestoneFields = [
908
- { key: 'id', label: 'ID' },
909
- { key: 'title', label: 'Title' },
910
- { key: 'processDefinitionKey', label: 'Process' },
911
- { key: 'taskDefinitionKey', label: 'Task' },
912
- { key: 'plannedIntervalInDays', label: 'Interval (in days)' },
913
- { key: 'color', label: 'Color' },
914
- ];
915
- }
916
- MilestoneListComponent.prototype.editMilestoneSet = function (milestoneSetId) {
917
- this.router.navigate(['milestones/sets/set', milestoneSetId]);
918
- };
919
- MilestoneListComponent.prototype.editMilestone = function (milestone) {
920
- this.router.navigate(['milestones/milestone', milestone.id]);
921
- };
922
- MilestoneListComponent.prototype.ngOnInit = function () {
923
- var _this = this;
924
- rxjs.combineLatest([
925
- this.milestoneService.getMilestones(),
926
- this.milestoneService.getMilestoneSets(),
927
- ]).subscribe(function (_a) {
928
- var _b = __read(_a, 2), milestones = _b[0], milestoneSets = _b[1];
929
- return _this.handleMilestoneResult(milestones, milestoneSets);
930
- });
931
- };
932
- MilestoneListComponent.prototype.handleMilestoneResult = function (milestones, milestoneSets) {
933
- var milestoneSetsMap = this.getMilestoneSetsMap(milestones, milestoneSets);
934
- this.setMilestones(milestoneSetsMap);
935
- };
936
- MilestoneListComponent.prototype.setMilestones = function (milestoneSetsMap) {
937
- this.milestones = Array.from(milestoneSetsMap.entries()).map(function (entry) {
938
- entry[0] = JSON.parse(entry[0]);
939
- return entry;
940
- });
941
- };
942
- MilestoneListComponent.prototype.getMilestoneSetsMap = function (milestones, milestoneSets) {
943
- var mapWithSets = this.addMilestoneSetsToMap(milestoneSets, this.getEmptyMap());
944
- return this.addMilestonesToMap(milestones, mapWithSets);
945
- };
946
- MilestoneListComponent.prototype.getEmptyMap = function () {
947
- return new Map();
948
- };
949
- MilestoneListComponent.prototype.addMilestoneSetsToMap = function (milestoneSets, map) {
950
- milestoneSets.forEach(function (milestoneSet) {
951
- map.set(JSON.stringify(milestoneSet), []);
952
- });
953
- return map;
954
- };
955
- MilestoneListComponent.prototype.addMilestonesToMap = function (milestones, map) {
956
- milestones.forEach(function (milestone) {
957
- var milestoneSetString = JSON.stringify(milestone.milestoneSet);
958
- var arr = map.get(milestoneSetString);
959
- arr.push(milestone);
960
- map.set(milestoneSetString, arr);
961
- });
962
- return map;
963
- };
964
- return MilestoneListComponent;
965
- }());
966
- MilestoneListComponent.decorators = [
967
- { type: i0.Component, args: [{
968
- selector: 'valtimo-milestone-list',
969
- 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 *ngFor=\"let milestoneGroup of milestones\" class=\"mb-4\">\n <valtimo-widget>\n <h4 (click)=\"editMilestoneSet(milestoneGroup[0].id)\" class=\"milestone-title\">\n {{ milestoneGroup[0].title }} ({{ milestoneGroup[0].id }})\n </h4>\n <valtimo-list\n [items]=\"milestoneGroup[1]\"\n [fields]=\"milestoneFields\"\n (rowClicked)=\"editMilestone($event)\"\n >\n </valtimo-list>\n </valtimo-widget>\n</div>\n",
970
- 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 */.milestone-title{background-color:#f8f9f9;border-bottom:1px solid #dee2e6;cursor:pointer;margin:0;padding:1em}"]
971
- },] }
972
- ];
973
- MilestoneListComponent.ctorParameters = function () { return [
974
- { type: MilestoneService },
975
- { type: router.Router }
952
+ var MilestoneListComponent = /** @class */ (function () {
953
+ function MilestoneListComponent(milestoneService, router) {
954
+ this.milestoneService = milestoneService;
955
+ this.router = router;
956
+ this.milestones = [];
957
+ this.milestoneFields = [
958
+ { key: 'id', label: 'ID' },
959
+ { key: 'title', label: 'Title' },
960
+ { key: 'processDefinitionKey', label: 'Process' },
961
+ { key: 'taskDefinitionKey', label: 'Task' },
962
+ { key: 'plannedIntervalInDays', label: 'Interval (in days)' },
963
+ { key: 'color', label: 'Color' },
964
+ ];
965
+ }
966
+ MilestoneListComponent.prototype.editMilestoneSet = function (milestoneSetId) {
967
+ this.router.navigate(['milestones/sets/set', milestoneSetId]);
968
+ };
969
+ MilestoneListComponent.prototype.editMilestone = function (milestone) {
970
+ this.router.navigate(['milestones/milestone', milestone.id]);
971
+ };
972
+ MilestoneListComponent.prototype.ngOnInit = function () {
973
+ var _this = this;
974
+ rxjs.combineLatest([
975
+ this.milestoneService.getMilestones(),
976
+ this.milestoneService.getMilestoneSets(),
977
+ ]).subscribe(function (_a) {
978
+ var _b = __read(_a, 2), milestones = _b[0], milestoneSets = _b[1];
979
+ return _this.handleMilestoneResult(milestones, milestoneSets);
980
+ });
981
+ };
982
+ MilestoneListComponent.prototype.handleMilestoneResult = function (milestones, milestoneSets) {
983
+ var milestoneSetsMap = this.getMilestoneSetsMap(milestones, milestoneSets);
984
+ this.setMilestones(milestoneSetsMap);
985
+ };
986
+ MilestoneListComponent.prototype.setMilestones = function (milestoneSetsMap) {
987
+ this.milestones = Array.from(milestoneSetsMap.entries()).map(function (entry) {
988
+ entry[0] = JSON.parse(entry[0]);
989
+ return entry;
990
+ });
991
+ };
992
+ MilestoneListComponent.prototype.getMilestoneSetsMap = function (milestones, milestoneSets) {
993
+ var mapWithSets = this.addMilestoneSetsToMap(milestoneSets, this.getEmptyMap());
994
+ return this.addMilestonesToMap(milestones, mapWithSets);
995
+ };
996
+ MilestoneListComponent.prototype.getEmptyMap = function () {
997
+ return new Map();
998
+ };
999
+ MilestoneListComponent.prototype.addMilestoneSetsToMap = function (milestoneSets, map) {
1000
+ milestoneSets.forEach(function (milestoneSet) {
1001
+ map.set(JSON.stringify(milestoneSet), []);
1002
+ });
1003
+ return map;
1004
+ };
1005
+ MilestoneListComponent.prototype.addMilestonesToMap = function (milestones, map) {
1006
+ milestones.forEach(function (milestone) {
1007
+ var milestoneSetString = JSON.stringify(milestone.milestoneSet);
1008
+ var arr = map.get(milestoneSetString);
1009
+ arr.push(milestone);
1010
+ map.set(milestoneSetString, arr);
1011
+ });
1012
+ return map;
1013
+ };
1014
+ return MilestoneListComponent;
1015
+ }());
1016
+ MilestoneListComponent.decorators = [
1017
+ { type: i0.Component, args: [{
1018
+ selector: 'valtimo-milestone-list',
1019
+ 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 *ngFor=\"let milestoneGroup of milestones\" class=\"mb-4\">\n <valtimo-widget>\n <h4 (click)=\"editMilestoneSet(milestoneGroup[0].id)\" class=\"milestone-title\">\n {{ milestoneGroup[0].title }} ({{ milestoneGroup[0].id }})\n </h4>\n <valtimo-list\n [items]=\"milestoneGroup[1]\"\n [fields]=\"milestoneFields\"\n (rowClicked)=\"editMilestone($event)\"\n >\n </valtimo-list>\n </valtimo-widget>\n</div>\n",
1020
+ 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 */.milestone-title{background-color:#f8f9f9;border-bottom:1px solid #dee2e6;cursor:pointer;margin:0;padding:1em}"]
1021
+ },] }
1022
+ ];
1023
+ MilestoneListComponent.ctorParameters = function () { return [
1024
+ { type: MilestoneService },
1025
+ { type: router.Router }
976
1026
  ]; };
977
1027
 
978
- /*
979
- * Copyright 2015-2020 Ritense BV, the Netherlands.
980
- *
981
- * Licensed under EUPL, Version 1.2 (the "License");
982
- * you may not use this file except in compliance with the License.
983
- * You may obtain a copy of the License at
984
- *
985
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
986
- *
987
- * Unless required by applicable law or agreed to in writing, software
988
- * distributed under the License is distributed on an "AS IS" basis,
989
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
990
- * See the License for the specific language governing permissions and
991
- * limitations under the License.
992
- */
993
- var MilestoneModule = /** @class */ (function () {
994
- function MilestoneModule() {
995
- }
996
- return MilestoneModule;
997
- }());
998
- MilestoneModule.decorators = [
999
- { type: i0.NgModule, args: [{
1000
- declarations: [
1001
- MilestoneComponent,
1002
- MilestoneSetCreateComponent,
1003
- MilestoneListComponent,
1004
- MilestoneCreateComponent,
1005
- MilestoneEditComponent,
1006
- MilestoneSetEditComponent,
1007
- ],
1008
- imports: [
1009
- router.RouterModule,
1010
- MilestoneRoutingModule,
1011
- common.CommonModule,
1012
- components.ListModule,
1013
- components.WidgetModule,
1014
- forms.ReactiveFormsModule,
1015
- ngxColorPicker.ColorPickerModule,
1016
- core.TranslateModule,
1017
- ],
1018
- exports: [MilestoneComponent],
1019
- },] }
1028
+ /*
1029
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1030
+ *
1031
+ * Licensed under EUPL, Version 1.2 (the "License");
1032
+ * you may not use this file except in compliance with the License.
1033
+ * You may obtain a copy of the License at
1034
+ *
1035
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1036
+ *
1037
+ * Unless required by applicable law or agreed to in writing, software
1038
+ * distributed under the License is distributed on an "AS IS" basis,
1039
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1040
+ * See the License for the specific language governing permissions and
1041
+ * limitations under the License.
1042
+ */
1043
+ var MilestoneModule = /** @class */ (function () {
1044
+ function MilestoneModule() {
1045
+ }
1046
+ return MilestoneModule;
1047
+ }());
1048
+ MilestoneModule.decorators = [
1049
+ { type: i0.NgModule, args: [{
1050
+ declarations: [
1051
+ MilestoneComponent,
1052
+ MilestoneSetCreateComponent,
1053
+ MilestoneListComponent,
1054
+ MilestoneCreateComponent,
1055
+ MilestoneEditComponent,
1056
+ MilestoneSetEditComponent,
1057
+ ],
1058
+ imports: [
1059
+ router.RouterModule,
1060
+ MilestoneRoutingModule,
1061
+ common.CommonModule,
1062
+ components.ListModule,
1063
+ components.WidgetModule,
1064
+ forms.ReactiveFormsModule,
1065
+ ngxColorPicker.ColorPickerModule,
1066
+ core.TranslateModule,
1067
+ ],
1068
+ exports: [MilestoneComponent],
1069
+ },] }
1020
1070
  ];
1021
1071
 
1022
- /*
1023
- * Copyright 2015-2020 Ritense BV, the Netherlands.
1024
- *
1025
- * Licensed under EUPL, Version 1.2 (the "License");
1026
- * you may not use this file except in compliance with the License.
1027
- * You may obtain a copy of the License at
1028
- *
1029
- * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1030
- *
1031
- * Unless required by applicable law or agreed to in writing, software
1032
- * distributed under the License is distributed on an "AS IS" basis,
1033
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1034
- * See the License for the specific language governing permissions and
1035
- * limitations under the License.
1072
+ /*
1073
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
1074
+ *
1075
+ * Licensed under EUPL, Version 1.2 (the "License");
1076
+ * you may not use this file except in compliance with the License.
1077
+ * You may obtain a copy of the License at
1078
+ *
1079
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
1080
+ *
1081
+ * Unless required by applicable law or agreed to in writing, software
1082
+ * distributed under the License is distributed on an "AS IS" basis,
1083
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1084
+ * See the License for the specific language governing permissions and
1085
+ * limitations under the License.
1036
1086
  */
1037
1087
 
1038
- /**
1039
- * Generated bundle index. Do not edit.
1088
+ /**
1089
+ * Generated bundle index. Do not edit.
1040
1090
  */
1041
1091
 
1042
1092
  exports.MilestoneComponent = MilestoneComponent;