@valtimo/milestone 4.15.3-next-main.16 → 4.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/bundles/valtimo-milestone.umd.js +1065 -1015
  2. package/bundles/valtimo-milestone.umd.js.map +1 -1
  3. package/bundles/valtimo-milestone.umd.min.js +1 -1
  4. package/bundles/valtimo-milestone.umd.min.js.map +1 -1
  5. package/esm2015/lib/milestone-create/milestone-create.component.js +110 -110
  6. package/esm2015/lib/milestone-edit/milestone-edit.component.js +150 -150
  7. package/esm2015/lib/milestone-list/milestone-list.component.js +90 -90
  8. package/esm2015/lib/milestone-routing.module.js +69 -69
  9. package/esm2015/lib/milestone-set-create/milestone-set-create.component.js +61 -61
  10. package/esm2015/lib/milestone-set-edit/milestone-set-edit.component.js +87 -87
  11. package/esm2015/lib/milestone.component.js +29 -29
  12. package/esm2015/lib/milestone.module.js +55 -55
  13. package/esm2015/lib/milestone.service.js +72 -72
  14. package/esm2015/lib/models/index.js +20 -0
  15. package/esm2015/lib/models/milestone-set.model.js +16 -0
  16. package/esm2015/lib/models/milestone.model.js +16 -0
  17. package/esm2015/public-api.js +23 -22
  18. package/esm2015/valtimo-milestone.js +11 -11
  19. package/fesm2015/valtimo-milestone.js +713 -664
  20. package/fesm2015/valtimo-milestone.js.map +1 -1
  21. package/lib/milestone-create/milestone-create.component.d.ts +28 -28
  22. package/lib/milestone-edit/milestone-edit.component.d.ts +33 -33
  23. package/lib/milestone-list/milestone-list.component.d.ts +23 -23
  24. package/lib/milestone-routing.module.d.ts +2 -2
  25. package/lib/milestone-set-create/milestone-set-create.component.d.ts +19 -19
  26. package/lib/milestone-set-edit/milestone-set-edit.component.d.ts +23 -23
  27. package/lib/milestone.component.d.ts +5 -5
  28. package/lib/milestone.module.d.ts +2 -2
  29. package/lib/milestone.service.d.ts +21 -21
  30. package/lib/models/index.d.ts +2 -0
  31. package/lib/models/milestone-set.model.d.ts +4 -0
  32. package/lib/models/milestone.model.d.ts +10 -0
  33. package/package.json +1 -1
  34. package/public-api.d.ts +4 -3
  35. package/valtimo-milestone.d.ts +10 -10
  36. package/valtimo-milestone.metadata.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"valtimo-milestone.js","sources":["../../../../projects/valtimo/milestone/src/lib/milestone.service.ts","../../../../projects/valtimo/milestone/src/lib/milestone.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-set-create/milestone-set-create.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-create/milestone-create.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-set-edit/milestone-set-edit.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-edit/milestone-edit.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-routing.module.ts","../../../../projects/valtimo/milestone/src/lib/milestone-list/milestone-list.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone.module.ts","../../../../projects/valtimo/milestone/src/public-api.ts","../../../../projects/valtimo/milestone/src/valtimo-milestone.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {Milestone, MilestoneSet} from '@valtimo/contract';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MilestoneService {\n private valtimoApiConfig: any;\n\n constructor(private configService: ConfigService, private http: HttpClient) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getMilestones(): Observable<Milestone[]> {\n return this.http.get<Milestone[]>(`${this.valtimoApiConfig.endpointUri}milestones`);\n }\n\n getMilestone(milestoneId: number): Observable<Milestone> {\n return this.http.get<Milestone>(\n `${this.valtimoApiConfig.endpointUri}milestones/${milestoneId}`\n );\n }\n\n createMilestone(milestone: Milestone): Observable<Milestone> {\n return this.http.post<Milestone>(`${this.valtimoApiConfig.endpointUri}milestones`, milestone);\n }\n\n updateMilestone(milestone: Milestone): Observable<Milestone> {\n return this.http.post<Milestone>(`${this.valtimoApiConfig.endpointUri}milestones`, milestone);\n }\n\n deleteMilestone(milestoneId: number): Observable<void> {\n return this.http.delete<void>(`${this.valtimoApiConfig.endpointUri}milestones/${milestoneId}`);\n }\n\n getMilestoneSets(): Observable<MilestoneSet[]> {\n return this.http.get<MilestoneSet[]>(`${this.valtimoApiConfig.endpointUri}milestone-sets`);\n }\n\n getMilestoneSet(milestoneSetId: number): Observable<MilestoneSet> {\n return this.http.get<MilestoneSet>(\n `${this.valtimoApiConfig.endpointUri}milestone-sets/${milestoneSetId}`\n );\n }\n\n createMilestoneSet(milestoneSet: MilestoneSet): Observable<MilestoneSet> {\n return this.http.post<MilestoneSet>(\n `${this.valtimoApiConfig.endpointUri}milestone-sets`,\n milestoneSet\n );\n }\n\n updateMilestoneSet(milestoneSet: MilestoneSet): Observable<MilestoneSet> {\n return this.http.post<MilestoneSet>(\n `${this.valtimoApiConfig.endpointUri}milestone-sets`,\n milestoneSet\n );\n }\n\n deleteMilestoneSet(milestoneSetId: number): Observable<void> {\n return this.http.delete<void>(\n `${this.valtimoApiConfig.endpointUri}milestone-sets/${milestoneSetId}`\n );\n }\n\n getFlownodes(processDefinitionId: string) {\n return this.http.get(\n `${this.valtimoApiConfig.endpointUri}milestones/${processDefinitionId}/flownodes`\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\n\n@Component({\n selector: 'valtimo-milestone',\n templateUrl: './milestone.component.html',\n styleUrls: ['./milestone.component.scss'],\n})\nexport class MilestoneComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {MilestoneService} from '../milestone.service';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {AlertService} from '@valtimo/components';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'valtimo-milestone-set-create',\n templateUrl: './milestone-set-create.component.html',\n styleUrls: ['./milestone-set-create.component.scss'],\n})\nexport class MilestoneSetCreateComponent implements OnInit {\n public form: FormGroup;\n\n constructor(\n private milestoneService: MilestoneService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n title: new FormControl('', Validators.required),\n });\n }\n\n reset() {\n this.form.setValue({\n title: '',\n });\n }\n\n createMilestoneSet() {\n this.milestoneService.createMilestoneSet(this.form.value).subscribe(() => {\n this.router.navigate(['/milestones']);\n this.alertService.success('New Milestone set has been created');\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MilestoneService} from '../milestone.service';\nimport {Router} from '@angular/router';\nimport {AlertService} from '@valtimo/components';\nimport {Milestone, MilestoneSet, ProcessDefinition} from '@valtimo/contract';\nimport {ProcessService} from '@valtimo/process';\n\n@Component({\n selector: 'valtimo-milestone-create',\n templateUrl: './milestone-create.component.html',\n styleUrls: ['./milestone-create.component.scss'],\n})\nexport class MilestoneCreateComponent implements OnInit {\n public form: FormGroup;\n public milestoneSets: MilestoneSet[] = [];\n public processDefinitions: ProcessDefinition[] = [];\n public taskDefinitions: any[] = [];\n\n constructor(\n private milestoneService: MilestoneService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService,\n private processService: ProcessService\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n milestoneSet: new FormControl('', Validators.required),\n title: new FormControl('', Validators.required),\n processDefinitionKey: new FormControl('', Validators.required),\n taskDefinitionKey: new FormControl('', Validators.required),\n plannedIntervalInDays: new FormControl('', [\n Validators.required,\n Validators.pattern('^[0-9]*$'),\n ]),\n color: new FormControl('', [\n Validators.required,\n Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),\n ]),\n });\n this.getMilestoneSets();\n this.getMilestones();\n }\n\n reset() {\n this.form.patchValue({\n milestoneSet: '',\n title: '',\n processDefinitionKey: '',\n taskDefinitionKey: '',\n plannedIntervalInDays: '',\n color: '',\n });\n }\n\n getMilestoneSets() {\n this.milestoneService.getMilestoneSets().subscribe((milesetoneSets: MilestoneSet[]) => {\n this.milestoneSets = milesetoneSets;\n });\n }\n\n getMilestones() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n getFlownodes(processDefinitionId: string) {\n if (processDefinitionId) {\n this.milestoneService.getFlownodes(processDefinitionId).subscribe((flowNodes: any[]) => {\n this.taskDefinitions = flowNodes['flowNodeMap'];\n this.form.controls.taskDefinitionKey.setValue('');\n });\n }\n }\n\n createMilestone() {\n const milestone: Milestone = this.form.value;\n milestone.processDefinitionKey = milestone.processDefinitionKey['key'];\n milestone.id = null;\n this.milestoneService.createMilestone(milestone).subscribe(\n () => {\n this.router.navigate(['/milestones']);\n this.alertService.success('New Milestone has been created');\n },\n err => {\n this.alertService.error('Error creating new milestone');\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MilestoneService} from '../milestone.service';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {AlertService} from '@valtimo/components';\nimport {MilestoneSet} from '@valtimo/contract';\n\n@Component({\n selector: 'valtimo-milestone-set-edit',\n templateUrl: './milestone-set-edit.component.html',\n styleUrls: ['./milestone-set-edit.component.scss'],\n})\nexport class MilestoneSetEditComponent implements OnInit {\n public form: FormGroup;\n\n constructor(\n private milestoneService: MilestoneService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService,\n private route: ActivatedRoute\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n id: new FormControl({value: '', disabled: true}, Validators.required),\n title: new FormControl({}, Validators.required),\n });\n this.getMilestoneSet();\n }\n\n reset() {\n this.form.controls.title.setValue('');\n }\n\n getMilestoneSet() {\n const milestoneSetId = this.route.snapshot.paramMap.get('id');\n this.milestoneService\n .getMilestoneSet(+milestoneSetId)\n .subscribe((milestoneSet: MilestoneSet) => {\n this.form.setValue({\n id: milestoneSet.id,\n title: milestoneSet.title,\n });\n });\n }\n\n delete() {\n // Todo: add confirmation dialog after it's fixed\n this.deleteMilestoneSet();\n }\n\n deleteMilestoneSet() {\n this.milestoneService.deleteMilestoneSet(this.form.getRawValue().id).subscribe(\n () => {\n this.router.navigate(['/milestones']);\n this.alertService.success('Milestone set has been deleted');\n },\n err => {\n this.router.navigate(['/milestones']);\n this.alertService.error(\n 'Could not delete Milestone set. Make sure this Milestone set does not contain any milestones.'\n );\n }\n );\n }\n\n updateMilestoneSet() {\n this.milestoneService.updateMilestoneSet(this.form.getRawValue()).subscribe(() => {\n this.router.navigate(['/milestones']);\n this.alertService.success('Milestone set has been updated');\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {Milestone, MilestoneSet, ProcessDefinition} from '@valtimo/contract';\nimport {MilestoneService} from '../milestone.service';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {AlertService} from '@valtimo/components';\nimport {ProcessService} from '@valtimo/process';\nimport {switchMap} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-milestone-edit',\n templateUrl: './milestone-edit.component.html',\n styleUrls: ['./milestone-edit.component.scss'],\n})\nexport class MilestoneEditComponent implements OnInit {\n public form: FormGroup;\n public milestoneSets: MilestoneSet[] = [];\n public processDefinitions: ProcessDefinition[] = [];\n public taskDefinitions: any[] = [];\n\n constructor(\n private milestoneService: MilestoneService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService,\n private processService: ProcessService,\n private route: ActivatedRoute\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n id: new FormControl({value: '', disabled: true}, Validators.required),\n milestoneSet: new FormControl('', Validators.required),\n title: new FormControl('', Validators.required),\n processDefinitionKey: new FormControl('', Validators.required),\n taskDefinitionKey: new FormControl('', Validators.required),\n plannedIntervalInDays: new FormControl('', [\n Validators.required,\n Validators.pattern('^[0-9]*$'),\n ]),\n color: new FormControl('', [\n Validators.required,\n Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),\n ]),\n });\n this.getMilestone();\n this.getMilestoneSets();\n this.getProcessDefinitions();\n }\n\n reset() {\n this.form.patchValue({\n milestoneSet: '',\n title: '',\n processDefinitionKey: '',\n taskDefinitionKey: '',\n plannedIntervalInDays: '',\n color: '',\n });\n }\n\n getMilestone() {\n const milestoneId = this.route.snapshot.paramMap.get('id');\n this.milestoneService\n .getMilestone(+milestoneId)\n .pipe(\n switchMap((milestone: Milestone) => {\n this.form.patchValue({\n id: milestone.id,\n milestoneSet: milestone.milestoneSet.id,\n title: milestone.title,\n plannedIntervalInDays: milestone.plannedIntervalInDays,\n color: milestone.color,\n taskDefinitionKey: milestone.taskDefinitionKey,\n });\n return this.processService.getProcessDefinition(milestone.processDefinitionKey);\n })\n )\n .subscribe((processDefinition: ProcessDefinition) => {\n this.form.patchValue({\n processDefinitionKey: processDefinition,\n });\n });\n }\n\n compareProcessDefinitions(\n processDefinition1: ProcessDefinition,\n processDefinition2: ProcessDefinition\n ) {\n return processDefinition1.id === processDefinition2.id;\n }\n\n getMilestoneSets() {\n this.milestoneService.getMilestoneSets().subscribe((milesetoneSets: MilestoneSet[]) => {\n this.milestoneSets = milesetoneSets;\n });\n }\n\n getProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n getFlownodes(processDefinitionId: string) {\n if (processDefinitionId) {\n this.milestoneService.getFlownodes(processDefinitionId).subscribe((flowNodes: any[]) => {\n this.taskDefinitions = flowNodes['flowNodeMap'];\n });\n }\n }\n\n delete() {\n // Todo: add confirmation dialog after it's fixed\n this.deleteMilestone();\n }\n\n deleteMilestone() {\n this.milestoneService.deleteMilestone(this.form.getRawValue().id).subscribe(\n () => {\n this.router.navigate(['/milestones']);\n this.alertService.success('Milestone has been deleted');\n },\n err => {\n this.router.navigate(['/milestones']);\n this.alertService.error('Could not delete Milestone');\n }\n );\n }\n\n updateMilestone() {\n const milestone: Milestone = this.form.getRawValue();\n milestone.processDefinitionKey = milestone.processDefinitionKey['key'];\n this.milestoneService.updateMilestone(milestone).subscribe(\n () => {\n this.router.navigate(['/milestones']);\n this.alertService.success('Milestone has been updated');\n },\n err => {\n this.alertService.error('Error updating milestone');\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MilestoneComponent} from './milestone.component';\nimport {MilestoneSetCreateComponent} from './milestone-set-create/milestone-set-create.component';\nimport {MilestoneCreateComponent} from './milestone-create/milestone-create.component';\nimport {MilestoneSetEditComponent} from './milestone-set-edit/milestone-set-edit.component';\nimport {MilestoneEditComponent} from './milestone-edit/milestone-edit.component';\nimport {ROLE_ADMIN} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: 'milestones',\n component: MilestoneComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Milestones', roles: [ROLE_ADMIN]},\n },\n {\n path: 'milestones/sets/create',\n component: MilestoneSetCreateComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Create new Milestone Set', roles: [ROLE_ADMIN]},\n },\n {\n path: 'milestones/create',\n component: MilestoneCreateComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Create new Milestone', roles: [ROLE_ADMIN]},\n },\n {\n path: 'milestones/sets/set/:id',\n component: MilestoneSetEditComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Milestone Set details', roles: [ROLE_ADMIN]},\n },\n {\n path: 'milestones/milestone/:id',\n component: MilestoneEditComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Milestone details', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MilestoneRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {MilestoneService} from '../milestone.service';\nimport {Milestone, MilestoneSet} from '@valtimo/contract';\nimport {Router} from '@angular/router';\nimport {combineLatest} from 'rxjs';\n\n@Component({\n selector: 'valtimo-milestone-list',\n templateUrl: './milestone-list.component.html',\n styleUrls: ['./milestone-list.component.scss'],\n})\nexport class MilestoneListComponent implements OnInit {\n public milestones: Array<Array<string | MilestoneSet | Array<Milestone>>> = [];\n public milestoneFields = [\n {key: 'id', label: 'ID'},\n {key: 'title', label: 'Title'},\n {key: 'processDefinitionKey', label: 'Process'},\n {key: 'taskDefinitionKey', label: 'Task'},\n {key: 'plannedIntervalInDays', label: 'Interval (in days)'},\n {key: 'color', label: 'Color'},\n ];\n\n constructor(private milestoneService: MilestoneService, private router: Router) {}\n\n editMilestoneSet(milestoneSetId: number) {\n this.router.navigate(['milestones/sets/set', milestoneSetId]);\n }\n\n editMilestone(milestone: Milestone) {\n this.router.navigate(['milestones/milestone', milestone.id]);\n }\n\n ngOnInit() {\n combineLatest([\n this.milestoneService.getMilestones(),\n this.milestoneService.getMilestoneSets(),\n ]).subscribe(([milestones, milestoneSets]) =>\n this.handleMilestoneResult(milestones, milestoneSets)\n );\n }\n\n private handleMilestoneResult(\n milestones: Array<Milestone>,\n milestoneSets: Array<MilestoneSet>\n ): void {\n const milestoneSetsMap = this.getMilestoneSetsMap(milestones, milestoneSets);\n\n this.setMilestones(milestoneSetsMap);\n }\n\n private setMilestones(milestoneSetsMap: Map<string, Milestone[]>): void {\n this.milestones = Array.from(milestoneSetsMap.entries()).map(entry => {\n entry[0] = JSON.parse(entry[0]);\n return entry;\n });\n }\n\n private getMilestoneSetsMap(\n milestones: Array<Milestone>,\n milestoneSets: Array<MilestoneSet>\n ): Map<string, Milestone[]> {\n const mapWithSets = this.addMilestoneSetsToMap(milestoneSets, this.getEmptyMap());\n\n return this.addMilestonesToMap(milestones, mapWithSets);\n }\n\n private getEmptyMap(): Map<string, Milestone[]> {\n return new Map<string, Milestone[]>();\n }\n\n private addMilestoneSetsToMap(\n milestoneSets: Array<MilestoneSet>,\n map: Map<string, Milestone[]>\n ): Map<string, Milestone[]> {\n milestoneSets.forEach(milestoneSet => {\n map.set(JSON.stringify(milestoneSet), []);\n });\n\n return map;\n }\n\n private addMilestonesToMap(\n milestones: Array<Milestone>,\n map: Map<string, Milestone[]>\n ): Map<string, Milestone[]> {\n milestones.forEach(milestone => {\n const milestoneSetString = JSON.stringify(milestone.milestoneSet);\n const arr = map.get(milestoneSetString);\n arr.push(milestone);\n map.set(milestoneSetString, arr);\n });\n\n return map;\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {MilestoneComponent} from './milestone.component';\nimport {MilestoneSetCreateComponent} from './milestone-set-create/milestone-set-create.component';\nimport {RouterModule} from '@angular/router';\nimport {MilestoneRoutingModule} from './milestone-routing.module';\nimport {MilestoneListComponent} from './milestone-list/milestone-list.component';\nimport {CommonModule} from '@angular/common';\nimport {ListModule, WidgetModule} from '@valtimo/components';\nimport {MilestoneCreateComponent} from './milestone-create/milestone-create.component';\nimport {MilestoneEditComponent} from './milestone-edit/milestone-edit.component';\nimport {MilestoneSetEditComponent} from './milestone-set-edit/milestone-set-edit.component';\nimport {ReactiveFormsModule} from '@angular/forms';\nimport {ColorPickerModule} from 'ngx-color-picker';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [\n MilestoneComponent,\n MilestoneSetCreateComponent,\n MilestoneListComponent,\n MilestoneCreateComponent,\n MilestoneEditComponent,\n MilestoneSetEditComponent,\n ],\n imports: [\n RouterModule,\n MilestoneRoutingModule,\n CommonModule,\n ListModule,\n WidgetModule,\n ReactiveFormsModule,\n ColorPickerModule,\n TranslateModule,\n ],\n exports: [MilestoneComponent],\n})\nexport class MilestoneModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of milestone\n */\n\nexport * from './lib/milestone.service';\nexport * from './lib/milestone.component';\nexport * from './lib/milestone.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MilestoneCreateComponent as ɵc} from './lib/milestone-create/milestone-create.component';\nexport {MilestoneEditComponent as ɵd} from './lib/milestone-edit/milestone-edit.component';\nexport {MilestoneListComponent as ɵb} from './lib/milestone-list/milestone-list.component';\nexport {MilestoneRoutingModule as ɵf} from './lib/milestone-routing.module';\nexport {MilestoneSetCreateComponent as ɵa} from './lib/milestone-set-create/milestone-set-create.component';\nexport {MilestoneSetEditComponent as ɵe} from './lib/milestone-set-edit/milestone-set-edit.component';"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;MAyBa,gBAAgB;IAG3B,YAAoB,aAA4B,EAAU,IAAgB;QAAtD,kBAAa,GAAb,aAAa,CAAe;QAAU,SAAI,GAAJ,IAAI,CAAY;QACxE,IAAI,CAAC,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;;ACAA;;;;;;"}
1
+ {"version":3,"file":"valtimo-milestone.js","sources":["../../../../projects/valtimo/milestone/src/lib/models/milestone-set.model.ts","../../../../projects/valtimo/milestone/src/lib/models/milestone.model.ts","../../../../projects/valtimo/milestone/src/lib/models/index.ts","../../../../projects/valtimo/milestone/src/lib/milestone.service.ts","../../../../projects/valtimo/milestone/src/lib/milestone.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-set-create/milestone-set-create.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-create/milestone-create.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-set-edit/milestone-set-edit.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-edit/milestone-edit.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone-routing.module.ts","../../../../projects/valtimo/milestone/src/lib/milestone-list/milestone-list.component.ts","../../../../projects/valtimo/milestone/src/lib/milestone.module.ts","../../../../projects/valtimo/milestone/src/public-api.ts","../../../../projects/valtimo/milestone/src/valtimo-milestone.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport interface MilestoneSet {\n id: number;\n title: string;\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {MilestoneSet} from './milestone-set.model';\n\nexport interface Milestone {\n id: number;\n title: string;\n color: string;\n plannedIntervalInDays: number;\n processDefinitionKey: string;\n taskDefinitionKey: string;\n milestoneSet: MilestoneSet;\n}\n","/*\n *\n * * Copyright 2015-2020 Ritense BV, the Netherlands.\n * *\n * * Licensed under EUPL, Version 1.2 (the \"License\");\n * * you may not use this file except in compliance with the License.\n * * You may obtain a copy of the License at\n * *\n * * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n * *\n * * Unless required by applicable law or agreed to in writing, software\n * * distributed under the License is distributed on an \"AS IS\" basis,\n * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * * See the License for the specific language governing permissions and\n * * limitations under the License.\n *\n */\n\nexport * from './milestone-set.model';\nexport * from './milestone.model';\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {Observable} from 'rxjs';\nimport {Milestone, MilestoneSet} from './models';\nimport {ConfigService} from '@valtimo/config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class MilestoneService {\n private valtimoApiConfig: any;\n\n constructor(private configService: ConfigService, private http: HttpClient) {\n this.valtimoApiConfig = configService.config.valtimoApi;\n }\n\n getMilestones(): Observable<Milestone[]> {\n return this.http.get<Milestone[]>(`${this.valtimoApiConfig.endpointUri}milestones`);\n }\n\n getMilestone(milestoneId: number): Observable<Milestone> {\n return this.http.get<Milestone>(\n `${this.valtimoApiConfig.endpointUri}milestones/${milestoneId}`\n );\n }\n\n createMilestone(milestone: Milestone): Observable<Milestone> {\n return this.http.post<Milestone>(`${this.valtimoApiConfig.endpointUri}milestones`, milestone);\n }\n\n updateMilestone(milestone: Milestone): Observable<Milestone> {\n return this.http.post<Milestone>(`${this.valtimoApiConfig.endpointUri}milestones`, milestone);\n }\n\n deleteMilestone(milestoneId: number): Observable<void> {\n return this.http.delete<void>(`${this.valtimoApiConfig.endpointUri}milestones/${milestoneId}`);\n }\n\n getMilestoneSets(): Observable<MilestoneSet[]> {\n return this.http.get<MilestoneSet[]>(`${this.valtimoApiConfig.endpointUri}milestone-sets`);\n }\n\n getMilestoneSet(milestoneSetId: number): Observable<MilestoneSet> {\n return this.http.get<MilestoneSet>(\n `${this.valtimoApiConfig.endpointUri}milestone-sets/${milestoneSetId}`\n );\n }\n\n createMilestoneSet(milestoneSet: MilestoneSet): Observable<MilestoneSet> {\n return this.http.post<MilestoneSet>(\n `${this.valtimoApiConfig.endpointUri}milestone-sets`,\n milestoneSet\n );\n }\n\n updateMilestoneSet(milestoneSet: MilestoneSet): Observable<MilestoneSet> {\n return this.http.post<MilestoneSet>(\n `${this.valtimoApiConfig.endpointUri}milestone-sets`,\n milestoneSet\n );\n }\n\n deleteMilestoneSet(milestoneSetId: number): Observable<void> {\n return this.http.delete<void>(\n `${this.valtimoApiConfig.endpointUri}milestone-sets/${milestoneSetId}`\n );\n }\n\n getFlownodes(processDefinitionId: string) {\n return this.http.get(\n `${this.valtimoApiConfig.endpointUri}milestones/${processDefinitionId}/flownodes`\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\n\n@Component({\n selector: 'valtimo-milestone',\n templateUrl: './milestone.component.html',\n styleUrls: ['./milestone.component.scss'],\n})\nexport class MilestoneComponent implements OnInit {\n constructor() {}\n\n ngOnInit() {}\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {MilestoneService} from '../milestone.service';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {AlertService} from '@valtimo/components';\nimport {Router} from '@angular/router';\n\n@Component({\n selector: 'valtimo-milestone-set-create',\n templateUrl: './milestone-set-create.component.html',\n styleUrls: ['./milestone-set-create.component.scss'],\n})\nexport class MilestoneSetCreateComponent implements OnInit {\n public form: FormGroup;\n\n constructor(\n private milestoneService: MilestoneService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n title: new FormControl('', Validators.required),\n });\n }\n\n reset() {\n this.form.setValue({\n title: '',\n });\n }\n\n createMilestoneSet() {\n this.milestoneService.createMilestoneSet(this.form.value).subscribe(() => {\n this.router.navigate(['/milestones']);\n this.alertService.success('New Milestone set has been created');\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MilestoneService} from '../milestone.service';\nimport {Router} from '@angular/router';\nimport {AlertService} from '@valtimo/components';\nimport {Milestone, MilestoneSet} from '../models';\nimport {ProcessService, ProcessDefinition} from '@valtimo/process';\n\n@Component({\n selector: 'valtimo-milestone-create',\n templateUrl: './milestone-create.component.html',\n styleUrls: ['./milestone-create.component.scss'],\n})\nexport class MilestoneCreateComponent implements OnInit {\n public form: FormGroup;\n public milestoneSets: MilestoneSet[] = [];\n public processDefinitions: ProcessDefinition[] = [];\n public taskDefinitions: any[] = [];\n\n constructor(\n private milestoneService: MilestoneService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService,\n private processService: ProcessService\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n milestoneSet: new FormControl('', Validators.required),\n title: new FormControl('', Validators.required),\n processDefinitionKey: new FormControl('', Validators.required),\n taskDefinitionKey: new FormControl('', Validators.required),\n plannedIntervalInDays: new FormControl('', [\n Validators.required,\n Validators.pattern('^[0-9]*$'),\n ]),\n color: new FormControl('', [\n Validators.required,\n Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),\n ]),\n });\n this.getMilestoneSets();\n this.getMilestones();\n }\n\n reset() {\n this.form.patchValue({\n milestoneSet: '',\n title: '',\n processDefinitionKey: '',\n taskDefinitionKey: '',\n plannedIntervalInDays: '',\n color: '',\n });\n }\n\n getMilestoneSets() {\n this.milestoneService.getMilestoneSets().subscribe((milesetoneSets: MilestoneSet[]) => {\n this.milestoneSets = milesetoneSets;\n });\n }\n\n getMilestones() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n getFlownodes(processDefinitionId: string) {\n if (processDefinitionId) {\n this.milestoneService.getFlownodes(processDefinitionId).subscribe((flowNodes: any[]) => {\n this.taskDefinitions = flowNodes['flowNodeMap'];\n this.form.controls.taskDefinitionKey.setValue('');\n });\n }\n }\n\n createMilestone() {\n const milestone: Milestone = this.form.value;\n milestone.processDefinitionKey = milestone.processDefinitionKey['key'];\n milestone.id = null;\n this.milestoneService.createMilestone(milestone).subscribe(\n () => {\n this.router.navigate(['/milestones']);\n this.alertService.success('New Milestone has been created');\n },\n err => {\n this.alertService.error('Error creating new milestone');\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {MilestoneService} from '../milestone.service';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {AlertService} from '@valtimo/components';\nimport {MilestoneSet} from '../models';\n\n@Component({\n selector: 'valtimo-milestone-set-edit',\n templateUrl: './milestone-set-edit.component.html',\n styleUrls: ['./milestone-set-edit.component.scss'],\n})\nexport class MilestoneSetEditComponent implements OnInit {\n public form: FormGroup;\n\n constructor(\n private milestoneService: MilestoneService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService,\n private route: ActivatedRoute\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n id: new FormControl({value: '', disabled: true}, Validators.required),\n title: new FormControl({}, Validators.required),\n });\n this.getMilestoneSet();\n }\n\n reset() {\n this.form.controls.title.setValue('');\n }\n\n getMilestoneSet() {\n const milestoneSetId = this.route.snapshot.paramMap.get('id');\n this.milestoneService\n .getMilestoneSet(+milestoneSetId)\n .subscribe((milestoneSet: MilestoneSet) => {\n this.form.setValue({\n id: milestoneSet.id,\n title: milestoneSet.title,\n });\n });\n }\n\n delete() {\n // Todo: add confirmation dialog after it's fixed\n this.deleteMilestoneSet();\n }\n\n deleteMilestoneSet() {\n this.milestoneService.deleteMilestoneSet(this.form.getRawValue().id).subscribe(\n () => {\n this.router.navigate(['/milestones']);\n this.alertService.success('Milestone set has been deleted');\n },\n err => {\n this.router.navigate(['/milestones']);\n this.alertService.error(\n 'Could not delete Milestone set. Make sure this Milestone set does not contain any milestones.'\n );\n }\n );\n }\n\n updateMilestoneSet() {\n this.milestoneService.updateMilestoneSet(this.form.getRawValue()).subscribe(() => {\n this.router.navigate(['/milestones']);\n this.alertService.success('Milestone set has been updated');\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {FormBuilder, FormControl, FormGroup, Validators} from '@angular/forms';\nimport {Milestone, MilestoneSet} from '../models';\nimport {MilestoneService} from '../milestone.service';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {AlertService} from '@valtimo/components';\nimport {ProcessService, ProcessDefinition} from '@valtimo/process';\nimport {switchMap} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-milestone-edit',\n templateUrl: './milestone-edit.component.html',\n styleUrls: ['./milestone-edit.component.scss'],\n})\nexport class MilestoneEditComponent implements OnInit {\n public form: FormGroup;\n public milestoneSets: MilestoneSet[] = [];\n public processDefinitions: ProcessDefinition[] = [];\n public taskDefinitions: any[] = [];\n\n constructor(\n private milestoneService: MilestoneService,\n private formBuilder: FormBuilder,\n private router: Router,\n private alertService: AlertService,\n private processService: ProcessService,\n private route: ActivatedRoute\n ) {}\n\n get formControls() {\n return this.form.controls;\n }\n\n ngOnInit() {\n this.form = this.formBuilder.group({\n id: new FormControl({value: '', disabled: true}, Validators.required),\n milestoneSet: new FormControl('', Validators.required),\n title: new FormControl('', Validators.required),\n processDefinitionKey: new FormControl('', Validators.required),\n taskDefinitionKey: new FormControl('', Validators.required),\n plannedIntervalInDays: new FormControl('', [\n Validators.required,\n Validators.pattern('^[0-9]*$'),\n ]),\n color: new FormControl('', [\n Validators.required,\n Validators.pattern('^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$'),\n ]),\n });\n this.getMilestone();\n this.getMilestoneSets();\n this.getProcessDefinitions();\n }\n\n reset() {\n this.form.patchValue({\n milestoneSet: '',\n title: '',\n processDefinitionKey: '',\n taskDefinitionKey: '',\n plannedIntervalInDays: '',\n color: '',\n });\n }\n\n getMilestone() {\n const milestoneId = this.route.snapshot.paramMap.get('id');\n this.milestoneService\n .getMilestone(+milestoneId)\n .pipe(\n switchMap((milestone: Milestone) => {\n this.form.patchValue({\n id: milestone.id,\n milestoneSet: milestone.milestoneSet.id,\n title: milestone.title,\n plannedIntervalInDays: milestone.plannedIntervalInDays,\n color: milestone.color,\n taskDefinitionKey: milestone.taskDefinitionKey,\n });\n return this.processService.getProcessDefinition(milestone.processDefinitionKey);\n })\n )\n .subscribe((processDefinition: ProcessDefinition) => {\n this.form.patchValue({\n processDefinitionKey: processDefinition,\n });\n });\n }\n\n compareProcessDefinitions(\n processDefinition1: ProcessDefinition,\n processDefinition2: ProcessDefinition\n ) {\n return processDefinition1.id === processDefinition2.id;\n }\n\n getMilestoneSets() {\n this.milestoneService.getMilestoneSets().subscribe((milesetoneSets: MilestoneSet[]) => {\n this.milestoneSets = milesetoneSets;\n });\n }\n\n getProcessDefinitions() {\n this.processService\n .getProcessDefinitions()\n .subscribe((processDefinitions: ProcessDefinition[]) => {\n this.processDefinitions = processDefinitions;\n });\n }\n\n getFlownodes(processDefinitionId: string) {\n if (processDefinitionId) {\n this.milestoneService.getFlownodes(processDefinitionId).subscribe((flowNodes: any[]) => {\n this.taskDefinitions = flowNodes['flowNodeMap'];\n });\n }\n }\n\n delete() {\n // Todo: add confirmation dialog after it's fixed\n this.deleteMilestone();\n }\n\n deleteMilestone() {\n this.milestoneService.deleteMilestone(this.form.getRawValue().id).subscribe(\n () => {\n this.router.navigate(['/milestones']);\n this.alertService.success('Milestone has been deleted');\n },\n err => {\n this.router.navigate(['/milestones']);\n this.alertService.error('Could not delete Milestone');\n }\n );\n }\n\n updateMilestone() {\n const milestone: Milestone = this.form.getRawValue();\n milestone.processDefinitionKey = milestone.processDefinitionKey['key'];\n this.milestoneService.updateMilestone(milestone).subscribe(\n () => {\n this.router.navigate(['/milestones']);\n this.alertService.success('Milestone has been updated');\n },\n err => {\n this.alertService.error('Error updating milestone');\n }\n );\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {MilestoneComponent} from './milestone.component';\nimport {MilestoneSetCreateComponent} from './milestone-set-create/milestone-set-create.component';\nimport {MilestoneCreateComponent} from './milestone-create/milestone-create.component';\nimport {MilestoneSetEditComponent} from './milestone-set-edit/milestone-set-edit.component';\nimport {MilestoneEditComponent} from './milestone-edit/milestone-edit.component';\nimport {ROLE_ADMIN} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'milestones',\n component: MilestoneComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Milestones', roles: [ROLE_ADMIN]},\n },\n {\n path: 'milestones/sets/create',\n component: MilestoneSetCreateComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Create new Milestone Set', roles: [ROLE_ADMIN]},\n },\n {\n path: 'milestones/create',\n component: MilestoneCreateComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Create new Milestone', roles: [ROLE_ADMIN]},\n },\n {\n path: 'milestones/sets/set/:id',\n component: MilestoneSetEditComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Milestone Set details', roles: [ROLE_ADMIN]},\n },\n {\n path: 'milestones/milestone/:id',\n component: MilestoneEditComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Milestone details', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n declarations: [],\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class MilestoneRoutingModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit} from '@angular/core';\nimport {MilestoneService} from '../milestone.service';\nimport {Milestone, MilestoneSet} from '../models';\nimport {Router} from '@angular/router';\nimport {combineLatest} from 'rxjs';\n\n@Component({\n selector: 'valtimo-milestone-list',\n templateUrl: './milestone-list.component.html',\n styleUrls: ['./milestone-list.component.scss'],\n})\nexport class MilestoneListComponent implements OnInit {\n public milestones: Array<Array<string | MilestoneSet | Array<Milestone>>> = [];\n public milestoneFields = [\n {key: 'id', label: 'ID'},\n {key: 'title', label: 'Title'},\n {key: 'processDefinitionKey', label: 'Process'},\n {key: 'taskDefinitionKey', label: 'Task'},\n {key: 'plannedIntervalInDays', label: 'Interval (in days)'},\n {key: 'color', label: 'Color'},\n ];\n\n constructor(private milestoneService: MilestoneService, private router: Router) {}\n\n editMilestoneSet(milestoneSetId: number) {\n this.router.navigate(['milestones/sets/set', milestoneSetId]);\n }\n\n editMilestone(milestone: Milestone) {\n this.router.navigate(['milestones/milestone', milestone.id]);\n }\n\n ngOnInit() {\n combineLatest([\n this.milestoneService.getMilestones(),\n this.milestoneService.getMilestoneSets(),\n ]).subscribe(([milestones, milestoneSets]) =>\n this.handleMilestoneResult(milestones, milestoneSets)\n );\n }\n\n private handleMilestoneResult(\n milestones: Array<Milestone>,\n milestoneSets: Array<MilestoneSet>\n ): void {\n const milestoneSetsMap = this.getMilestoneSetsMap(milestones, milestoneSets);\n\n this.setMilestones(milestoneSetsMap);\n }\n\n private setMilestones(milestoneSetsMap: Map<string, Milestone[]>): void {\n this.milestones = Array.from(milestoneSetsMap.entries()).map(entry => {\n entry[0] = JSON.parse(entry[0]);\n return entry;\n });\n }\n\n private getMilestoneSetsMap(\n milestones: Array<Milestone>,\n milestoneSets: Array<MilestoneSet>\n ): Map<string, Milestone[]> {\n const mapWithSets = this.addMilestoneSetsToMap(milestoneSets, this.getEmptyMap());\n\n return this.addMilestonesToMap(milestones, mapWithSets);\n }\n\n private getEmptyMap(): Map<string, Milestone[]> {\n return new Map<string, Milestone[]>();\n }\n\n private addMilestoneSetsToMap(\n milestoneSets: Array<MilestoneSet>,\n map: Map<string, Milestone[]>\n ): Map<string, Milestone[]> {\n milestoneSets.forEach(milestoneSet => {\n map.set(JSON.stringify(milestoneSet), []);\n });\n\n return map;\n }\n\n private addMilestonesToMap(\n milestones: Array<Milestone>,\n map: Map<string, Milestone[]>\n ): Map<string, Milestone[]> {\n milestones.forEach(milestone => {\n const milestoneSetString = JSON.stringify(milestone.milestoneSet);\n const arr = map.get(milestoneSetString);\n arr.push(milestone);\n map.set(milestoneSetString, arr);\n });\n\n return map;\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {MilestoneComponent} from './milestone.component';\nimport {MilestoneSetCreateComponent} from './milestone-set-create/milestone-set-create.component';\nimport {RouterModule} from '@angular/router';\nimport {MilestoneRoutingModule} from './milestone-routing.module';\nimport {MilestoneListComponent} from './milestone-list/milestone-list.component';\nimport {CommonModule} from '@angular/common';\nimport {ListModule, WidgetModule} from '@valtimo/components';\nimport {MilestoneCreateComponent} from './milestone-create/milestone-create.component';\nimport {MilestoneEditComponent} from './milestone-edit/milestone-edit.component';\nimport {MilestoneSetEditComponent} from './milestone-set-edit/milestone-set-edit.component';\nimport {ReactiveFormsModule} from '@angular/forms';\nimport {ColorPickerModule} from 'ngx-color-picker';\nimport {TranslateModule} from '@ngx-translate/core';\n\n@NgModule({\n declarations: [\n MilestoneComponent,\n MilestoneSetCreateComponent,\n MilestoneListComponent,\n MilestoneCreateComponent,\n MilestoneEditComponent,\n MilestoneSetEditComponent,\n ],\n imports: [\n RouterModule,\n MilestoneRoutingModule,\n CommonModule,\n ListModule,\n WidgetModule,\n ReactiveFormsModule,\n ColorPickerModule,\n TranslateModule,\n ],\n exports: [MilestoneComponent],\n})\nexport class MilestoneModule {}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of milestone\n */\n\nexport * from './lib/models/';\nexport * from './lib/milestone.service';\nexport * from './lib/milestone.component';\nexport * from './lib/milestone.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n\nexport {MilestoneCreateComponent as ɵc} from './lib/milestone-create/milestone-create.component';\nexport {MilestoneEditComponent as ɵd} from './lib/milestone-edit/milestone-edit.component';\nexport {MilestoneListComponent as ɵb} from './lib/milestone-list/milestone-list.component';\nexport {MilestoneRoutingModule as ɵf} from './lib/milestone-routing.module';\nexport {MilestoneSetCreateComponent as ɵa} from './lib/milestone-set-create/milestone-set-create.component';\nexport {MilestoneSetEditComponent as ɵe} from './lib/milestone-set-edit/milestone-set-edit.component';"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;;;ACAA;;;;;;;;;;;;;;;MAyBa,gBAAgB;IAG3B,YAAoB,aAA4B,EAAU,IAAgB;QAAtD,kBAAa,GAAb,aAAa,CAAe;QAAU,SAAI,GAAJ,IAAI,CAAY;QACxE,IAAI,CAAC,gBAAgB,GAAG,aAAa,CAAC,MAAM,CA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@
1
- import { OnInit } from '@angular/core';
2
- import { FormBuilder, FormGroup } from '@angular/forms';
3
- import { MilestoneService } from '../milestone.service';
4
- import { Router } from '@angular/router';
5
- import { AlertService } from '@valtimo/components';
6
- import { MilestoneSet, ProcessDefinition } from '@valtimo/contract';
7
- import { ProcessService } from '@valtimo/process';
8
- export declare class MilestoneCreateComponent implements OnInit {
9
- private milestoneService;
10
- private formBuilder;
11
- private router;
12
- private alertService;
13
- private processService;
14
- form: FormGroup;
15
- milestoneSets: MilestoneSet[];
16
- processDefinitions: ProcessDefinition[];
17
- taskDefinitions: any[];
18
- constructor(milestoneService: MilestoneService, formBuilder: FormBuilder, router: Router, alertService: AlertService, processService: ProcessService);
19
- get formControls(): {
20
- [key: string]: import("@angular/forms").AbstractControl;
21
- };
22
- ngOnInit(): void;
23
- reset(): void;
24
- getMilestoneSets(): void;
25
- getMilestones(): void;
26
- getFlownodes(processDefinitionId: string): void;
27
- createMilestone(): void;
28
- }
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { MilestoneService } from '../milestone.service';
4
+ import { Router } from '@angular/router';
5
+ import { AlertService } from '@valtimo/components';
6
+ import { MilestoneSet } from '../models';
7
+ import { ProcessService, ProcessDefinition } from '@valtimo/process';
8
+ export declare class MilestoneCreateComponent implements OnInit {
9
+ private milestoneService;
10
+ private formBuilder;
11
+ private router;
12
+ private alertService;
13
+ private processService;
14
+ form: FormGroup;
15
+ milestoneSets: MilestoneSet[];
16
+ processDefinitions: ProcessDefinition[];
17
+ taskDefinitions: any[];
18
+ constructor(milestoneService: MilestoneService, formBuilder: FormBuilder, router: Router, alertService: AlertService, processService: ProcessService);
19
+ get formControls(): {
20
+ [key: string]: import("@angular/forms").AbstractControl;
21
+ };
22
+ ngOnInit(): void;
23
+ reset(): void;
24
+ getMilestoneSets(): void;
25
+ getMilestones(): void;
26
+ getFlownodes(processDefinitionId: string): void;
27
+ createMilestone(): void;
28
+ }
@@ -1,33 +1,33 @@
1
- import { OnInit } from '@angular/core';
2
- import { FormBuilder, FormGroup } from '@angular/forms';
3
- import { MilestoneSet, ProcessDefinition } from '@valtimo/contract';
4
- import { MilestoneService } from '../milestone.service';
5
- import { ActivatedRoute, Router } from '@angular/router';
6
- import { AlertService } from '@valtimo/components';
7
- import { ProcessService } from '@valtimo/process';
8
- export declare class MilestoneEditComponent implements OnInit {
9
- private milestoneService;
10
- private formBuilder;
11
- private router;
12
- private alertService;
13
- private processService;
14
- private route;
15
- form: FormGroup;
16
- milestoneSets: MilestoneSet[];
17
- processDefinitions: ProcessDefinition[];
18
- taskDefinitions: any[];
19
- constructor(milestoneService: MilestoneService, formBuilder: FormBuilder, router: Router, alertService: AlertService, processService: ProcessService, route: ActivatedRoute);
20
- get formControls(): {
21
- [key: string]: import("@angular/forms").AbstractControl;
22
- };
23
- ngOnInit(): void;
24
- reset(): void;
25
- getMilestone(): void;
26
- compareProcessDefinitions(processDefinition1: ProcessDefinition, processDefinition2: ProcessDefinition): boolean;
27
- getMilestoneSets(): void;
28
- getProcessDefinitions(): void;
29
- getFlownodes(processDefinitionId: string): void;
30
- delete(): void;
31
- deleteMilestone(): void;
32
- updateMilestone(): void;
33
- }
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { MilestoneSet } from '../models';
4
+ import { MilestoneService } from '../milestone.service';
5
+ import { ActivatedRoute, Router } from '@angular/router';
6
+ import { AlertService } from '@valtimo/components';
7
+ import { ProcessService, ProcessDefinition } from '@valtimo/process';
8
+ export declare class MilestoneEditComponent implements OnInit {
9
+ private milestoneService;
10
+ private formBuilder;
11
+ private router;
12
+ private alertService;
13
+ private processService;
14
+ private route;
15
+ form: FormGroup;
16
+ milestoneSets: MilestoneSet[];
17
+ processDefinitions: ProcessDefinition[];
18
+ taskDefinitions: any[];
19
+ constructor(milestoneService: MilestoneService, formBuilder: FormBuilder, router: Router, alertService: AlertService, processService: ProcessService, route: ActivatedRoute);
20
+ get formControls(): {
21
+ [key: string]: import("@angular/forms").AbstractControl;
22
+ };
23
+ ngOnInit(): void;
24
+ reset(): void;
25
+ getMilestone(): void;
26
+ compareProcessDefinitions(processDefinition1: ProcessDefinition, processDefinition2: ProcessDefinition): boolean;
27
+ getMilestoneSets(): void;
28
+ getProcessDefinitions(): void;
29
+ getFlownodes(processDefinitionId: string): void;
30
+ delete(): void;
31
+ deleteMilestone(): void;
32
+ updateMilestone(): void;
33
+ }
@@ -1,23 +1,23 @@
1
- import { OnInit } from '@angular/core';
2
- import { MilestoneService } from '../milestone.service';
3
- import { Milestone, MilestoneSet } from '@valtimo/contract';
4
- import { Router } from '@angular/router';
5
- export declare class MilestoneListComponent implements OnInit {
6
- private milestoneService;
7
- private router;
8
- milestones: Array<Array<string | MilestoneSet | Array<Milestone>>>;
9
- milestoneFields: {
10
- key: string;
11
- label: string;
12
- }[];
13
- constructor(milestoneService: MilestoneService, router: Router);
14
- editMilestoneSet(milestoneSetId: number): void;
15
- editMilestone(milestone: Milestone): void;
16
- ngOnInit(): void;
17
- private handleMilestoneResult;
18
- private setMilestones;
19
- private getMilestoneSetsMap;
20
- private getEmptyMap;
21
- private addMilestoneSetsToMap;
22
- private addMilestonesToMap;
23
- }
1
+ import { OnInit } from '@angular/core';
2
+ import { MilestoneService } from '../milestone.service';
3
+ import { Milestone, MilestoneSet } from '../models';
4
+ import { Router } from '@angular/router';
5
+ export declare class MilestoneListComponent implements OnInit {
6
+ private milestoneService;
7
+ private router;
8
+ milestones: Array<Array<string | MilestoneSet | Array<Milestone>>>;
9
+ milestoneFields: {
10
+ key: string;
11
+ label: string;
12
+ }[];
13
+ constructor(milestoneService: MilestoneService, router: Router);
14
+ editMilestoneSet(milestoneSetId: number): void;
15
+ editMilestone(milestone: Milestone): void;
16
+ ngOnInit(): void;
17
+ private handleMilestoneResult;
18
+ private setMilestones;
19
+ private getMilestoneSetsMap;
20
+ private getEmptyMap;
21
+ private addMilestoneSetsToMap;
22
+ private addMilestonesToMap;
23
+ }
@@ -1,2 +1,2 @@
1
- export declare class MilestoneRoutingModule {
2
- }
1
+ export declare class MilestoneRoutingModule {
2
+ }
@@ -1,19 +1,19 @@
1
- import { OnInit } from '@angular/core';
2
- import { MilestoneService } from '../milestone.service';
3
- import { FormBuilder, FormGroup } from '@angular/forms';
4
- import { AlertService } from '@valtimo/components';
5
- import { Router } from '@angular/router';
6
- export declare class MilestoneSetCreateComponent implements OnInit {
7
- private milestoneService;
8
- private formBuilder;
9
- private router;
10
- private alertService;
11
- form: FormGroup;
12
- constructor(milestoneService: MilestoneService, formBuilder: FormBuilder, router: Router, alertService: AlertService);
13
- get formControls(): {
14
- [key: string]: import("@angular/forms").AbstractControl;
15
- };
16
- ngOnInit(): void;
17
- reset(): void;
18
- createMilestoneSet(): void;
19
- }
1
+ import { OnInit } from '@angular/core';
2
+ import { MilestoneService } from '../milestone.service';
3
+ import { FormBuilder, FormGroup } from '@angular/forms';
4
+ import { AlertService } from '@valtimo/components';
5
+ import { Router } from '@angular/router';
6
+ export declare class MilestoneSetCreateComponent implements OnInit {
7
+ private milestoneService;
8
+ private formBuilder;
9
+ private router;
10
+ private alertService;
11
+ form: FormGroup;
12
+ constructor(milestoneService: MilestoneService, formBuilder: FormBuilder, router: Router, alertService: AlertService);
13
+ get formControls(): {
14
+ [key: string]: import("@angular/forms").AbstractControl;
15
+ };
16
+ ngOnInit(): void;
17
+ reset(): void;
18
+ createMilestoneSet(): void;
19
+ }
@@ -1,23 +1,23 @@
1
- import { OnInit } from '@angular/core';
2
- import { FormBuilder, FormGroup } from '@angular/forms';
3
- import { MilestoneService } from '../milestone.service';
4
- import { ActivatedRoute, Router } from '@angular/router';
5
- import { AlertService } from '@valtimo/components';
6
- export declare class MilestoneSetEditComponent implements OnInit {
7
- private milestoneService;
8
- private formBuilder;
9
- private router;
10
- private alertService;
11
- private route;
12
- form: FormGroup;
13
- constructor(milestoneService: MilestoneService, formBuilder: FormBuilder, router: Router, alertService: AlertService, route: ActivatedRoute);
14
- get formControls(): {
15
- [key: string]: import("@angular/forms").AbstractControl;
16
- };
17
- ngOnInit(): void;
18
- reset(): void;
19
- getMilestoneSet(): void;
20
- delete(): void;
21
- deleteMilestoneSet(): void;
22
- updateMilestoneSet(): void;
23
- }
1
+ import { OnInit } from '@angular/core';
2
+ import { FormBuilder, FormGroup } from '@angular/forms';
3
+ import { MilestoneService } from '../milestone.service';
4
+ import { ActivatedRoute, Router } from '@angular/router';
5
+ import { AlertService } from '@valtimo/components';
6
+ export declare class MilestoneSetEditComponent implements OnInit {
7
+ private milestoneService;
8
+ private formBuilder;
9
+ private router;
10
+ private alertService;
11
+ private route;
12
+ form: FormGroup;
13
+ constructor(milestoneService: MilestoneService, formBuilder: FormBuilder, router: Router, alertService: AlertService, route: ActivatedRoute);
14
+ get formControls(): {
15
+ [key: string]: import("@angular/forms").AbstractControl;
16
+ };
17
+ ngOnInit(): void;
18
+ reset(): void;
19
+ getMilestoneSet(): void;
20
+ delete(): void;
21
+ deleteMilestoneSet(): void;
22
+ updateMilestoneSet(): void;
23
+ }
@@ -1,5 +1,5 @@
1
- import { OnInit } from '@angular/core';
2
- export declare class MilestoneComponent implements OnInit {
3
- constructor();
4
- ngOnInit(): void;
5
- }
1
+ import { OnInit } from '@angular/core';
2
+ export declare class MilestoneComponent implements OnInit {
3
+ constructor();
4
+ ngOnInit(): void;
5
+ }
@@ -1,2 +1,2 @@
1
- export declare class MilestoneModule {
2
- }
1
+ export declare class MilestoneModule {
2
+ }
@@ -1,21 +1,21 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { Observable } from 'rxjs';
3
- import { Milestone, MilestoneSet } from '@valtimo/contract';
4
- import { ConfigService } from '@valtimo/config';
5
- export declare class MilestoneService {
6
- private configService;
7
- private http;
8
- private valtimoApiConfig;
9
- constructor(configService: ConfigService, http: HttpClient);
10
- getMilestones(): Observable<Milestone[]>;
11
- getMilestone(milestoneId: number): Observable<Milestone>;
12
- createMilestone(milestone: Milestone): Observable<Milestone>;
13
- updateMilestone(milestone: Milestone): Observable<Milestone>;
14
- deleteMilestone(milestoneId: number): Observable<void>;
15
- getMilestoneSets(): Observable<MilestoneSet[]>;
16
- getMilestoneSet(milestoneSetId: number): Observable<MilestoneSet>;
17
- createMilestoneSet(milestoneSet: MilestoneSet): Observable<MilestoneSet>;
18
- updateMilestoneSet(milestoneSet: MilestoneSet): Observable<MilestoneSet>;
19
- deleteMilestoneSet(milestoneSetId: number): Observable<void>;
20
- getFlownodes(processDefinitionId: string): Observable<Object>;
21
- }
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { Milestone, MilestoneSet } from './models';
4
+ import { ConfigService } from '@valtimo/config';
5
+ export declare class MilestoneService {
6
+ private configService;
7
+ private http;
8
+ private valtimoApiConfig;
9
+ constructor(configService: ConfigService, http: HttpClient);
10
+ getMilestones(): Observable<Milestone[]>;
11
+ getMilestone(milestoneId: number): Observable<Milestone>;
12
+ createMilestone(milestone: Milestone): Observable<Milestone>;
13
+ updateMilestone(milestone: Milestone): Observable<Milestone>;
14
+ deleteMilestone(milestoneId: number): Observable<void>;
15
+ getMilestoneSets(): Observable<MilestoneSet[]>;
16
+ getMilestoneSet(milestoneSetId: number): Observable<MilestoneSet>;
17
+ createMilestoneSet(milestoneSet: MilestoneSet): Observable<MilestoneSet>;
18
+ updateMilestoneSet(milestoneSet: MilestoneSet): Observable<MilestoneSet>;
19
+ deleteMilestoneSet(milestoneSetId: number): Observable<void>;
20
+ getFlownodes(processDefinitionId: string): Observable<Object>;
21
+ }
@@ -0,0 +1,2 @@
1
+ export * from './milestone-set.model';
2
+ export * from './milestone.model';
@@ -0,0 +1,4 @@
1
+ export interface MilestoneSet {
2
+ id: number;
3
+ title: string;
4
+ }
@@ -0,0 +1,10 @@
1
+ import { MilestoneSet } from './milestone-set.model';
2
+ export interface Milestone {
3
+ id: number;
4
+ title: string;
5
+ color: string;
6
+ plannedIntervalInDays: number;
7
+ processDefinitionKey: string;
8
+ taskDefinitionKey: string;
9
+ milestoneSet: MilestoneSet;
10
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@valtimo/milestone",
3
3
  "license": "EUPL-1.2",
4
- "version": "4.15.3-next-main.16",
4
+ "version": "4.17.0",
5
5
  "peerDependencies": {
6
6
  "@angular/common": "^10.0.11",
7
7
  "@angular/core": "^10.0.11"
package/public-api.d.ts CHANGED
@@ -1,3 +1,4 @@
1
- export * from './lib/milestone.service';
2
- export * from './lib/milestone.component';
3
- export * from './lib/milestone.module';
1
+ export * from './lib/models/';
2
+ export * from './lib/milestone.service';
3
+ export * from './lib/milestone.component';
4
+ export * from './lib/milestone.module';
@@ -1,10 +1,10 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
5
- export { MilestoneCreateComponent as ɵc } from './lib/milestone-create/milestone-create.component';
6
- export { MilestoneEditComponent as ɵd } from './lib/milestone-edit/milestone-edit.component';
7
- export { MilestoneListComponent as ɵb } from './lib/milestone-list/milestone-list.component';
8
- export { MilestoneRoutingModule as ɵf } from './lib/milestone-routing.module';
9
- export { MilestoneSetCreateComponent as ɵa } from './lib/milestone-set-create/milestone-set-create.component';
10
- export { MilestoneSetEditComponent as ɵe } from './lib/milestone-set-edit/milestone-set-edit.component';
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ export { MilestoneCreateComponent as ɵc } from './lib/milestone-create/milestone-create.component';
6
+ export { MilestoneEditComponent as ɵd } from './lib/milestone-edit/milestone-edit.component';
7
+ export { MilestoneListComponent as ɵb } from './lib/milestone-list/milestone-list.component';
8
+ export { MilestoneRoutingModule as ɵf } from './lib/milestone-routing.module';
9
+ export { MilestoneSetCreateComponent as ɵa } from './lib/milestone-set-create/milestone-set-create.component';
10
+ export { MilestoneSetEditComponent as ɵe } from './lib/milestone-set-edit/milestone-set-edit.component';