@valtimo/milestone 0.0.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 (32) hide show
  1. package/README.md +31 -0
  2. package/fesm2022/valtimo-milestone.mjs +742 -0
  3. package/fesm2022/valtimo-milestone.mjs.map +1 -0
  4. package/index.d.ts +6 -0
  5. package/lib/milestone-create/milestone-create.component.d.ts +32 -0
  6. package/lib/milestone-create/milestone-create.component.d.ts.map +1 -0
  7. package/lib/milestone-edit/milestone-edit.component.d.ts +37 -0
  8. package/lib/milestone-edit/milestone-edit.component.d.ts.map +1 -0
  9. package/lib/milestone-list/milestone-list.component.d.ts +27 -0
  10. package/lib/milestone-list/milestone-list.component.d.ts.map +1 -0
  11. package/lib/milestone-routing.module.d.ts +9 -0
  12. package/lib/milestone-routing.module.d.ts.map +1 -0
  13. package/lib/milestone-set-create/milestone-set-create.component.d.ts +23 -0
  14. package/lib/milestone-set-create/milestone-set-create.component.d.ts.map +1 -0
  15. package/lib/milestone-set-edit/milestone-set-edit.component.d.ts +27 -0
  16. package/lib/milestone-set-edit/milestone-set-edit.component.d.ts.map +1 -0
  17. package/lib/milestone.component.d.ts +6 -0
  18. package/lib/milestone.component.d.ts.map +1 -0
  19. package/lib/milestone.module.d.ts +20 -0
  20. package/lib/milestone.module.d.ts.map +1 -0
  21. package/lib/milestone.service.d.ts +25 -0
  22. package/lib/milestone.service.d.ts.map +1 -0
  23. package/lib/models/index.d.ts +3 -0
  24. package/lib/models/index.d.ts.map +1 -0
  25. package/lib/models/milestone-set.model.d.ts +5 -0
  26. package/lib/models/milestone-set.model.d.ts.map +1 -0
  27. package/lib/models/milestone.model.d.ts +11 -0
  28. package/lib/models/milestone.model.d.ts.map +1 -0
  29. package/package.json +25 -0
  30. package/public-api.d.ts +5 -0
  31. package/public-api.d.ts.map +1 -0
  32. package/valtimo-milestone.d.ts.map +1 -0
@@ -0,0 +1,742 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, NgModule } from '@angular/core';
3
+ import * as i1 from '@valtimo/shared';
4
+ import { ROLE_ADMIN } from '@valtimo/shared';
5
+ import * as i2 from '@angular/common/http';
6
+ import * as i3 from '@angular/router';
7
+ import { RouterModule } from '@angular/router';
8
+ import { combineLatest } from 'rxjs';
9
+ import * as i6 from '@angular/common';
10
+ import { CommonModule } from '@angular/common';
11
+ import * as i4 from '@valtimo/components';
12
+ import { WidgetModule, CarbonListModule } from '@valtimo/components';
13
+ import * as i3$1 from '@ngx-translate/core';
14
+ import { TranslateModule } from '@ngx-translate/core';
15
+ import * as i2$1 from '@angular/forms';
16
+ import { FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
17
+ import { AuthGuardService } from '@valtimo/security';
18
+ import * as i5 from '@valtimo/process';
19
+ import * as i7 from 'ngx-color-picker';
20
+ import { ColorPickerModule } from 'ngx-color-picker';
21
+ import { switchMap } from 'rxjs/operators';
22
+
23
+ /*
24
+ * Copyright 2015-2025 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
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
41
+ *
42
+ * Licensed under EUPL, Version 1.2 (the "License");
43
+ * you may not use this file except in compliance with the License.
44
+ * You may obtain a copy of the License at
45
+ *
46
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
47
+ *
48
+ * Unless required by applicable law or agreed to in writing, software
49
+ * distributed under the License is distributed on an "AS IS" basis,
50
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
51
+ * See the License for the specific language governing permissions and
52
+ * limitations under the License.
53
+ */
54
+
55
+ /*
56
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
57
+ *
58
+ * Licensed under EUPL, Version 1.2 (the "License");
59
+ * you may not use this file except in compliance with the License.
60
+ * You may obtain a copy of the License at
61
+ *
62
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
63
+ *
64
+ * Unless required by applicable law or agreed to in writing, software
65
+ * distributed under the License is distributed on an "AS IS" basis,
66
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
67
+ * See the License for the specific language governing permissions and
68
+ * limitations under the License.
69
+ */
70
+
71
+ /*
72
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
73
+ *
74
+ * Licensed under EUPL, Version 1.2 (the "License");
75
+ * you may not use this file except in compliance with the License.
76
+ * You may obtain a copy of the License at
77
+ *
78
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
79
+ *
80
+ * Unless required by applicable law or agreed to in writing, software
81
+ * distributed under the License is distributed on an "AS IS" basis,
82
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
83
+ * See the License for the specific language governing permissions and
84
+ * limitations under the License.
85
+ */
86
+ class MilestoneService {
87
+ constructor(configService, http) {
88
+ this.configService = configService;
89
+ this.http = http;
90
+ this.valtimoApiConfig = configService.config.valtimoApi;
91
+ }
92
+ getMilestones() {
93
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/milestones`);
94
+ }
95
+ getMilestone(milestoneId) {
96
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/milestones/${milestoneId}`);
97
+ }
98
+ createMilestone(milestone) {
99
+ return this.http.post(`${this.valtimoApiConfig.endpointUri}v1/milestones`, milestone);
100
+ }
101
+ updateMilestone(milestone) {
102
+ return this.http.post(`${this.valtimoApiConfig.endpointUri}v1/milestones`, milestone);
103
+ }
104
+ deleteMilestone(milestoneId) {
105
+ return this.http.delete(`${this.valtimoApiConfig.endpointUri}v1/milestones/${milestoneId}`);
106
+ }
107
+ getMilestoneSets() {
108
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/milestone-sets`);
109
+ }
110
+ getMilestoneSet(milestoneSetId) {
111
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/milestone-sets/${milestoneSetId}`);
112
+ }
113
+ createMilestoneSet(milestoneSet) {
114
+ return this.http.post(`${this.valtimoApiConfig.endpointUri}v1/milestone-sets`, milestoneSet);
115
+ }
116
+ updateMilestoneSet(milestoneSet) {
117
+ return this.http.post(`${this.valtimoApiConfig.endpointUri}v1/milestone-sets`, milestoneSet);
118
+ }
119
+ deleteMilestoneSet(milestoneSetId) {
120
+ return this.http.delete(`${this.valtimoApiConfig.endpointUri}v1/milestone-sets/${milestoneSetId}`);
121
+ }
122
+ getFlownodes(processDefinitionId) {
123
+ return this.http.get(`${this.valtimoApiConfig.endpointUri}v1/milestones/${processDefinitionId}/flownodes`);
124
+ }
125
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneService, deps: [{ token: i1.ConfigService }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable }); }
126
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneService, providedIn: 'root' }); }
127
+ }
128
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneService, decorators: [{
129
+ type: Injectable,
130
+ args: [{
131
+ providedIn: 'root',
132
+ }]
133
+ }], ctorParameters: () => [{ type: i1.ConfigService }, { type: i2.HttpClient }] });
134
+
135
+ /*
136
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
137
+ *
138
+ * Licensed under EUPL, Version 1.2 (the "License");
139
+ * you may not use this file except in compliance with the License.
140
+ * You may obtain a copy of the License at
141
+ *
142
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
143
+ *
144
+ * Unless required by applicable law or agreed to in writing, software
145
+ * distributed under the License is distributed on an "AS IS" basis,
146
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
147
+ * See the License for the specific language governing permissions and
148
+ * limitations under the License.
149
+ */
150
+ class MilestoneListComponent {
151
+ constructor(milestoneService, router) {
152
+ this.milestoneService = milestoneService;
153
+ this.router = router;
154
+ this.milestones = [];
155
+ this.milestoneFields = [
156
+ { key: 'id', label: 'ID' },
157
+ { key: 'title', label: 'Title' },
158
+ { key: 'processDefinitionKey', label: 'Process' },
159
+ { key: 'taskDefinitionKey', label: 'Task' },
160
+ { key: 'plannedIntervalInDays', label: 'Interval (in days)' },
161
+ { key: 'color', label: 'Color' },
162
+ ];
163
+ }
164
+ editMilestoneSet(milestoneSetId) {
165
+ this.router.navigate(['milestones/sets/set', milestoneSetId]);
166
+ }
167
+ editMilestone(milestone) {
168
+ this.router.navigate(['milestones/milestone', milestone.id]);
169
+ }
170
+ ngOnInit() {
171
+ combineLatest([
172
+ this.milestoneService.getMilestones(),
173
+ this.milestoneService.getMilestoneSets(),
174
+ ]).subscribe(([milestones, milestoneSets]) => this.handleMilestoneResult(milestones, milestoneSets));
175
+ }
176
+ handleMilestoneResult(milestones, milestoneSets) {
177
+ const milestoneSetsMap = this.getMilestoneSetsMap(milestones, milestoneSets);
178
+ this.setMilestones(milestoneSetsMap);
179
+ }
180
+ setMilestones(milestoneSetsMap) {
181
+ this.milestones = Array.from(milestoneSetsMap.entries()).map(entry => {
182
+ entry[0] = JSON.parse(entry[0]);
183
+ return entry;
184
+ });
185
+ }
186
+ getMilestoneSetsMap(milestones, milestoneSets) {
187
+ const mapWithSets = this.addMilestoneSetsToMap(milestoneSets, this.getEmptyMap());
188
+ return this.addMilestonesToMap(milestones, mapWithSets);
189
+ }
190
+ getEmptyMap() {
191
+ return new Map();
192
+ }
193
+ addMilestoneSetsToMap(milestoneSets, map) {
194
+ milestoneSets.forEach(milestoneSet => {
195
+ map.set(JSON.stringify(milestoneSet), []);
196
+ });
197
+ return map;
198
+ }
199
+ addMilestonesToMap(milestones, map) {
200
+ milestones.forEach(milestone => {
201
+ const milestoneSetString = JSON.stringify(milestone.milestoneSet);
202
+ const arr = map.get(milestoneSetString);
203
+ arr.push(milestone);
204
+ map.set(milestoneSetString, arr);
205
+ });
206
+ return map;
207
+ }
208
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneListComponent, deps: [{ token: MilestoneService }, { token: i3.Router }], target: i0.ɵɵFactoryTarget.Component }); }
209
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MilestoneListComponent, isStandalone: false, selector: "valtimo-milestone-list", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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-carbon-list\n [items]=\"milestoneGroup[1]\"\n [fields]=\"milestoneFields\"\n (rowClicked)=\"editMilestone($event)\"\n >\n </valtimo-carbon-list>\n </valtimo-widget>\n</div>\n", styles: [".milestone-title{background-color:#f8f9f9;margin:0;padding:1em;border-bottom:1px solid #dee2e6;cursor:pointer}\n/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "component", type: i4.CarbonListComponent, selector: "valtimo-carbon-list", inputs: ["items", "fields", "tableTranslations", "paginatorConfig", "pagination", "loading", "actions", "actionItems", "showActionItems", "header", "hideColumnHeader", "initialSortState", "sortState", "isSearchable", "enableSingleSelection", "lastColumnTemplate", "paginationIdentifier", "showSelectionColumn", "striped", "hideToolbar", "lockedTooltipTranslationKey", "movingRowsEnabled", "dragAndDrop", "dragAndDropDisabled"], outputs: ["rowClicked", "paginationClicked", "paginationSet", "search", "sortChanged", "moveRow", "itemsReordered"] }] }); }
210
+ }
211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneListComponent, decorators: [{
212
+ type: Component,
213
+ args: [{ standalone: false, selector: 'valtimo-milestone-list', template: "<!--\n ~ Copyright 2015-2025 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-carbon-list\n [items]=\"milestoneGroup[1]\"\n [fields]=\"milestoneFields\"\n (rowClicked)=\"editMilestone($event)\"\n >\n </valtimo-carbon-list>\n </valtimo-widget>\n</div>\n", styles: [".milestone-title{background-color:#f8f9f9;margin:0;padding:1em;border-bottom:1px solid #dee2e6;cursor:pointer}\n/*!\n * Copyright 2015-2025 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"] }]
214
+ }], ctorParameters: () => [{ type: MilestoneService }, { type: i3.Router }] });
215
+
216
+ /*
217
+ * Copyright 2015-2025 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
+ class MilestoneComponent {
232
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
233
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MilestoneComponent, isStandalone: false, selector: "valtimo-milestone", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: MilestoneListComponent, selector: "valtimo-milestone-list" }, { kind: "pipe", type: i3$1.TranslatePipe, name: "translate" }] }); }
234
+ }
235
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneComponent, decorators: [{
236
+ type: Component,
237
+ args: [{ standalone: false, selector: 'valtimo-milestone', template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 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"] }]
238
+ }] });
239
+
240
+ /*
241
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
242
+ *
243
+ * Licensed under EUPL, Version 1.2 (the "License");
244
+ * you may not use this file except in compliance with the License.
245
+ * You may obtain a copy of the License at
246
+ *
247
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
248
+ *
249
+ * Unless required by applicable law or agreed to in writing, software
250
+ * distributed under the License is distributed on an "AS IS" basis,
251
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
252
+ * See the License for the specific language governing permissions and
253
+ * limitations under the License.
254
+ */
255
+ class MilestoneSetCreateComponent {
256
+ constructor(milestoneService, formBuilder, router, alertService) {
257
+ this.milestoneService = milestoneService;
258
+ this.formBuilder = formBuilder;
259
+ this.router = router;
260
+ this.alertService = alertService;
261
+ }
262
+ get formControls() {
263
+ return this.form.controls;
264
+ }
265
+ ngOnInit() {
266
+ this.form = this.formBuilder.group({
267
+ title: new FormControl('', Validators.required),
268
+ });
269
+ }
270
+ reset() {
271
+ this.form.setValue({
272
+ title: '',
273
+ });
274
+ }
275
+ createMilestoneSet() {
276
+ this.milestoneService.createMilestoneSet(this.form.value).subscribe(() => {
277
+ this.router.navigate(['/milestones']);
278
+ this.alertService.success('New Milestone set has been created');
279
+ });
280
+ }
281
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneSetCreateComponent, deps: [{ token: MilestoneService }, { token: i2$1.FormBuilder }, { token: i3.Router }, { token: i4.AlertService }], target: i0.ɵɵFactoryTarget.Component }); }
282
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MilestoneSetCreateComponent, isStandalone: false, selector: "valtimo-milestone-set-create", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
283
+ }
284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneSetCreateComponent, decorators: [{
285
+ type: Component,
286
+ args: [{ standalone: false, selector: 'valtimo-milestone-set-create', template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 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"] }]
287
+ }], ctorParameters: () => [{ type: MilestoneService }, { type: i2$1.FormBuilder }, { type: i3.Router }, { type: i4.AlertService }] });
288
+
289
+ /*
290
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
291
+ *
292
+ * Licensed under EUPL, Version 1.2 (the "License");
293
+ * you may not use this file except in compliance with the License.
294
+ * You may obtain a copy of the License at
295
+ *
296
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
297
+ *
298
+ * Unless required by applicable law or agreed to in writing, software
299
+ * distributed under the License is distributed on an "AS IS" basis,
300
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
301
+ * See the License for the specific language governing permissions and
302
+ * limitations under the License.
303
+ */
304
+ class MilestoneCreateComponent {
305
+ constructor(milestoneService, formBuilder, router, alertService, processService) {
306
+ this.milestoneService = milestoneService;
307
+ this.formBuilder = formBuilder;
308
+ this.router = router;
309
+ this.alertService = alertService;
310
+ this.processService = processService;
311
+ this.milestoneSets = [];
312
+ this.processDefinitions = [];
313
+ this.taskDefinitions = [];
314
+ }
315
+ get formControls() {
316
+ return this.form.controls;
317
+ }
318
+ ngOnInit() {
319
+ this.form = this.formBuilder.group({
320
+ milestoneSet: new FormControl('', Validators.required),
321
+ title: new FormControl('', Validators.required),
322
+ processDefinitionKey: new FormControl('', Validators.required),
323
+ taskDefinitionKey: new FormControl('', Validators.required),
324
+ plannedIntervalInDays: new FormControl('', [
325
+ Validators.required,
326
+ Validators.pattern('^[0-9]*$'),
327
+ ]),
328
+ color: new FormControl('', [
329
+ Validators.required,
330
+ Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),
331
+ ]),
332
+ });
333
+ this.getMilestoneSets();
334
+ this.getMilestones();
335
+ }
336
+ reset() {
337
+ this.form.patchValue({
338
+ milestoneSet: '',
339
+ title: '',
340
+ processDefinitionKey: '',
341
+ taskDefinitionKey: '',
342
+ plannedIntervalInDays: '',
343
+ color: '',
344
+ });
345
+ }
346
+ getMilestoneSets() {
347
+ this.milestoneService.getMilestoneSets().subscribe((milesetoneSets) => {
348
+ this.milestoneSets = milesetoneSets;
349
+ });
350
+ }
351
+ getMilestones() {
352
+ this.processService
353
+ .getProcessDefinitions()
354
+ .subscribe((processDefinitions) => {
355
+ this.processDefinitions = processDefinitions;
356
+ });
357
+ }
358
+ getFlownodes(processDefinitionId) {
359
+ if (processDefinitionId) {
360
+ this.milestoneService.getFlownodes(processDefinitionId).subscribe((flowNodes) => {
361
+ this.taskDefinitions = flowNodes['flowNodeMap'];
362
+ this.form.controls.taskDefinitionKey.setValue('');
363
+ });
364
+ }
365
+ }
366
+ createMilestone() {
367
+ const milestone = this.form.value;
368
+ milestone.processDefinitionKey = milestone.processDefinitionKey['key'];
369
+ milestone.id = null;
370
+ this.milestoneService.createMilestone(milestone).subscribe(() => {
371
+ this.router.navigate(['/milestones']);
372
+ this.alertService.success('New Milestone has been created');
373
+ }, err => {
374
+ this.alertService.error('Error creating new milestone');
375
+ });
376
+ }
377
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneCreateComponent, deps: [{ token: MilestoneService }, { token: i2$1.FormBuilder }, { token: i3.Router }, { token: i4.AlertService }, { token: i5.ProcessService }], target: i0.ɵɵFactoryTarget.Component }); }
378
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MilestoneCreateComponent, isStandalone: false, selector: "valtimo-milestone-create", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.ColorPickerDirective, selector: "[colorPicker]", inputs: ["colorPicker", "cpWidth", "cpHeight", "cpToggle", "cpDisabled", "cpIgnoredElements", "cpFallbackColor", "cpColorMode", "cpCmykEnabled", "cpOutputFormat", "cpAlphaChannel", "cpDisableInput", "cpDialogDisplay", "cpSaveClickOutside", "cpCloseClickOutside", "cpUseRootViewContainer", "cpPosition", "cpPositionOffset", "cpPositionRelativeToArrow", "cpOKButton", "cpOKButtonText", "cpOKButtonClass", "cpCancelButton", "cpCancelButtonText", "cpCancelButtonClass", "cpEyeDropper", "cpPresetLabel", "cpPresetColors", "cpPresetColorsClass", "cpMaxPresetColorsLength", "cpPresetEmptyMessage", "cpPresetEmptyMessageClass", "cpAddColorButton", "cpAddColorButtonText", "cpAddColorButtonClass", "cpRemoveColorButtonClass", "cpArrowPosition", "cpExtraTemplate"], outputs: ["cpInputChange", "cpToggleChange", "cpSliderChange", "cpSliderDragEnd", "cpSliderDragStart", "colorPickerOpen", "colorPickerClose", "colorPickerCancel", "colorPickerSelect", "colorPickerChange", "cpCmykColorChange", "cpPresetColorsChange"], exportAs: ["ngxColorPicker"] }, { kind: "pipe", type: i6.KeyValuePipe, name: "keyvalue" }] }); }
379
+ }
380
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneCreateComponent, decorators: [{
381
+ type: Component,
382
+ args: [{ standalone: false, selector: 'valtimo-milestone-create', template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 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"] }]
383
+ }], ctorParameters: () => [{ type: MilestoneService }, { type: i2$1.FormBuilder }, { type: i3.Router }, { type: i4.AlertService }, { type: i5.ProcessService }] });
384
+
385
+ /*
386
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
387
+ *
388
+ * Licensed under EUPL, Version 1.2 (the "License");
389
+ * you may not use this file except in compliance with the License.
390
+ * You may obtain a copy of the License at
391
+ *
392
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
393
+ *
394
+ * Unless required by applicable law or agreed to in writing, software
395
+ * distributed under the License is distributed on an "AS IS" basis,
396
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
397
+ * See the License for the specific language governing permissions and
398
+ * limitations under the License.
399
+ */
400
+ class MilestoneSetEditComponent {
401
+ constructor(milestoneService, formBuilder, router, alertService, route) {
402
+ this.milestoneService = milestoneService;
403
+ this.formBuilder = formBuilder;
404
+ this.router = router;
405
+ this.alertService = alertService;
406
+ this.route = route;
407
+ }
408
+ get formControls() {
409
+ return this.form.controls;
410
+ }
411
+ ngOnInit() {
412
+ this.form = this.formBuilder.group({
413
+ id: new FormControl({ value: '', disabled: true }, Validators.required),
414
+ title: new FormControl({}, Validators.required),
415
+ });
416
+ this.getMilestoneSet();
417
+ }
418
+ reset() {
419
+ this.form.controls.title.setValue('');
420
+ }
421
+ getMilestoneSet() {
422
+ const milestoneSetId = this.route.snapshot.paramMap.get('id');
423
+ this.milestoneService
424
+ .getMilestoneSet(+milestoneSetId)
425
+ .subscribe((milestoneSet) => {
426
+ this.form.setValue({
427
+ id: milestoneSet.id,
428
+ title: milestoneSet.title,
429
+ });
430
+ });
431
+ }
432
+ delete() {
433
+ // Todo: add confirmation dialog after it's fixed
434
+ this.deleteMilestoneSet();
435
+ }
436
+ deleteMilestoneSet() {
437
+ this.milestoneService.deleteMilestoneSet(this.form.getRawValue().id).subscribe(() => {
438
+ this.router.navigate(['/milestones']);
439
+ this.alertService.success('Milestone set has been deleted');
440
+ }, err => {
441
+ this.router.navigate(['/milestones']);
442
+ this.alertService.error('Could not delete Milestone set. Make sure this Milestone set does not contain any milestones.');
443
+ });
444
+ }
445
+ updateMilestoneSet() {
446
+ this.milestoneService.updateMilestoneSet(this.form.getRawValue()).subscribe(() => {
447
+ this.router.navigate(['/milestones']);
448
+ this.alertService.success('Milestone set has been updated');
449
+ });
450
+ }
451
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneSetEditComponent, deps: [{ token: MilestoneService }, { token: i2$1.FormBuilder }, { token: i3.Router }, { token: i4.AlertService }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
452
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MilestoneSetEditComponent, isStandalone: false, selector: "valtimo-milestone-set-edit", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
453
+ }
454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneSetEditComponent, decorators: [{
455
+ type: Component,
456
+ args: [{ standalone: false, selector: 'valtimo-milestone-set-edit', template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 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"] }]
457
+ }], ctorParameters: () => [{ type: MilestoneService }, { type: i2$1.FormBuilder }, { type: i3.Router }, { type: i4.AlertService }, { type: i3.ActivatedRoute }] });
458
+
459
+ /*
460
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
461
+ *
462
+ * Licensed under EUPL, Version 1.2 (the "License");
463
+ * you may not use this file except in compliance with the License.
464
+ * You may obtain a copy of the License at
465
+ *
466
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
467
+ *
468
+ * Unless required by applicable law or agreed to in writing, software
469
+ * distributed under the License is distributed on an "AS IS" basis,
470
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
471
+ * See the License for the specific language governing permissions and
472
+ * limitations under the License.
473
+ */
474
+ class MilestoneEditComponent {
475
+ constructor(milestoneService, formBuilder, router, alertService, processService, route) {
476
+ this.milestoneService = milestoneService;
477
+ this.formBuilder = formBuilder;
478
+ this.router = router;
479
+ this.alertService = alertService;
480
+ this.processService = processService;
481
+ this.route = route;
482
+ this.milestoneSets = [];
483
+ this.processDefinitions = [];
484
+ this.taskDefinitions = [];
485
+ }
486
+ get formControls() {
487
+ return this.form.controls;
488
+ }
489
+ ngOnInit() {
490
+ this.form = this.formBuilder.group({
491
+ id: new FormControl({ value: '', disabled: true }, Validators.required),
492
+ milestoneSet: new FormControl('', Validators.required),
493
+ title: new FormControl('', Validators.required),
494
+ processDefinitionKey: new FormControl('', Validators.required),
495
+ taskDefinitionKey: new FormControl('', Validators.required),
496
+ plannedIntervalInDays: new FormControl('', [
497
+ Validators.required,
498
+ Validators.pattern('^[0-9]*$'),
499
+ ]),
500
+ color: new FormControl('', [
501
+ Validators.required,
502
+ Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),
503
+ ]),
504
+ });
505
+ this.getMilestone();
506
+ this.getMilestoneSets();
507
+ this.getProcessDefinitions();
508
+ }
509
+ reset() {
510
+ this.form.patchValue({
511
+ milestoneSet: '',
512
+ title: '',
513
+ processDefinitionKey: '',
514
+ taskDefinitionKey: '',
515
+ plannedIntervalInDays: '',
516
+ color: '',
517
+ });
518
+ }
519
+ getMilestone() {
520
+ const milestoneId = this.route.snapshot.paramMap.get('id');
521
+ this.milestoneService
522
+ .getMilestone(+milestoneId)
523
+ .pipe(switchMap((milestone) => {
524
+ this.form.patchValue({
525
+ id: milestone.id,
526
+ milestoneSet: milestone.milestoneSet.id,
527
+ title: milestone.title,
528
+ plannedIntervalInDays: milestone.plannedIntervalInDays,
529
+ color: milestone.color,
530
+ taskDefinitionKey: milestone.taskDefinitionKey,
531
+ });
532
+ return this.processService.getProcessDefinition(milestone.processDefinitionKey);
533
+ }))
534
+ .subscribe((processDefinition) => {
535
+ this.form.patchValue({
536
+ processDefinitionKey: processDefinition,
537
+ });
538
+ });
539
+ }
540
+ compareProcessDefinitions(processDefinition1, processDefinition2) {
541
+ return processDefinition1.id === processDefinition2.id;
542
+ }
543
+ getMilestoneSets() {
544
+ this.milestoneService.getMilestoneSets().subscribe((milesetoneSets) => {
545
+ this.milestoneSets = milesetoneSets;
546
+ });
547
+ }
548
+ getProcessDefinitions() {
549
+ this.processService
550
+ .getProcessDefinitions()
551
+ .subscribe((processDefinitions) => {
552
+ this.processDefinitions = processDefinitions;
553
+ });
554
+ }
555
+ getFlownodes(processDefinitionId) {
556
+ if (processDefinitionId) {
557
+ this.milestoneService.getFlownodes(processDefinitionId).subscribe((flowNodes) => {
558
+ this.taskDefinitions = flowNodes['flowNodeMap'];
559
+ });
560
+ }
561
+ }
562
+ delete() {
563
+ // Todo: add confirmation dialog after it's fixed
564
+ this.deleteMilestone();
565
+ }
566
+ deleteMilestone() {
567
+ this.milestoneService.deleteMilestone(this.form.getRawValue().id).subscribe(() => {
568
+ this.router.navigate(['/milestones']);
569
+ this.alertService.success('Milestone has been deleted');
570
+ }, err => {
571
+ this.router.navigate(['/milestones']);
572
+ this.alertService.error('Could not delete Milestone');
573
+ });
574
+ }
575
+ updateMilestone() {
576
+ const milestone = this.form.getRawValue();
577
+ milestone.processDefinitionKey = milestone.processDefinitionKey['key'];
578
+ this.milestoneService.updateMilestone(milestone).subscribe(() => {
579
+ this.router.navigate(['/milestones']);
580
+ this.alertService.success('Milestone has been updated');
581
+ }, err => {
582
+ this.alertService.error('Error updating milestone');
583
+ });
584
+ }
585
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneEditComponent, deps: [{ token: MilestoneService }, { token: i2$1.FormBuilder }, { token: i3.Router }, { token: i4.AlertService }, { token: i5.ProcessService }, { token: i3.ActivatedRoute }], target: i0.ɵɵFactoryTarget.Component }); }
586
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: MilestoneEditComponent, isStandalone: false, selector: "valtimo-milestone-edit", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n"], dependencies: [{ kind: "directive", type: i3.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.WidgetComponent, selector: "valtimo-widget", inputs: ["type", "name", "icon", "contrast", "divider", "title", "subtitle", "collapseAble", "collapse", "additionalClasses"] }, { kind: "directive", type: i2$1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2$1.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { kind: "directive", type: i2$1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2$1.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2$1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i2$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2$1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i7.ColorPickerDirective, selector: "[colorPicker]", inputs: ["colorPicker", "cpWidth", "cpHeight", "cpToggle", "cpDisabled", "cpIgnoredElements", "cpFallbackColor", "cpColorMode", "cpCmykEnabled", "cpOutputFormat", "cpAlphaChannel", "cpDisableInput", "cpDialogDisplay", "cpSaveClickOutside", "cpCloseClickOutside", "cpUseRootViewContainer", "cpPosition", "cpPositionOffset", "cpPositionRelativeToArrow", "cpOKButton", "cpOKButtonText", "cpOKButtonClass", "cpCancelButton", "cpCancelButtonText", "cpCancelButtonClass", "cpEyeDropper", "cpPresetLabel", "cpPresetColors", "cpPresetColorsClass", "cpMaxPresetColorsLength", "cpPresetEmptyMessage", "cpPresetEmptyMessageClass", "cpAddColorButton", "cpAddColorButtonText", "cpAddColorButtonClass", "cpRemoveColorButtonClass", "cpArrowPosition", "cpExtraTemplate"], outputs: ["cpInputChange", "cpToggleChange", "cpSliderChange", "cpSliderDragEnd", "cpSliderDragStart", "colorPickerOpen", "colorPickerClose", "colorPickerCancel", "colorPickerSelect", "colorPickerChange", "cpCmykColorChange", "cpPresetColorsChange"], exportAs: ["ngxColorPicker"] }, { kind: "pipe", type: i6.KeyValuePipe, name: "keyvalue" }] }); }
587
+ }
588
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneEditComponent, decorators: [{
589
+ type: Component,
590
+ args: [{ standalone: false, selector: 'valtimo-milestone-edit', template: "<!--\n ~ Copyright 2015-2025 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", styles: ["/*!\n * Copyright 2015-2025 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"] }]
591
+ }], ctorParameters: () => [{ type: MilestoneService }, { type: i2$1.FormBuilder }, { type: i3.Router }, { type: i4.AlertService }, { type: i5.ProcessService }, { type: i3.ActivatedRoute }] });
592
+
593
+ /*
594
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
595
+ *
596
+ * Licensed under EUPL, Version 1.2 (the "License");
597
+ * you may not use this file except in compliance with the License.
598
+ * You may obtain a copy of the License at
599
+ *
600
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
601
+ *
602
+ * Unless required by applicable law or agreed to in writing, software
603
+ * distributed under the License is distributed on an "AS IS" basis,
604
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
605
+ * See the License for the specific language governing permissions and
606
+ * limitations under the License.
607
+ */
608
+ const routes = [
609
+ {
610
+ path: 'milestones',
611
+ component: MilestoneComponent,
612
+ canActivate: [AuthGuardService],
613
+ data: { title: 'Milestones', roles: [ROLE_ADMIN] },
614
+ },
615
+ {
616
+ path: 'milestones/sets/create',
617
+ component: MilestoneSetCreateComponent,
618
+ canActivate: [AuthGuardService],
619
+ data: { title: 'Create new Milestone Set', roles: [ROLE_ADMIN] },
620
+ },
621
+ {
622
+ path: 'milestones/create',
623
+ component: MilestoneCreateComponent,
624
+ canActivate: [AuthGuardService],
625
+ data: { title: 'Create new Milestone', roles: [ROLE_ADMIN] },
626
+ },
627
+ {
628
+ path: 'milestones/sets/set/:id',
629
+ component: MilestoneSetEditComponent,
630
+ canActivate: [AuthGuardService],
631
+ data: { title: 'Milestone Set details', roles: [ROLE_ADMIN] },
632
+ },
633
+ {
634
+ path: 'milestones/milestone/:id',
635
+ component: MilestoneEditComponent,
636
+ canActivate: [AuthGuardService],
637
+ data: { title: 'Milestone details', roles: [ROLE_ADMIN] },
638
+ },
639
+ ];
640
+ class MilestoneRoutingModule {
641
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
642
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: MilestoneRoutingModule, imports: [CommonModule, i3.RouterModule], exports: [RouterModule] }); }
643
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
644
+ }
645
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneRoutingModule, decorators: [{
646
+ type: NgModule,
647
+ args: [{
648
+ declarations: [],
649
+ imports: [CommonModule, RouterModule.forChild(routes)],
650
+ exports: [RouterModule],
651
+ }]
652
+ }] });
653
+
654
+ /*
655
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
656
+ *
657
+ * Licensed under EUPL, Version 1.2 (the "License");
658
+ * you may not use this file except in compliance with the License.
659
+ * You may obtain a copy of the License at
660
+ *
661
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
662
+ *
663
+ * Unless required by applicable law or agreed to in writing, software
664
+ * distributed under the License is distributed on an "AS IS" basis,
665
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
666
+ * See the License for the specific language governing permissions and
667
+ * limitations under the License.
668
+ */
669
+ class MilestoneModule {
670
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
671
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: MilestoneModule, declarations: [MilestoneComponent,
672
+ MilestoneSetCreateComponent,
673
+ MilestoneListComponent,
674
+ MilestoneCreateComponent,
675
+ MilestoneEditComponent,
676
+ MilestoneSetEditComponent], imports: [MilestoneRoutingModule,
677
+ CommonModule,
678
+ WidgetModule,
679
+ ReactiveFormsModule,
680
+ ColorPickerModule,
681
+ TranslateModule,
682
+ RouterModule,
683
+ CarbonListModule], exports: [MilestoneComponent] }); }
684
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneModule, imports: [MilestoneRoutingModule,
685
+ CommonModule,
686
+ WidgetModule,
687
+ ReactiveFormsModule,
688
+ ColorPickerModule,
689
+ TranslateModule,
690
+ RouterModule,
691
+ CarbonListModule] }); }
692
+ }
693
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: MilestoneModule, decorators: [{
694
+ type: NgModule,
695
+ args: [{
696
+ declarations: [
697
+ MilestoneComponent,
698
+ MilestoneSetCreateComponent,
699
+ MilestoneListComponent,
700
+ MilestoneCreateComponent,
701
+ MilestoneEditComponent,
702
+ MilestoneSetEditComponent,
703
+ ],
704
+ imports: [
705
+ MilestoneRoutingModule,
706
+ CommonModule,
707
+ WidgetModule,
708
+ ReactiveFormsModule,
709
+ ColorPickerModule,
710
+ TranslateModule,
711
+ RouterModule,
712
+ CarbonListModule,
713
+ ],
714
+ exports: [MilestoneComponent],
715
+ }]
716
+ }] });
717
+
718
+ /*
719
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
720
+ *
721
+ * Licensed under EUPL, Version 1.2 (the "License");
722
+ * you may not use this file except in compliance with the License.
723
+ * You may obtain a copy of the License at
724
+ *
725
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
726
+ *
727
+ * Unless required by applicable law or agreed to in writing, software
728
+ * distributed under the License is distributed on an "AS IS" basis,
729
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
730
+ * See the License for the specific language governing permissions and
731
+ * limitations under the License.
732
+ */
733
+ /*
734
+ * Public API Surface of milestone
735
+ */
736
+
737
+ /**
738
+ * Generated bundle index. Do not edit.
739
+ */
740
+
741
+ export { MilestoneComponent, MilestoneModule, MilestoneService };
742
+ //# sourceMappingURL=valtimo-milestone.mjs.map