@loxia/mst-viewer 8.1.3-202511260346 → 8.1.3-202511261901
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/generated/openapi/api/api.mjs +5 -2
- package/esm2022/generated/openapi/api/sbController.service.mjs +17 -16
- package/esm2022/generated/openapi/api/sbController.serviceInterface.mjs +1 -1
- package/esm2022/generated/openapi/api/svgController.service.mjs +155 -0
- package/esm2022/generated/openapi/api/svgController.serviceInterface.mjs +2 -0
- package/esm2022/generated/openapi/model/algemeneRitDto.mjs +1 -1
- package/esm2022/generated/openapi/model/kilometrering.mjs +13 -0
- package/esm2022/generated/openapi/model/models.mjs +10 -2
- package/esm2022/generated/openapi/model/sein.mjs +10 -0
- package/esm2022/generated/openapi/model/signaleringsElement.mjs +13 -0
- package/esm2022/generated/openapi/model/spoornummer.mjs +13 -0
- package/esm2022/generated/openapi/model/spoortakFragment.mjs +2 -0
- package/esm2022/generated/openapi/model/svgInfoDto.mjs +2 -0
- package/esm2022/generated/openapi/model/svgTopology.mjs +2 -0
- package/esm2022/generated/openapi/model/topologyElement.mjs +2 -0
- package/esm2022/generated/openapi/model/wissel.mjs +2 -0
- package/esm2022/lib/atomic-components/message/message.component.mjs +3 -3
- package/esm2022/lib/atomic-components/progress-indicator/progress-indicator.entity.mjs +7 -4
- package/esm2022/lib/components/carousel-controls/carousel-controls.component.mjs +5 -6
- package/esm2022/lib/components/mstviewer/mstviewer.component.mjs +13 -7
- package/esm2022/lib/components/ritdelen-lijst/ritdelen-lijst.component.mjs +18 -12
- package/esm2022/lib/components/rpe/rpe.component.mjs +6 -2
- package/esm2022/lib/components/svg-visualisatie/svg-visualisatie.component.mjs +11 -9
- package/esm2022/lib/components/viewer-controls/viewer-controls.component.mjs +17 -14
- package/esm2022/lib/model/km-range.mjs +2 -2
- package/esm2022/lib/model/nieuwe-route.mjs +2 -2
- package/esm2022/lib/model/ritdeel.mjs +10 -10
- package/esm2022/lib/mst-viewer.module.mjs +6 -5
- package/esm2022/lib/resources/signaleringsbeeldinfo.resource.mjs +16 -12
- package/esm2022/lib/services/base-rest.service.mjs +3 -1
- package/esm2022/lib/services/beweging-utils.service.mjs +6 -6
- package/esm2022/lib/services/debug.service.mjs +3 -3
- package/esm2022/lib/services/editor.service.mjs +3 -1
- package/esm2022/lib/services/print-beweging.service.mjs +23 -20
- package/esm2022/lib/services/rit-lezer.service.mjs +4 -4
- package/esm2022/lib/services/signalerings-beeld-manager.service.mjs +1 -1
- package/esm2022/lib/services/viewer-control.service.mjs +8 -28
- package/esm2022/lib/state/actions/actions.mjs +7 -4
- package/esm2022/lib/state/actions/ritdelen.actions.mjs +4 -4
- package/esm2022/lib/state/effect/bepaal-ongeplande-acties.effect.mjs +8 -7
- package/esm2022/lib/state/effect/bepaal-sb-infos.effect.mjs +1 -1
- package/esm2022/lib/state/effect/beweging-invoegen.effect.mjs +1 -1
- package/esm2022/lib/state/effect/delete-ongeplande-actie.effect.mjs +1 -1
- package/esm2022/lib/state/effect/focus-effect.mjs +2 -2
- package/esm2022/lib/state/effect/laad-route-files.effect.mjs +8 -8
- package/esm2022/lib/state/effect/laad-signaleringsbeelden.effect.mjs +25 -27
- package/esm2022/lib/state/effect/ritdelen.effect.mjs +26 -25
- package/esm2022/lib/state/effect/svg-view.effect.mjs +59 -17
- package/esm2022/lib/state/mst-editor-state.mjs +12 -13
- package/esm2022/lib/state/reducer/rit-delen.reducer.mjs +1 -1
- package/esm2022/lib/util/actie-helper.mjs +26 -22
- package/esm2022/lib/util/actie-popover-bepaler.mjs +2 -2
- package/esm2022/lib/util/logging-helper.mjs +31 -33
- package/esm2022/lib/util/multi-map.mjs +2 -3
- package/esm2022/lib/util/utils.mjs +5 -5
- package/esm2022/lib/util/zone-util.mjs +2 -1
- package/esm2022/src/generated/openapi/api/api.mjs +5 -2
- package/esm2022/src/generated/openapi/api/sbController.service.mjs +17 -16
- package/esm2022/src/generated/openapi/api/sbController.serviceInterface.mjs +1 -1
- package/esm2022/src/generated/openapi/api/svgController.service.mjs +155 -0
- package/esm2022/src/generated/openapi/api/svgController.serviceInterface.mjs +2 -0
- package/esm2022/src/generated/openapi/model/algemeneRitDto.mjs +1 -1
- package/esm2022/src/generated/openapi/model/kilometrering.mjs +13 -0
- package/esm2022/src/generated/openapi/model/models.mjs +10 -2
- package/esm2022/src/generated/openapi/model/sein.mjs +10 -0
- package/esm2022/src/generated/openapi/model/signaleringsElement.mjs +13 -0
- package/esm2022/src/generated/openapi/model/spoornummer.mjs +13 -0
- package/esm2022/src/generated/openapi/model/spoortakFragment.mjs +2 -0
- package/esm2022/src/generated/openapi/model/svgInfoDto.mjs +2 -0
- package/esm2022/src/generated/openapi/model/svgTopology.mjs +2 -0
- package/esm2022/src/generated/openapi/model/topologyElement.mjs +2 -0
- package/esm2022/src/generated/openapi/model/wissel.mjs +2 -0
- package/fesm2022/loxia-mst-viewer-src-generated-openapi.mjs +198 -17
- package/fesm2022/loxia-mst-viewer-src-generated-openapi.mjs.map +1 -1
- package/fesm2022/loxia-mst-viewer.mjs +632 -390
- package/fesm2022/loxia-mst-viewer.mjs.map +1 -1
- package/generated/openapi/api/api.d.ts +4 -1
- package/generated/openapi/api/sbController.service.d.ts +8 -8
- package/generated/openapi/api/sbController.serviceInterface.d.ts +3 -3
- package/generated/openapi/api/svgController.service.d.ts +40 -0
- package/generated/openapi/api/svgController.serviceInterface.d.ts +27 -0
- package/generated/openapi/model/algemeneRitDto.d.ts +0 -8
- package/generated/openapi/model/{signaleringsbeeldRequestDto.d.ts → kilometrering.d.ts} +3 -4
- package/generated/openapi/model/models.d.ts +9 -1
- package/generated/openapi/model/sein.d.ts +46 -0
- package/{src/generated/openapi/model/signaleringsbeeldRequestDto.d.ts → generated/openapi/model/signaleringsElement.d.ts} +4 -4
- package/generated/openapi/model/spoornummer.d.ts +17 -0
- package/generated/openapi/model/spoortakFragment.d.ts +26 -0
- package/generated/openapi/model/svgInfoDto.d.ts +16 -0
- package/generated/openapi/model/svgTopology.d.ts +21 -0
- package/generated/openapi/model/topologyElement.d.ts +18 -0
- package/generated/openapi/model/wissel.d.ts +31 -0
- package/lib/atomic-components/message/message.component.d.ts +2 -2
- package/lib/atomic-components/progress-indicator/progress-indicator.entity.d.ts +1 -1
- package/lib/components/carousel-controls/carousel-controls.component.d.ts +1 -3
- package/lib/components/mstviewer/mstviewer.component.d.ts +2 -2
- package/lib/components/ritdelen-lijst/ritdelen-lijst.component.d.ts +2 -2
- package/lib/components/rpe/rpe.component.d.ts +1 -1
- package/lib/components/svg-visualisatie/svg-visualisatie.component.d.ts +2 -1
- package/lib/components/viewer-controls/viewer-controls.component.d.ts +3 -4
- package/lib/model/km-range.d.ts +1 -1
- package/lib/model/nieuwe-route.d.ts +2 -2
- package/lib/model/ritdeel.d.ts +11 -10
- package/lib/resources/signaleringsbeeldinfo.resource.d.ts +10 -15
- package/lib/services/editor.service.d.ts +2 -2
- package/lib/services/print-beweging.service.d.ts +4 -6
- package/lib/services/rit-lezer.service.d.ts +1 -1
- package/lib/services/signalerings-beeld-manager.service.d.ts +2 -2
- package/lib/services/viewer-control.service.d.ts +0 -5
- package/lib/state/actions/actions.d.ts +23 -22
- package/lib/state/actions/ritdelen.actions.d.ts +3 -7
- package/lib/state/effect/bepaal-ongeplande-acties.effect.d.ts +2 -1
- package/lib/state/effect/delete-ongeplande-actie.effect.d.ts +1 -1
- package/lib/state/effect/laad-route-files.effect.d.ts +4 -5
- package/lib/state/effect/laad-signaleringsbeelden.effect.d.ts +13 -13
- package/lib/state/effect/ritdelen.effect.d.ts +7 -6
- package/lib/state/effect/svg-view.effect.d.ts +12 -6
- package/lib/state/mst-editor-state.d.ts +29 -91
- package/lib/util/actie-helper.d.ts +4 -4
- package/lib/util/logging-helper.d.ts +2 -1
- package/lib/util/utils.d.ts +0 -1
- package/package.json +1 -1
- package/src/generated/openapi/api/api.d.ts +4 -1
- package/src/generated/openapi/api/sbController.service.d.ts +8 -8
- package/src/generated/openapi/api/sbController.serviceInterface.d.ts +3 -3
- package/src/generated/openapi/api/svgController.service.d.ts +40 -0
- package/src/generated/openapi/api/svgController.serviceInterface.d.ts +27 -0
- package/src/generated/openapi/model/algemeneRitDto.d.ts +0 -8
- package/src/generated/openapi/model/kilometrering.d.ts +15 -0
- package/src/generated/openapi/model/models.d.ts +9 -1
- package/src/generated/openapi/model/sein.d.ts +46 -0
- package/src/generated/openapi/model/signaleringsElement.d.ts +16 -0
- package/src/generated/openapi/model/spoornummer.d.ts +17 -0
- package/src/generated/openapi/model/spoortakFragment.d.ts +26 -0
- package/src/generated/openapi/model/svgInfoDto.d.ts +16 -0
- package/src/generated/openapi/model/svgTopology.d.ts +21 -0
- package/src/generated/openapi/model/topologyElement.d.ts +18 -0
- package/src/generated/openapi/model/wissel.d.ts +31 -0
- package/esm2022/generated/openapi/model/signaleringsbeeldRequestDto.mjs +0 -13
- package/esm2022/src/generated/openapi/model/signaleringsbeeldRequestDto.mjs +0 -13
|
@@ -3,21 +3,21 @@ import { CommonModule } from '@angular/common';
|
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { EventEmitter, Output, Input, Component, Injectable, ChangeDetectionStrategy, ViewChild, InjectionToken, Optional, Inject, SkipSelf, NgModule, HostListener } from '@angular/core';
|
|
5
5
|
import * as i7 from '@loxia/imx-viewer';
|
|
6
|
-
import {
|
|
7
|
-
import * as
|
|
6
|
+
import { PopoverInfo, Point, SvgInfo, ImxViewerComponent, SelectieInfo, ImxViewerModule } from '@loxia/imx-viewer';
|
|
7
|
+
import * as i3 from '@loxia/rijwegen';
|
|
8
8
|
import { JsJavaUtil, RijwegenModule } from '@loxia/rijwegen';
|
|
9
9
|
import * as i1$2 from '@ngrx/effects';
|
|
10
10
|
import { createEffect, ofType, EffectsModule } from '@ngrx/effects';
|
|
11
11
|
import * as i2$1 from '@ngrx/store';
|
|
12
12
|
import { createAction, union, select, createReducer, on, StoreModule } from '@ngrx/store';
|
|
13
13
|
import { ResourceModule } from '@ngx-resource/handler-ngx-http';
|
|
14
|
-
import { BehaviorSubject, from, Subscription, combineLatest, of, throwError } from 'rxjs';
|
|
15
|
-
import {
|
|
14
|
+
import { BehaviorSubject, from, Subscription, combineLatest, forkJoin, of, throwError } from 'rxjs';
|
|
15
|
+
import { filter, map, take, tap, catchError, withLatestFrom, switchMap } from 'rxjs/operators';
|
|
16
16
|
import * as i1 from '@angular/common/http';
|
|
17
17
|
import { HttpHeaders, HttpContext, HttpParams } from '@angular/common/http';
|
|
18
18
|
import { __decorate } from 'tslib';
|
|
19
19
|
import * as i1$1 from '@ngx-resource/core';
|
|
20
|
-
import { Resource, ResourceAction,
|
|
20
|
+
import { Resource, ResourceAction, ResourceParams, ResourceModel } from '@ngx-resource/core';
|
|
21
21
|
|
|
22
22
|
class Message {
|
|
23
23
|
constructor(severity, text, timeout = 0) {
|
|
@@ -41,7 +41,7 @@ class MessageComponent {
|
|
|
41
41
|
this.onClearMessage = new EventEmitter();
|
|
42
42
|
}
|
|
43
43
|
ngOnInit() {
|
|
44
|
-
if (this.message.timeout > 0) {
|
|
44
|
+
if (this.message && this.message.timeout > 0) {
|
|
45
45
|
setTimeout(() => {
|
|
46
46
|
this.closeMessage({ stopPropagation: () => null });
|
|
47
47
|
}, this.message.timeout);
|
|
@@ -53,7 +53,7 @@ class MessageComponent {
|
|
|
53
53
|
this.message = undefined;
|
|
54
54
|
}
|
|
55
55
|
get severity() {
|
|
56
|
-
return this.message
|
|
56
|
+
return this.message?.severity ?? '?';
|
|
57
57
|
}
|
|
58
58
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: MessageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
59
59
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: MessageComponent, selector: "loxia-message", inputs: { message: "message" }, outputs: { onClearMessage: "onClearMessage" }, ngImport: i0, template: "<div id=\"alert-1\" *ngIf=\"message\"\n [ngClass]=\"severity\"\n class=\" loxia-message flex items-center p-4 text-white\" role=\"alert\">\n <svg class=\"flex-shrink-0 size-4 mt-0.5\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z\"></path>\n <path d=\"M12 9v4\"></path>\n <path d=\"M12 17h.01\"></path>\n </svg>\n <span class=\"sr-only\">Info</span>\n <div class=\"ms-3 text-sm font-medium\">\n {{message.text}}\n </div>\n <button type=\"button\"\n (click)=\"closeMessage($event)\"\n class=\"ms-auto -mx-1.5 -my-1.5 rounded-lg inline-flex items-center justify-center h-8 w-8\" data-dismiss-target=\"#alert-1\" aria-label=\"Close\">\n <span class=\"sr-only\">Close</span>\n <svg class=\"w-3 h-3\" aria-hidden=\"true\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 14 14\">\n <path stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m1 1 6 6m0 0 6 6M7 7l6-6M7 7l-6 6\"/>\n </svg>\n </button>\n</div>\n", styles: ["svg{background-color:transparent;stroke-width:unset}.loxia-message.information{background-color:#0288d1}.loxia-message.warning{background-color:#ff6a00}.loxia-message.notification{background-color:#f3ed38}.loxia-message.error{background-color:#b5061b}.loxia-message.success{background-color:#297d03}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
@@ -124,6 +124,83 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
124
124
|
args: [{ selector: 'loxia-progress-indicator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"inline-block h-16 w-16 animate-spin rounded-full border-4 border-solid border-current border-e-transparent align-[-0.125em] text-surface motion-reduce:animate-[spin_1.5s_linear_infinite] dark:text-warning\"\n role=\"status\">\n <span class=\"!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]\">\n Loading...\n </span>\n</div>\n" }]
|
|
125
125
|
}] });
|
|
126
126
|
|
|
127
|
+
const SET_RIT_DELEN = '[mst] SetRitDelen';
|
|
128
|
+
const SET_RIT_DELEN_AFTER_UPDATE = '[mst] SetRitDelenAfterUpdate';
|
|
129
|
+
const UPDATE_RIT_DELEN = '[mst] UpdateRitDelen';
|
|
130
|
+
const TOGGLE_RITDEEL_ZICHTBAAR = '[mst] ToggleRitdeelZichtbaar';
|
|
131
|
+
const SET_RITDEEL_ZICHTBAAR = '[mst] ZetRitdeelZichtbaar';
|
|
132
|
+
const SET_ZICHTBAARHEID_ALLE_RITDELEN = '[mst] SetZichtbaarheidAlleRitdelen';
|
|
133
|
+
const TOGGLE_ZICHTBAARHEID_VOOR_BEWEGINGEN = '[mst] ToggleZichtbaarheidVoorBewegingen';
|
|
134
|
+
const SET_ALTERNATIEVE_RIT_DELEN = '[mst] SetAlternatieveRitDelen';
|
|
135
|
+
const RITDEEL_INVOEGEN = '[mst] RitdeelInvoegen';
|
|
136
|
+
const DELETE_RITDEEL = '[mst] DeleteRitdeel';
|
|
137
|
+
const DELETE_RITDEEL_ACTIE = '[mst] DeleteRitdeelActie';
|
|
138
|
+
const ADD_RITDEEL_ACTIE = '[mst] AddRitdeelActie';
|
|
139
|
+
const NAVIGEER = '[mst] Navigeer';
|
|
140
|
+
const NAVIGEER_VANAF = '[mst] NavigeerVanaf';
|
|
141
|
+
const setRitDelen = createAction(SET_RIT_DELEN, (ritDelen, paginationSize) => ({ ritDelen, paginationSize }));
|
|
142
|
+
const setRitdelenAfterUpdate = createAction(SET_RIT_DELEN_AFTER_UPDATE, (ritDelen) => ({ ritDelen }));
|
|
143
|
+
const navigeer = createAction(NAVIGEER, (stapSize, paginationSize) => ({ stapSize, paginationSize }));
|
|
144
|
+
const navigeerVanaf = createAction(NAVIGEER_VANAF, (paginationSize, ritdeel) => ({ paginationSize, ritdeel }));
|
|
145
|
+
const updateRitDelen = createAction(UPDATE_RIT_DELEN, (ritDelen) => ({ ritDelen }));
|
|
146
|
+
const toggleRitdeelZichtbaar = createAction(TOGGLE_RITDEEL_ZICHTBAAR, (ritDeel) => ({ ritDeel }));
|
|
147
|
+
const setRitdeelZichtbaar = createAction(SET_RITDEEL_ZICHTBAAR, (ritDeel, zichtbaar) => ({ ritDeel, zichtbaar }));
|
|
148
|
+
const deleteRitdeel = createAction(DELETE_RITDEEL, (ritDeel) => ({ ritDeel }));
|
|
149
|
+
const deleteRitdeelActie = createAction(DELETE_RITDEEL_ACTIE, (ritDeel, actie) => ({ ritDeel, actie }));
|
|
150
|
+
const addRitdeelActie = createAction(ADD_RITDEEL_ACTIE, (ritDeel, actie) => ({ ritDeel, actie }));
|
|
151
|
+
const setZichtbaarheidAlleRitdelen = createAction(SET_ZICHTBAARHEID_ALLE_RITDELEN, (zichtbaarheid) => ({ zichtbaarheid }));
|
|
152
|
+
const toggleZichtbaarheidVoorBewegingen = createAction(TOGGLE_ZICHTBAARHEID_VOOR_BEWEGINGEN, (bewegingIds) => ({ bewegingIds }));
|
|
153
|
+
const setAlternatieveRitDelen = createAction(SET_ALTERNATIEVE_RIT_DELEN, (alternatieveRitDeel) => ({ alternatieveRitDeel }));
|
|
154
|
+
const ritdeelInvoegen = createAction(RITDEEL_INVOEGEN, (nieuweRoute) => ({ nieuweRoute }));
|
|
155
|
+
// do not export return value
|
|
156
|
+
const ritdeelActions = union({
|
|
157
|
+
setRitDelen,
|
|
158
|
+
updateRitDelen,
|
|
159
|
+
setRitdelenAfterUpdate,
|
|
160
|
+
toggleRitdeelZichtbaar,
|
|
161
|
+
setRitdeelZichtbaar,
|
|
162
|
+
deleteRitdeel,
|
|
163
|
+
deleteRitdeelActie,
|
|
164
|
+
addRitdeelActie,
|
|
165
|
+
setZichtbaarheidAlleRitdelen,
|
|
166
|
+
toggleZichtbaarheidVoorBewegingen,
|
|
167
|
+
setAlternatieveRitDelen,
|
|
168
|
+
ritdeelInvoegen
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
class CarouselControlsComponent {
|
|
172
|
+
constructor(store) {
|
|
173
|
+
this.store = store;
|
|
174
|
+
this.paginationSize = 4;
|
|
175
|
+
this.sideNavOpen = false;
|
|
176
|
+
this.ritdelen$ = this.store.select('ritDelen').pipe(filter(r => r?.length > 0));
|
|
177
|
+
this.kanLinks$ = this.ritdelen$.pipe(map(r => this.kanLinksNavigeren(r)));
|
|
178
|
+
this.kanRechts$ = this.ritdelen$.pipe(map(r => this.kanRechtsNavigeren(r)));
|
|
179
|
+
}
|
|
180
|
+
kanLinksNavigeren(ritDelen) {
|
|
181
|
+
return ritDelen.length > this.paginationSize && !ritDelen[0].isBinnenWindow();
|
|
182
|
+
}
|
|
183
|
+
kanRechtsNavigeren(ritDelen) {
|
|
184
|
+
return ritDelen.length > this.paginationSize && !ritDelen[ritDelen.length - 1].isBinnenWindow();
|
|
185
|
+
}
|
|
186
|
+
navigeerNaarLinks(event) {
|
|
187
|
+
this.store.dispatch(navigeer(event?.ctrlKey ? -1 : -(this.paginationSize - 1), this.paginationSize));
|
|
188
|
+
}
|
|
189
|
+
navigeerNaarRechts(event) {
|
|
190
|
+
this.store.dispatch(navigeer(event?.ctrlKey ? 1 : this.paginationSize - 1, this.paginationSize));
|
|
191
|
+
}
|
|
192
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CarouselControlsComponent, deps: [{ token: i2$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
193
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CarouselControlsComponent, selector: "carousel-controls", inputs: { paginationSize: "paginationSize", sideNavOpen: "sideNavOpen" }, ngImport: i0, template: "<div *ngIf=\"ritdelen$ | async\">\n <a class=\"loxia-carousel-control-prev\" [ngClass]=\"(sideNavOpen)?'carousel-sidebar-open':'carousel-sidebar'\" role=\"button\"\n data-slide=\"prev\" (click)=\"navigeerNaarLinks($event)\" [hidden]=\"(kanLinks$ | async) === false\">\n <span id=\"previous-page\" class=\"loxia-carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"loxia-sr-only\">Previous</span>\n</a>\n <a class=\"loxia-carousel-control-next\" style=\"width: 2%;\" role=\"button\" data-slide=\"next\" (click)=\"navigeerNaarRechts($event)\"\n [hidden]=\"(kanRechts$ | async) === false\">\n <span id=\"next-page\" class=\"loxia-carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"loxia-sr-only\">Next</span>\n </a>\n</div>\n", styles: [".loxia-carousel-control-prev{left:0}.loxia-carousel-control-next{right:0}.loxia-carousel-control-next-icon,.loxia-carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.loxia-carousel-control-prev-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e\")}.loxia-carousel-control-next-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e\")}.loxia-carousel-control-next:focus,.loxia-carousel-control-next:hover,.loxia-carousel-control-prev:focus,.loxia-carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.loxia-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loxia-carousel-control-next,.loxia-carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}.carousel-sidebar{width:2%}.carousel-sidebar-open{width:2%;transition:all .3s;left:470px}[hidden]{display:none!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
194
|
+
}
|
|
195
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CarouselControlsComponent, decorators: [{
|
|
196
|
+
type: Component,
|
|
197
|
+
args: [{ selector: 'carousel-controls', template: "<div *ngIf=\"ritdelen$ | async\">\n <a class=\"loxia-carousel-control-prev\" [ngClass]=\"(sideNavOpen)?'carousel-sidebar-open':'carousel-sidebar'\" role=\"button\"\n data-slide=\"prev\" (click)=\"navigeerNaarLinks($event)\" [hidden]=\"(kanLinks$ | async) === false\">\n <span id=\"previous-page\" class=\"loxia-carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"loxia-sr-only\">Previous</span>\n</a>\n <a class=\"loxia-carousel-control-next\" style=\"width: 2%;\" role=\"button\" data-slide=\"next\" (click)=\"navigeerNaarRechts($event)\"\n [hidden]=\"(kanRechts$ | async) === false\">\n <span id=\"next-page\" class=\"loxia-carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"loxia-sr-only\">Next</span>\n </a>\n</div>\n", styles: [".loxia-carousel-control-prev{left:0}.loxia-carousel-control-next{right:0}.loxia-carousel-control-next-icon,.loxia-carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.loxia-carousel-control-prev-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e\")}.loxia-carousel-control-next-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e\")}.loxia-carousel-control-next:focus,.loxia-carousel-control-next:hover,.loxia-carousel-control-prev:focus,.loxia-carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.loxia-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loxia-carousel-control-next,.loxia-carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}.carousel-sidebar{width:2%}.carousel-sidebar-open{width:2%;transition:all .3s;left:470px}[hidden]{display:none!important}\n"] }]
|
|
198
|
+
}], ctorParameters: () => [{ type: i2$1.Store }], propDecorators: { paginationSize: [{
|
|
199
|
+
type: Input
|
|
200
|
+
}], sideNavOpen: [{
|
|
201
|
+
type: Input
|
|
202
|
+
}] } });
|
|
203
|
+
|
|
127
204
|
const version = '8.1.3-SNAPSHOT';
|
|
128
205
|
|
|
129
206
|
const SET_EDITABLE = '[mst] SetEditable';
|
|
@@ -169,7 +246,8 @@ const LAAD_EN_VERWERK_SIGNALERINGSBEELD_INFO = '[mst] laadEnVerwerkSignaleringsb
|
|
|
169
246
|
const FOCUS_OP_RITDEEL = '[mst] focusOpRitdeel';
|
|
170
247
|
const FOCUS_OP_IDS = '[mst] focusOpIds';
|
|
171
248
|
const BEPAAL_SB_INFOS = '[mst] bepaalSbInfos';
|
|
172
|
-
const
|
|
249
|
+
const TRIGGER_SELECTIE_UPDATE = '[mst] TriggerSelectieUpdate';
|
|
250
|
+
const SET_SELECTIE_INFOS = '[mst] SetSelectieInfos';
|
|
173
251
|
const setEditable = createAction(SET_EDITABLE, (editable) => ({ editable }));
|
|
174
252
|
const SetRitSelectieIds = createAction(SET_RIT_SELECTIE_IDS, (ids) => ({ ids }));
|
|
175
253
|
const SetGeplandeActies = createAction(SET_GEPLANDE_ACTIES, (geplandeActiesMap) => ({ geplandeActiesMap }));
|
|
@@ -213,7 +291,8 @@ const navigeerBuitenRit = createAction(NAVIGEER_BUITEN_RIT, (randPuic) => ({ ran
|
|
|
213
291
|
const focusOpRitdeel = createAction(FOCUS_OP_RITDEEL, (ritdeel, paginationSize, iaVersieInfo) => ({ ritdeel, paginationSize, iaVersieInfo }));
|
|
214
292
|
const focusOpIds = createAction(FOCUS_OP_IDS, (puics) => ({ puics }));
|
|
215
293
|
const bepaalSbInfos = createAction(BEPAAL_SB_INFOS, (rit, ongeplandeActies, iaVersie, ritGewijzigdToegestaan, paginationSize) => ({ rit, ongeplandeActies, iaVersie, ritGewijzigdToegestaan, paginationSize }));
|
|
216
|
-
const
|
|
294
|
+
const svgUpdateFinished = createAction(TRIGGER_SELECTIE_UPDATE);
|
|
295
|
+
const setSelectieInfos = createAction(SET_SELECTIE_INFOS, (selectieInfos) => ({ selectieInfos }));
|
|
217
296
|
// do not export return value
|
|
218
297
|
const mstActions = union({
|
|
219
298
|
setEditable,
|
|
@@ -252,88 +331,10 @@ const mstActions = union({
|
|
|
252
331
|
BewegingInvoegen,
|
|
253
332
|
KeurAlleActiesGoed,
|
|
254
333
|
UpdateRit,
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
const SET_RIT_DELEN = '[mst] SetRitDelen';
|
|
259
|
-
const SET_RIT_DELEN_AFTER_UPDATE = '[mst] SetRitDelenAfterUpdate';
|
|
260
|
-
const UPDATE_RIT_DELEN = '[mst] UpdateRitDelen';
|
|
261
|
-
const TOGGLE_RITDEEL_ZICHTBAAR = '[mst] ToggleRitdeelZichtbaar';
|
|
262
|
-
const SET_RITDEEL_ZICHTBAAR = '[mst] ZetRitdeelZichtbaar';
|
|
263
|
-
const SET_ZICHTBAARHEID_ALLE_RITDELEN = '[mst] SetZichtbaarheidAlleRitdelen';
|
|
264
|
-
const TOGGLE_ZICHTBAARHEID_VOOR_BEWEGINGEN = '[mst] ToggleZichtbaarheidVoorBewegingen';
|
|
265
|
-
const SET_ALTERNATIEVE_RIT_DELEN = '[mst] SetAlternatieveRitDelen';
|
|
266
|
-
const RITDEEL_INVOEGEN = '[mst] RitdeelInvoegen';
|
|
267
|
-
const DELETE_RITDEEL = '[mst] DeleteRitdeel';
|
|
268
|
-
const DELETE_RITDEEL_ACTIE = '[mst] DeleteRitdeelActie';
|
|
269
|
-
const ADD_RITDEEL_ACTIE = '[mst] AddRitdeelActie';
|
|
270
|
-
const NAVIGEER = '[mst] Navigeer';
|
|
271
|
-
const NAVIGEER_VANAF = '[mst] NavigeerVanaf';
|
|
272
|
-
const setRitDelen = createAction(SET_RIT_DELEN, (ritDelen, paginationSize, iaversieinfo) => ({ ritDelen, paginationSize, iaversieinfo }));
|
|
273
|
-
const setRitdelenAfterUpdate = createAction(SET_RIT_DELEN_AFTER_UPDATE, (ritDelen) => ({ ritDelen }));
|
|
274
|
-
const navigeer = createAction(NAVIGEER, (stapSize, paginationSize, iaversieinfo) => ({ stapSize, paginationSize, iaversieinfo }));
|
|
275
|
-
const navigeerVanaf = createAction(NAVIGEER_VANAF, (paginationSize, iaversieinfo, ritdeel) => ({ paginationSize, iaversieinfo, ritdeel }));
|
|
276
|
-
const updateRitDelen = createAction(UPDATE_RIT_DELEN, (ritDelen) => ({ ritDelen }));
|
|
277
|
-
const toggleRitdeelZichtbaar = createAction(TOGGLE_RITDEEL_ZICHTBAAR, (ritDeel) => ({ ritDeel }));
|
|
278
|
-
const setRitdeelZichtbaar = createAction(SET_RITDEEL_ZICHTBAAR, (ritDeel, zichtbaar) => ({ ritDeel, zichtbaar }));
|
|
279
|
-
const deleteRitdeel = createAction(DELETE_RITDEEL, (ritDeel) => ({ ritDeel }));
|
|
280
|
-
const deleteRitdeelActie = createAction(DELETE_RITDEEL_ACTIE, (ritDeel, actie) => ({ ritDeel, actie }));
|
|
281
|
-
const addRitdeelActie = createAction(ADD_RITDEEL_ACTIE, (ritDeel, actie) => ({ ritDeel, actie }));
|
|
282
|
-
const setZichtbaarheidAlleRitdelen = createAction(SET_ZICHTBAARHEID_ALLE_RITDELEN, (zichtbaarheid) => ({ zichtbaarheid }));
|
|
283
|
-
const toggleZichtbaarheidVoorBewegingen = createAction(TOGGLE_ZICHTBAARHEID_VOOR_BEWEGINGEN, (bewegingIds) => ({ bewegingIds }));
|
|
284
|
-
const setAlternatieveRitDelen = createAction(SET_ALTERNATIEVE_RIT_DELEN, (alternatieveRitDeel) => ({ alternatieveRitDeel }));
|
|
285
|
-
const ritdeelInvoegen = createAction(RITDEEL_INVOEGEN, (nieuweRoute) => ({ nieuweRoute }));
|
|
286
|
-
// do not export return value
|
|
287
|
-
const ritdeelActions = union({
|
|
288
|
-
setRitDelen,
|
|
289
|
-
updateRitDelen,
|
|
290
|
-
setRitdelenAfterUpdate,
|
|
291
|
-
toggleRitdeelZichtbaar,
|
|
292
|
-
setRitdeelZichtbaar,
|
|
293
|
-
deleteRitdeel,
|
|
294
|
-
deleteRitdeelActie,
|
|
295
|
-
addRitdeelActie,
|
|
296
|
-
setZichtbaarheidAlleRitdelen,
|
|
297
|
-
toggleZichtbaarheidVoorBewegingen,
|
|
298
|
-
setAlternatieveRitDelen,
|
|
299
|
-
ritdeelInvoegen
|
|
334
|
+
svgUpdateFinished,
|
|
335
|
+
setSelectieInfos
|
|
300
336
|
});
|
|
301
337
|
|
|
302
|
-
class Utils {
|
|
303
|
-
static flatMap(xs, f) {
|
|
304
|
-
return xs.reduce((acc, x) => acc.concat(f(x)), []);
|
|
305
|
-
}
|
|
306
|
-
static getValidErorrMessage(err) {
|
|
307
|
-
let errorMsg = '';
|
|
308
|
-
if (err.msg) {
|
|
309
|
-
errorMsg += err.msg;
|
|
310
|
-
}
|
|
311
|
-
if (Array.isArray(err.body)) {
|
|
312
|
-
err.body.forEach(x => errorMsg += x);
|
|
313
|
-
}
|
|
314
|
-
else if (err.body) {
|
|
315
|
-
if (err.body instanceof ProgressEvent) {
|
|
316
|
-
errorMsg = 'Kon geen verbinding maken met de server';
|
|
317
|
-
}
|
|
318
|
-
else if (err.body.text) {
|
|
319
|
-
errorMsg += err.body.text;
|
|
320
|
-
}
|
|
321
|
-
else {
|
|
322
|
-
errorMsg += err.body;
|
|
323
|
-
}
|
|
324
|
-
}
|
|
325
|
-
if (err.message) {
|
|
326
|
-
errorMsg += err.message;
|
|
327
|
-
}
|
|
328
|
-
if (typeof err === 'string' || err instanceof String) {
|
|
329
|
-
errorMsg += err;
|
|
330
|
-
}
|
|
331
|
-
if (errorMsg !== '') {
|
|
332
|
-
return errorMsg;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
336
|
-
|
|
337
338
|
/**
|
|
338
339
|
* https://gist.github.com/jordanluyke/609a4fffb69d1ebafdadd313ee2ee804
|
|
339
340
|
*
|
|
@@ -397,7 +398,7 @@ class ArrayMultimap {
|
|
|
397
398
|
return Array.from(new Set(this._entries.map(entry => entry.key)));
|
|
398
399
|
}
|
|
399
400
|
values() {
|
|
400
|
-
return
|
|
401
|
+
return this._entries.reduce((acc, x) => acc.concat(x.value), []);
|
|
401
402
|
}
|
|
402
403
|
put(key, value) {
|
|
403
404
|
this._entries.push(new MultimapEntry(key, value));
|
|
@@ -503,6 +504,7 @@ class EditorService {
|
|
|
503
504
|
this.signaleringsBeeldManagerService = signaleringsBeeldManagerService;
|
|
504
505
|
this.initReadyPromise();
|
|
505
506
|
}
|
|
507
|
+
// Called from GWT only, can be removed when GWT is gone. any is used because it will be removed with GWT
|
|
506
508
|
setEditor(editor) {
|
|
507
509
|
this.editor = editor;
|
|
508
510
|
this.resolveReadyPromise();
|
|
@@ -510,6 +512,7 @@ class EditorService {
|
|
|
510
512
|
isReady() {
|
|
511
513
|
return this.promise;
|
|
512
514
|
}
|
|
515
|
+
// Called from GWT only, can be removed when GWT is gone
|
|
513
516
|
setSignaleringsBeeldManager(signaleringsBeeldManager) {
|
|
514
517
|
this.signaleringsBeeldManagerService.set(signaleringsBeeldManager);
|
|
515
518
|
}
|
|
@@ -555,7 +558,7 @@ class BewegingUtils {
|
|
|
555
558
|
const retval = [];
|
|
556
559
|
retval.length = ritDelen.length;
|
|
557
560
|
const origineleBewegingMap = this.bepaalOrigineleBewegingMap(origineleBewegingen);
|
|
558
|
-
let vorigeBeweging =
|
|
561
|
+
let vorigeBeweging = undefined;
|
|
559
562
|
for (let i = 0; i < ritDelen.length; i++) {
|
|
560
563
|
const ritdeel = ritDelen[i];
|
|
561
564
|
if (ritdeel.beweging) {
|
|
@@ -585,7 +588,7 @@ class BewegingUtils {
|
|
|
585
588
|
}
|
|
586
589
|
static bewegingenZijnGewijzigd(ritDelen, origineleBewegingen) {
|
|
587
590
|
const ritDelenArray = ritDelen
|
|
588
|
-
.filter(r => r.beweging)
|
|
591
|
+
.filter(r => r.beweging?.id)
|
|
589
592
|
.map(r => r.beweging.id)
|
|
590
593
|
.sort((a, b) => a - b);
|
|
591
594
|
const bewegingenIdArray = origineleBewegingen.map(b => b.id).sort((a, b) => a - b);
|
|
@@ -601,9 +604,9 @@ class BewegingUtils {
|
|
|
601
604
|
return stringToCheck.indexOf(match) !== -1;
|
|
602
605
|
}
|
|
603
606
|
static isGewijzigd(ritdeel, nieuwDwangNummer, origineleBewegingenMap) {
|
|
604
|
-
const dwangGewijzigd = ritdeel.beweging
|
|
607
|
+
const dwangGewijzigd = ritdeel.beweging?.dwangNummer !== nieuwDwangNummer;
|
|
605
608
|
let gewijzigd = false;
|
|
606
|
-
if (ritdeel.beweging
|
|
609
|
+
if (ritdeel.beweging?.wijzigStatus === this.NORMAAL) {
|
|
607
610
|
const origineleBewegingActies = origineleBewegingenMap.get(ritdeel.beweging.id);
|
|
608
611
|
const huidigeActies = this.createSortedActieIdList(ritdeel.acties);
|
|
609
612
|
gewijzigd = JSON.stringify(huidigeActies) !== JSON.stringify(origineleBewegingActies);
|
|
@@ -627,7 +630,7 @@ class BewegingUtils {
|
|
|
627
630
|
let naarSeinPplg;
|
|
628
631
|
let naarSpoor = newRitdeel.getNaarPrlSpoor();
|
|
629
632
|
if (eindSein.getTypeAlsString() === BewegingUtils.SEIN_TYPE_FICTIEF) {
|
|
630
|
-
if (newRitdeel.heeftVrijebaanInfo()) {
|
|
633
|
+
if (newRitdeel.heeftVrijebaanInfo() && newRitdeel.getVrijebaanRijweg()) {
|
|
631
634
|
const vbEindSein = newRitdeel.getVrijebaanRijweg().getEindSein();
|
|
632
635
|
naarSeinNaam = vbEindSein.getName();
|
|
633
636
|
naarSeinPplg = vbEindSein.getPPLG();
|
|
@@ -681,43 +684,23 @@ class ViewerControlService {
|
|
|
681
684
|
constructor(store, bewegingUtils) {
|
|
682
685
|
this.store = store;
|
|
683
686
|
this.bewegingUtils = bewegingUtils;
|
|
684
|
-
this.subscriptions = new Subscription();
|
|
685
687
|
this.valideRit$ = new BehaviorSubject(false);
|
|
686
688
|
this.printing$ = new BehaviorSubject(false);
|
|
687
689
|
this.sideNavOpen = false;
|
|
688
690
|
this.sideNavOpen$ = new BehaviorSubject(this.sideNavOpen);
|
|
689
|
-
this.
|
|
690
|
-
store.select('ritSelectieIds'),
|
|
691
|
-
store.select('actieOpRitSelectieIds'),
|
|
692
|
-
store.select('ongeplandeActieSelectieIds'),
|
|
693
|
-
store.select('gebrokenRitSelectieIds'),
|
|
694
|
-
store.select('alternatievenSelectieIds'),
|
|
695
|
-
store.select('beginSeinSelectieIds'),
|
|
696
|
-
store.select('eindSeinSelectieIds')
|
|
697
|
-
]).subscribe(([rit, actieOpRitSelectieIds, ongeplandeActieSelectieIds, gebrokenrit, alternatieven, begin, eind]) => {
|
|
698
|
-
const selectie = [];
|
|
699
|
-
selectie.push(new SelectieInfo(rit, 'rit'));
|
|
700
|
-
selectie.push(new SelectieInfo(actieOpRitSelectieIds, 'actieoprit'));
|
|
701
|
-
selectie.push(new SelectieInfo(ongeplandeActieSelectieIds, 'ongeplandeActie'));
|
|
702
|
-
selectie.push(new SelectieInfo(gebrokenrit, 'gebrokenrit'));
|
|
703
|
-
selectie.push(new SelectieInfo(alternatieven, 'alternatieveRoute'));
|
|
704
|
-
selectie.push(new SelectieInfo(begin, 'zigzagVan'));
|
|
705
|
-
selectie.push(new SelectieInfo(eind, 'zigzagNaar'));
|
|
706
|
-
this.selectieInfos = selectie;
|
|
707
|
-
}));
|
|
708
|
-
this.subscriptions.add(store.select('ritDelen').subscribe(ritdelen => this.ritdelen = ritdelen));
|
|
691
|
+
this.origineelTreinPad = {};
|
|
709
692
|
}
|
|
710
693
|
toggleSideNavVisible() {
|
|
711
694
|
this.sideNavOpen = !this.sideNavOpen;
|
|
712
695
|
this.sideNavOpen$.next(this.sideNavOpen);
|
|
713
696
|
}
|
|
714
697
|
keurAlleActiesGoed(ongeplandeActies) {
|
|
715
|
-
|
|
698
|
+
this.store.select('ritDelen').pipe(take(1), filter(ritdelen => !!ritdelen), tap(ritdelen => {
|
|
716
699
|
this.store.dispatch(ShowProgress());
|
|
717
|
-
const bewegingen = this.bewegingUtils.extractBewegingenUitRitdelen(
|
|
718
|
-
const alleActies = this.verzamelAlleActies(
|
|
700
|
+
const bewegingen = this.bewegingUtils.extractBewegingenUitRitdelen(ritdelen, this.origineelTreinPad.bewegingen);
|
|
701
|
+
const alleActies = this.verzamelAlleActies(ritdelen, ongeplandeActies);
|
|
719
702
|
this.store.dispatch(KeurAlleActiesGoed(this.getBewegingenZonderActies(bewegingen), alleActies));
|
|
720
|
-
}
|
|
703
|
+
})).subscribe();
|
|
721
704
|
}
|
|
722
705
|
setValideRit(valideRit) {
|
|
723
706
|
this.valideRit$.next(valideRit);
|
|
@@ -783,10 +766,10 @@ class DebugService {
|
|
|
783
766
|
setDebugFlag(debug) {
|
|
784
767
|
this.store.dispatch(SetDebug(debug));
|
|
785
768
|
if (debug) {
|
|
786
|
-
document.getElementById('svgContainer')
|
|
769
|
+
document.getElementById('svgContainer')?.addEventListener('mouseover', this.listener);
|
|
787
770
|
}
|
|
788
771
|
else {
|
|
789
|
-
document.getElementById('svgContainer')
|
|
772
|
+
document.getElementById('svgContainer')?.removeEventListener('mouseover', this.listener);
|
|
790
773
|
}
|
|
791
774
|
}
|
|
792
775
|
debugEventListener() {
|
|
@@ -832,26 +815,28 @@ class PrintBewegingService {
|
|
|
832
815
|
this.store = store;
|
|
833
816
|
this.viewerControlService = viewerControlService;
|
|
834
817
|
this.sbmService = sbmService;
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
818
|
+
}
|
|
819
|
+
printBeweging(bewegingId, paginationSize) {
|
|
820
|
+
return new Promise((resolve, reject) => {
|
|
821
|
+
this.store.select('ritDelen').pipe(take(1), tap(ritdelen => {
|
|
822
|
+
const gevondenRitdeel = ritdelen.filter(r => Number.parseInt(r.getBewegingId(), 10) === bewegingId);
|
|
823
|
+
// hide/show de knoppen
|
|
824
|
+
const printing = !!bewegingId && gevondenRitdeel.length === 1;
|
|
825
|
+
this.viewerControlService.setPrinting(printing);
|
|
826
|
+
if (!printing) {
|
|
827
|
+
reject(new Error('Geen beweging gevonden voor ' + bewegingId));
|
|
828
|
+
return;
|
|
829
|
+
}
|
|
830
|
+
const ritdeel = gevondenRitdeel[0];
|
|
831
|
+
if (ritdeel.isNietBeschikbaar()) {
|
|
832
|
+
this.store.dispatch(navigeerVanaf(paginationSize, ritdeel));
|
|
833
|
+
this.store.dispatch(ShowProgress());
|
|
834
|
+
setTimeout(() => this.focusOpBeweging(ritdeel, resolve), 1000);
|
|
835
|
+
}
|
|
836
|
+
else {
|
|
837
|
+
this.focusOpBeweging(ritdeel, resolve);
|
|
838
|
+
}
|
|
839
|
+
})).subscribe();
|
|
855
840
|
});
|
|
856
841
|
}
|
|
857
842
|
focusOpBeweging(ritdeel, resolve) {
|
|
@@ -886,8 +871,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
886
871
|
}], ctorParameters: () => [{ type: i2$1.Store }, { type: ViewerControlService }, { type: SignaleringsBeeldManagerService }] });
|
|
887
872
|
|
|
888
873
|
class RpeComponent {
|
|
874
|
+
constructor() {
|
|
875
|
+
this.baseurl = '';
|
|
876
|
+
this.path = '';
|
|
877
|
+
}
|
|
889
878
|
convertToScript() {
|
|
890
|
-
const element = this.script
|
|
879
|
+
const element = this.script?.nativeElement;
|
|
891
880
|
const script = document.createElement('script');
|
|
892
881
|
script.type = 'text/javascript';
|
|
893
882
|
if (this.baseurl && this.path) {
|
|
@@ -940,7 +929,7 @@ class KmRange {
|
|
|
940
929
|
if (result.length >= 1) {
|
|
941
930
|
return result[0];
|
|
942
931
|
}
|
|
943
|
-
return
|
|
932
|
+
return undefined;
|
|
944
933
|
}
|
|
945
934
|
heeftOverlap(kilometrering1, kilometrering2) {
|
|
946
935
|
const vanKilometrering = KmRange.getKilometrering(kilometrering1.getKmLint(), this.vanKilometreringen);
|
|
@@ -987,6 +976,41 @@ class MeldingBuilder {
|
|
|
987
976
|
}
|
|
988
977
|
}
|
|
989
978
|
|
|
979
|
+
class Utils {
|
|
980
|
+
static getValidErorrMessage(err) {
|
|
981
|
+
let errorMsg = '';
|
|
982
|
+
if (err.msg) {
|
|
983
|
+
errorMsg += err.msg;
|
|
984
|
+
}
|
|
985
|
+
if (Array.isArray(err.body)) {
|
|
986
|
+
err.body.forEach((x) => errorMsg += x);
|
|
987
|
+
}
|
|
988
|
+
else if (err.body) {
|
|
989
|
+
if (err.body instanceof ProgressEvent) {
|
|
990
|
+
errorMsg = 'Kon geen verbinding maken met de server';
|
|
991
|
+
}
|
|
992
|
+
else if (err.body.text) {
|
|
993
|
+
errorMsg += err.body.text;
|
|
994
|
+
}
|
|
995
|
+
else {
|
|
996
|
+
errorMsg += err.body;
|
|
997
|
+
}
|
|
998
|
+
}
|
|
999
|
+
if (err.message) {
|
|
1000
|
+
errorMsg += err.message;
|
|
1001
|
+
}
|
|
1002
|
+
if (typeof err === 'string' || err instanceof String) {
|
|
1003
|
+
errorMsg += err;
|
|
1004
|
+
}
|
|
1005
|
+
if (errorMsg !== '') {
|
|
1006
|
+
return errorMsg;
|
|
1007
|
+
}
|
|
1008
|
+
else {
|
|
1009
|
+
return 'Er is een onbekende fout opgetreden';
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
}
|
|
1013
|
+
|
|
990
1014
|
class MessageBuilder {
|
|
991
1015
|
static rwpDataNietGevonden(err) {
|
|
992
1016
|
return new Message(Severity.ERROR, 'Error bij ophalen van rijwegplan data: ' + err);
|
|
@@ -2126,16 +2150,25 @@ class SbControllerService {
|
|
|
2126
2150
|
}
|
|
2127
2151
|
return httpParams;
|
|
2128
2152
|
}
|
|
2129
|
-
getSignaleringsbeelden(
|
|
2130
|
-
if (
|
|
2131
|
-
throw new Error('Required parameter
|
|
2153
|
+
getSignaleringsbeelden(iaVersie, pplg, observe = 'body', reportProgress = false, options) {
|
|
2154
|
+
if (iaVersie === null || iaVersie === undefined) {
|
|
2155
|
+
throw new Error('Required parameter iaVersie was null or undefined when calling getSignaleringsbeelden.');
|
|
2156
|
+
}
|
|
2157
|
+
if (pplg === null || pplg === undefined) {
|
|
2158
|
+
throw new Error('Required parameter pplg was null or undefined when calling getSignaleringsbeelden.');
|
|
2159
|
+
}
|
|
2160
|
+
let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
|
|
2161
|
+
if (pplg) {
|
|
2162
|
+
pplg.forEach((element) => {
|
|
2163
|
+
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, element, 'pplg');
|
|
2164
|
+
});
|
|
2132
2165
|
}
|
|
2133
2166
|
let localVarHeaders = this.defaultHeaders;
|
|
2134
2167
|
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
2135
2168
|
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
2136
2169
|
// to determine the Accept header
|
|
2137
2170
|
const httpHeaderAccepts = [
|
|
2138
|
-
'
|
|
2171
|
+
'application/json'
|
|
2139
2172
|
];
|
|
2140
2173
|
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
2141
2174
|
}
|
|
@@ -2150,14 +2183,6 @@ class SbControllerService {
|
|
|
2150
2183
|
if (localVarTransferCache === undefined) {
|
|
2151
2184
|
localVarTransferCache = true;
|
|
2152
2185
|
}
|
|
2153
|
-
// to determine the Content-Type header
|
|
2154
|
-
const consumes = [
|
|
2155
|
-
'application/json'
|
|
2156
|
-
];
|
|
2157
|
-
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
2158
|
-
if (httpContentTypeSelected !== undefined) {
|
|
2159
|
-
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
2160
|
-
}
|
|
2161
2186
|
let responseType_ = 'json';
|
|
2162
2187
|
if (localVarHttpHeaderAcceptSelected) {
|
|
2163
2188
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
@@ -2170,10 +2195,10 @@ class SbControllerService {
|
|
|
2170
2195
|
responseType_ = 'blob';
|
|
2171
2196
|
}
|
|
2172
2197
|
}
|
|
2173
|
-
let localVarPath = `/rest/
|
|
2174
|
-
return this.httpClient.request('
|
|
2198
|
+
let localVarPath = `/rest/${this.configuration.encodeParam({ name: "iaVersie", value: iaVersie, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/SignaleringsbeeldAndPplgs`;
|
|
2199
|
+
return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, {
|
|
2175
2200
|
context: localVarHttpContext,
|
|
2176
|
-
|
|
2201
|
+
params: localVarQueryParameters,
|
|
2177
2202
|
responseType: responseType_,
|
|
2178
2203
|
withCredentials: this.configuration.withCredentials,
|
|
2179
2204
|
headers: localVarHeaders,
|
|
@@ -2249,7 +2274,177 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
2249
2274
|
type: Optional
|
|
2250
2275
|
}] }] });
|
|
2251
2276
|
|
|
2252
|
-
|
|
2277
|
+
/**
|
|
2278
|
+
* MST
|
|
2279
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2280
|
+
*
|
|
2281
|
+
* The version of the OpenAPI document: 1
|
|
2282
|
+
*
|
|
2283
|
+
*
|
|
2284
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2285
|
+
* https://openapi-generator.tech
|
|
2286
|
+
* Do not edit the class manually.
|
|
2287
|
+
*/
|
|
2288
|
+
/* tslint:disable:no-unused-variable member-ordering */
|
|
2289
|
+
class SvgControllerService {
|
|
2290
|
+
constructor(httpClient, basePath, configuration) {
|
|
2291
|
+
this.httpClient = httpClient;
|
|
2292
|
+
this.basePath = 'http://localhost:8080/mst';
|
|
2293
|
+
this.defaultHeaders = new HttpHeaders();
|
|
2294
|
+
this.configuration = new Configuration();
|
|
2295
|
+
if (configuration) {
|
|
2296
|
+
this.configuration = configuration;
|
|
2297
|
+
}
|
|
2298
|
+
if (typeof this.configuration.basePath !== 'string') {
|
|
2299
|
+
if (Array.isArray(basePath) && basePath.length > 0) {
|
|
2300
|
+
basePath = basePath[0];
|
|
2301
|
+
}
|
|
2302
|
+
if (typeof basePath !== 'string') {
|
|
2303
|
+
basePath = this.basePath;
|
|
2304
|
+
}
|
|
2305
|
+
this.configuration.basePath = basePath;
|
|
2306
|
+
}
|
|
2307
|
+
this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
|
|
2308
|
+
}
|
|
2309
|
+
// @ts-ignore
|
|
2310
|
+
addToHttpParams(httpParams, value, key) {
|
|
2311
|
+
if (typeof value === "object" && value instanceof Date === false) {
|
|
2312
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value);
|
|
2313
|
+
}
|
|
2314
|
+
else {
|
|
2315
|
+
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
|
|
2316
|
+
}
|
|
2317
|
+
return httpParams;
|
|
2318
|
+
}
|
|
2319
|
+
addToHttpParamsRecursive(httpParams, value, key) {
|
|
2320
|
+
if (value == null) {
|
|
2321
|
+
return httpParams;
|
|
2322
|
+
}
|
|
2323
|
+
if (typeof value === "object") {
|
|
2324
|
+
if (Array.isArray(value)) {
|
|
2325
|
+
value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
|
|
2326
|
+
}
|
|
2327
|
+
else if (value instanceof Date) {
|
|
2328
|
+
if (key != null) {
|
|
2329
|
+
httpParams = httpParams.append(key, value.toISOString().substring(0, 10));
|
|
2330
|
+
}
|
|
2331
|
+
else {
|
|
2332
|
+
throw Error("key may not be null if value is Date");
|
|
2333
|
+
}
|
|
2334
|
+
}
|
|
2335
|
+
else {
|
|
2336
|
+
Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k));
|
|
2337
|
+
}
|
|
2338
|
+
}
|
|
2339
|
+
else if (key != null) {
|
|
2340
|
+
httpParams = httpParams.append(key, value);
|
|
2341
|
+
}
|
|
2342
|
+
else {
|
|
2343
|
+
throw Error("key may not be null if value is not object or array");
|
|
2344
|
+
}
|
|
2345
|
+
return httpParams;
|
|
2346
|
+
}
|
|
2347
|
+
getSvgInfo(iaVersie, signaleringsbeeldDto, observe = 'body', reportProgress = false, options) {
|
|
2348
|
+
if (iaVersie === null || iaVersie === undefined) {
|
|
2349
|
+
throw new Error('Required parameter iaVersie was null or undefined when calling getSvgInfo.');
|
|
2350
|
+
}
|
|
2351
|
+
if (signaleringsbeeldDto === null || signaleringsbeeldDto === undefined) {
|
|
2352
|
+
throw new Error('Required parameter signaleringsbeeldDto was null or undefined when calling getSvgInfo.');
|
|
2353
|
+
}
|
|
2354
|
+
let localVarHeaders = this.defaultHeaders;
|
|
2355
|
+
let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept;
|
|
2356
|
+
if (localVarHttpHeaderAcceptSelected === undefined) {
|
|
2357
|
+
// to determine the Accept header
|
|
2358
|
+
const httpHeaderAccepts = [
|
|
2359
|
+
'application/json'
|
|
2360
|
+
];
|
|
2361
|
+
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
2362
|
+
}
|
|
2363
|
+
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
2364
|
+
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
2365
|
+
}
|
|
2366
|
+
let localVarHttpContext = options && options.context;
|
|
2367
|
+
if (localVarHttpContext === undefined) {
|
|
2368
|
+
localVarHttpContext = new HttpContext();
|
|
2369
|
+
}
|
|
2370
|
+
let localVarTransferCache = options && options.transferCache;
|
|
2371
|
+
if (localVarTransferCache === undefined) {
|
|
2372
|
+
localVarTransferCache = true;
|
|
2373
|
+
}
|
|
2374
|
+
// to determine the Content-Type header
|
|
2375
|
+
const consumes = [
|
|
2376
|
+
'application/json'
|
|
2377
|
+
];
|
|
2378
|
+
const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
|
|
2379
|
+
if (httpContentTypeSelected !== undefined) {
|
|
2380
|
+
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
2381
|
+
}
|
|
2382
|
+
let responseType_ = 'json';
|
|
2383
|
+
if (localVarHttpHeaderAcceptSelected) {
|
|
2384
|
+
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
2385
|
+
responseType_ = 'text';
|
|
2386
|
+
}
|
|
2387
|
+
else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
2388
|
+
responseType_ = 'json';
|
|
2389
|
+
}
|
|
2390
|
+
else {
|
|
2391
|
+
responseType_ = 'blob';
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
let localVarPath = `/rest/${this.configuration.encodeParam({ name: "iaVersie", value: iaVersie, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/svgs`;
|
|
2395
|
+
return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, {
|
|
2396
|
+
context: localVarHttpContext,
|
|
2397
|
+
body: signaleringsbeeldDto,
|
|
2398
|
+
responseType: responseType_,
|
|
2399
|
+
withCredentials: this.configuration.withCredentials,
|
|
2400
|
+
headers: localVarHeaders,
|
|
2401
|
+
observe: observe,
|
|
2402
|
+
transferCache: localVarTransferCache,
|
|
2403
|
+
reportProgress: reportProgress
|
|
2404
|
+
});
|
|
2405
|
+
}
|
|
2406
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SvgControllerService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2407
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SvgControllerService, providedIn: 'root' }); }
|
|
2408
|
+
}
|
|
2409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SvgControllerService, decorators: [{
|
|
2410
|
+
type: Injectable,
|
|
2411
|
+
args: [{
|
|
2412
|
+
providedIn: 'root'
|
|
2413
|
+
}]
|
|
2414
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
|
|
2415
|
+
type: Optional
|
|
2416
|
+
}, {
|
|
2417
|
+
type: Inject,
|
|
2418
|
+
args: [BASE_PATH]
|
|
2419
|
+
}] }, { type: Configuration, decorators: [{
|
|
2420
|
+
type: Optional
|
|
2421
|
+
}] }] });
|
|
2422
|
+
|
|
2423
|
+
const APIS = [AppConfigControllerService, BewegingControllerService, Class0BuildPropertiesService, ConnectorControllerService, LogControllerService, P21ControllerService, SbControllerService, SvgControllerService];
|
|
2424
|
+
|
|
2425
|
+
/**
|
|
2426
|
+
* MST
|
|
2427
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2428
|
+
*
|
|
2429
|
+
* The version of the OpenAPI document: 1
|
|
2430
|
+
*
|
|
2431
|
+
*
|
|
2432
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2433
|
+
* https://openapi-generator.tech
|
|
2434
|
+
* Do not edit the class manually.
|
|
2435
|
+
*/
|
|
2436
|
+
|
|
2437
|
+
/**
|
|
2438
|
+
* MST
|
|
2439
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
2440
|
+
*
|
|
2441
|
+
* The version of the OpenAPI document: 1
|
|
2442
|
+
*
|
|
2443
|
+
*
|
|
2444
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
2445
|
+
* https://openapi-generator.tech
|
|
2446
|
+
* Do not edit the class manually.
|
|
2447
|
+
*/
|
|
2253
2448
|
|
|
2254
2449
|
/**
|
|
2255
2450
|
* MST
|
|
@@ -2275,6 +2470,16 @@ const APIS = [AppConfigControllerService, BewegingControllerService, Class0Build
|
|
|
2275
2470
|
* Do not edit the class manually.
|
|
2276
2471
|
*/
|
|
2277
2472
|
|
|
2473
|
+
var Sein;
|
|
2474
|
+
(function (Sein) {
|
|
2475
|
+
Sein.DirectionEnum = {
|
|
2476
|
+
LeftToRight: 'LEFT_TO_RIGHT',
|
|
2477
|
+
RightToLeft: 'RIGHT_TO_LEFT',
|
|
2478
|
+
TopToBottom: 'TOP_TO_BOTTOM',
|
|
2479
|
+
BottomToTop: 'BOTTOM_TO_TOP'
|
|
2480
|
+
};
|
|
2481
|
+
})(Sein || (Sein = {}));
|
|
2482
|
+
|
|
2278
2483
|
/**
|
|
2279
2484
|
* MST
|
|
2280
2485
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
@@ -2372,38 +2577,35 @@ class LoggingHelper {
|
|
|
2372
2577
|
this.store = store;
|
|
2373
2578
|
}
|
|
2374
2579
|
maakLogDTO(melding, actie) {
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2580
|
+
return combineLatest([
|
|
2581
|
+
this.store.select('algemeneRitInfoDto'),
|
|
2582
|
+
this.store.select('iaVersie')
|
|
2583
|
+
]).pipe(take(1), map(([algemeneRitInfoDto, iaVersie]) => {
|
|
2584
|
+
let actieDto = null;
|
|
2585
|
+
if (actie) {
|
|
2586
|
+
actieDto = {
|
|
2587
|
+
pplgNaam: actie.pplgNaam,
|
|
2588
|
+
ritActieTypeOmschrijving: actie.ritActieTypeOmschrijving,
|
|
2589
|
+
ritActieStatus: actie.ritActieStatus,
|
|
2590
|
+
bewegingId: actie.bewegingId,
|
|
2591
|
+
wisselType: actie.wisselType,
|
|
2592
|
+
wisselNaam: actie.wisselNaam,
|
|
2593
|
+
wisselKantCode: actie.wisselKantCode,
|
|
2594
|
+
vanKilometerlint: actie.vanKilometerlint,
|
|
2595
|
+
vanKilometrering: actie.vanKilometrering,
|
|
2596
|
+
totKilometerlint: actie.totKilometerlint,
|
|
2597
|
+
totKilometrering: actie.totKilometrering
|
|
2598
|
+
};
|
|
2599
|
+
}
|
|
2600
|
+
return {
|
|
2601
|
+
iaVersie: iaVersie.versie,
|
|
2602
|
+
meldingLevel: melding.meldingLevel,
|
|
2603
|
+
meldingMessage: melding.meldingMessage,
|
|
2604
|
+
actieDto,
|
|
2605
|
+
algemeneRitInfoDto,
|
|
2606
|
+
sbinfoDtos: this.getSbInfoDtos()
|
|
2397
2607
|
};
|
|
2398
|
-
}
|
|
2399
|
-
return {
|
|
2400
|
-
iaVersie,
|
|
2401
|
-
meldingLevel: melding.meldingLevel,
|
|
2402
|
-
meldingMessage: melding.meldingMessage,
|
|
2403
|
-
actieDto,
|
|
2404
|
-
algemeneRitInfoDto,
|
|
2405
|
-
sbinfoDtos: this.getSbInfoDtos()
|
|
2406
|
-
};
|
|
2608
|
+
}));
|
|
2407
2609
|
}
|
|
2408
2610
|
getSbInfoDtos() {
|
|
2409
2611
|
const sbInfoDtos = [];
|
|
@@ -2515,6 +2717,7 @@ class ActieHelper {
|
|
|
2515
2717
|
this.messagesService = messagesService;
|
|
2516
2718
|
this.store = store;
|
|
2517
2719
|
this.loggingHelper = loggingHelper;
|
|
2720
|
+
this.debug = false;
|
|
2518
2721
|
this.store.select('debug').subscribe(debug => this.debug = debug);
|
|
2519
2722
|
}
|
|
2520
2723
|
static getActieTopoElements(ritDeel, sbmService) {
|
|
@@ -2548,10 +2751,10 @@ class ActieHelper {
|
|
|
2548
2751
|
}
|
|
2549
2752
|
}
|
|
2550
2753
|
static actieComparator(actie1, actie2) {
|
|
2551
|
-
if (actie1.vanKilometrering !== actie2.vanKilometrering) {
|
|
2754
|
+
if (actie1.vanKilometrering && actie2.vanKilometrering && actie1.vanKilometrering !== actie2.vanKilometrering) {
|
|
2552
2755
|
return actie1.vanKilometrering > actie2.vanKilometrering ? 1 : -1;
|
|
2553
2756
|
}
|
|
2554
|
-
if (actie1.ritActieTypeOmschrijving !== actie2.ritActieTypeOmschrijving) {
|
|
2757
|
+
if (actie1.ritActieTypeOmschrijving && actie2.ritActieTypeOmschrijving && actie1.ritActieTypeOmschrijving !== actie2.ritActieTypeOmschrijving) {
|
|
2555
2758
|
return actie1.ritActieTypeOmschrijving > actie2.ritActieTypeOmschrijving ? 1 : -1;
|
|
2556
2759
|
}
|
|
2557
2760
|
if (actie1.wisselNaam !== actie2.wisselNaam) {
|
|
@@ -2591,9 +2794,9 @@ class ActieHelper {
|
|
|
2591
2794
|
// make sure the elems are sorted in ascending order
|
|
2592
2795
|
static sorteerTopoElementen(topoElems) {
|
|
2593
2796
|
const topoElementen = topoElems.slice();
|
|
2594
|
-
let lint =
|
|
2595
|
-
let first
|
|
2596
|
-
let second
|
|
2797
|
+
let lint = undefined;
|
|
2798
|
+
let first;
|
|
2799
|
+
let second;
|
|
2597
2800
|
for (const topoElement of topoElementen) {
|
|
2598
2801
|
let kilometreringen = null;
|
|
2599
2802
|
const kms = JsJavaUtil.listToArray(topoElement.getKilometreringen());
|
|
@@ -2625,11 +2828,11 @@ class ActieHelper {
|
|
|
2625
2828
|
if (!totKilometreringen && vanKilometreringen) {
|
|
2626
2829
|
totKilometreringen = [new MstKilometrering(vanKilometreringen[0].getKmLint(), 100000)];
|
|
2627
2830
|
}
|
|
2628
|
-
if (vanKilometreringen[0] > totKilometreringen[0]) {
|
|
2831
|
+
if (vanKilometreringen && totKilometreringen && vanKilometreringen[0] > totKilometreringen[0]) {
|
|
2629
2832
|
kmRanges.push(KmRange.rangeVoorStrekObject(e, this.addKm(vanKilometreringen, -1), this.addKm(totKilometreringen, 1)));
|
|
2630
2833
|
}
|
|
2631
2834
|
else {
|
|
2632
|
-
kmRanges.push(KmRange.rangeVoorStrekObject(e, this.addKm(vanKilometreringen, 1), this.addKm(totKilometreringen, -1)));
|
|
2835
|
+
kmRanges.push(KmRange.rangeVoorStrekObject(e, this.addKm(vanKilometreringen ?? [], 1), this.addKm(totKilometreringen ?? [], -1)));
|
|
2633
2836
|
}
|
|
2634
2837
|
});
|
|
2635
2838
|
}
|
|
@@ -2720,21 +2923,23 @@ class ActieHelper {
|
|
|
2720
2923
|
else {
|
|
2721
2924
|
const puics = [];
|
|
2722
2925
|
kmRanges.forEach(kmRange => {
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2926
|
+
if (actie.vanKilometrering && actie.vanKilometerlint && actie.totKilometrering && actie.totKilometerlint) {
|
|
2927
|
+
let vanKilometrering = new MstKilometrering(actie.vanKilometerlint, actie.vanKilometrering);
|
|
2928
|
+
let totKilometrering = new MstKilometrering(actie.totKilometerlint, actie.totKilometrering);
|
|
2929
|
+
if (actie.vanKilometrering > actie.totKilometrering) {
|
|
2930
|
+
const temp = { van: vanKilometrering, tot: totKilometrering };
|
|
2931
|
+
vanKilometrering = temp.tot;
|
|
2932
|
+
totKilometrering = temp.van;
|
|
2933
|
+
}
|
|
2934
|
+
if (kmRange.heeftOverlap(vanKilometrering, totKilometrering)) {
|
|
2935
|
+
puics.push(kmRange.topologyElement.getPuic());
|
|
2936
|
+
}
|
|
2732
2937
|
}
|
|
2733
2938
|
});
|
|
2734
2939
|
if (puics.length === 0) {
|
|
2735
2940
|
actieZonderElementen.push(actie.id);
|
|
2736
2941
|
const melding = MeldingBuilder.actieHighlightError(actieZonderElementen);
|
|
2737
|
-
|
|
2942
|
+
this.loggingHelper.maakLogDTO(melding, actie).pipe(tap(dto => logMeldingDTOs.push(dto))).subscribe();
|
|
2738
2943
|
}
|
|
2739
2944
|
retval.putAll(actie, puics);
|
|
2740
2945
|
}
|
|
@@ -2750,7 +2955,7 @@ class ActieHelper {
|
|
|
2750
2955
|
verwerkTopoElementen(topoElementen) {
|
|
2751
2956
|
const kmRanges = [];
|
|
2752
2957
|
let topoElementenZonderKms = [];
|
|
2753
|
-
let laatstePuntKms =
|
|
2958
|
+
let laatstePuntKms = undefined;
|
|
2754
2959
|
topoElementen.forEach(elem => {
|
|
2755
2960
|
const kms = JsJavaUtil.listToArray(elem.getKilometreringen());
|
|
2756
2961
|
if (kms.length > 0) {
|
|
@@ -2764,7 +2969,7 @@ class ActieHelper {
|
|
|
2764
2969
|
}
|
|
2765
2970
|
});
|
|
2766
2971
|
if (topoElementenZonderKms.length > 0 && laatstePuntKms) {
|
|
2767
|
-
ActieHelper.corrigeerTopoElementenZonderKms(topoElementenZonderKms, laatstePuntKms,
|
|
2972
|
+
ActieHelper.corrigeerTopoElementenZonderKms(topoElementenZonderKms, laatstePuntKms, undefined, kmRanges);
|
|
2768
2973
|
}
|
|
2769
2974
|
return kmRanges;
|
|
2770
2975
|
}
|
|
@@ -2827,14 +3032,14 @@ class ActieHelper {
|
|
|
2827
3032
|
if (ActieHelper.isKantCodeLinks(kantcode)) {
|
|
2828
3033
|
return wissel.getLeft();
|
|
2829
3034
|
}
|
|
2830
|
-
return
|
|
3035
|
+
return undefined;
|
|
2831
3036
|
}
|
|
2832
3037
|
bepaalPuicVoorWisselSlijpenActie(actie) {
|
|
2833
3038
|
const storingsSymboolPuic = this.sbmService.getSBWissel(actie.wisselNaam, actie.pplgNaam)?.getStoringSymboolPuic();
|
|
2834
3039
|
if (!storingsSymboolPuic && this.debug) {
|
|
2835
3040
|
const melding = MeldingBuilder.actieHighlightError([actie.id]);
|
|
2836
3041
|
this.messagesService.showMessage(MessageBuilder.actieHighlightError([actie.id]));
|
|
2837
|
-
this.
|
|
3042
|
+
this.loggingHelper.maakLogDTO(melding, actie).pipe(tap(logDto => this.mstLogResource.logMessages([logDto]))).subscribe();
|
|
2838
3043
|
}
|
|
2839
3044
|
return storingsSymboolPuic ? [storingsSymboolPuic] : [];
|
|
2840
3045
|
}
|
|
@@ -2849,10 +3054,16 @@ class RitdelenLijstComponent {
|
|
|
2849
3054
|
constructor(store, sbmService) {
|
|
2850
3055
|
this.store = store;
|
|
2851
3056
|
this.sbmService = sbmService;
|
|
3057
|
+
this.nietGeplandeActies = [];
|
|
2852
3058
|
this.focusEmitter = new EventEmitter();
|
|
2853
3059
|
this.keurAlleActiesGoed = new EventEmitter();
|
|
3060
|
+
this.ritdeelViewModels = [];
|
|
2854
3061
|
this.selectedRitdeelActies = [];
|
|
2855
3062
|
this.selectedRitdeelOngeplandeActies = [];
|
|
3063
|
+
this.disableActieKnoppenVanRitdeel = true;
|
|
3064
|
+
this.editable = false;
|
|
3065
|
+
this.ongeplandeActiesMap = new ArrayMultimap();
|
|
3066
|
+
this.geplandeActies = new ArrayMultimap();
|
|
2856
3067
|
this.NG_ACTIE_PREFIX = '* ';
|
|
2857
3068
|
this.subscriptions = [];
|
|
2858
3069
|
this.subscriptions.push(store.select('ritDelen').subscribe((ritdelen) => {
|
|
@@ -2863,9 +3074,6 @@ class RitdelenLijstComponent {
|
|
|
2863
3074
|
this.subscriptions.push(store.select('ongeplandeActies').subscribe(acties => this.ongeplandeActiesMap = acties));
|
|
2864
3075
|
this.subscriptions.push(store.select('geplandeActies').subscribe(acties => this.geplandeActies = acties));
|
|
2865
3076
|
this.subscriptions.push(store.select('editable').subscribe(editable => this.editable = editable));
|
|
2866
|
-
// listen to changes from svg-viewer-component, saving ritdeel in store isn't cool because of all the gwt in it. This is
|
|
2867
|
-
// just to make changes within the angular lifecycle.
|
|
2868
|
-
this.subscriptions.push(store.select('selectedRitdeelId').pipe(filter(id => !id)).subscribe(this.deselectRitdeel));
|
|
2869
3077
|
this.subscriptions.push(combineLatest([
|
|
2870
3078
|
this.store.select('ritDelen'),
|
|
2871
3079
|
this.store.select('ongeplandeActies')
|
|
@@ -2902,12 +3110,14 @@ class RitdelenLijstComponent {
|
|
|
2902
3110
|
this.store.dispatch(deleteRitdeel(ritdeel));
|
|
2903
3111
|
}
|
|
2904
3112
|
deleteActiesUitRit() {
|
|
2905
|
-
this.selectedRitdeel
|
|
3113
|
+
this.selectedRitdeel?.acties.slice().forEach(actie => {
|
|
2906
3114
|
this.deleteActieUitRit(actie);
|
|
2907
3115
|
});
|
|
2908
3116
|
}
|
|
2909
3117
|
deleteActieUitRit(actie) {
|
|
2910
|
-
|
|
3118
|
+
if (!this.selectedRitdeel)
|
|
3119
|
+
return;
|
|
3120
|
+
const acties = this.selectedRitdeel.acties ?? [];
|
|
2911
3121
|
const idx = acties.indexOf(actie);
|
|
2912
3122
|
if (idx >= 0) {
|
|
2913
3123
|
this.verhuisActieNaarOngepland(actie);
|
|
@@ -2933,7 +3143,7 @@ class RitdelenLijstComponent {
|
|
|
2933
3143
|
}
|
|
2934
3144
|
voegActieToeAanRit(ongeplandeActie) {
|
|
2935
3145
|
const idx = this.selectedRitdeelOngeplandeActies.indexOf(ongeplandeActie);
|
|
2936
|
-
if (idx >= 0) {
|
|
3146
|
+
if (idx >= 0 && this.selectedRitdeel) {
|
|
2937
3147
|
this.store.dispatch(addRitdeelActie(this.selectedRitdeel, this.selectedRitdeelOngeplandeActies[idx].actie));
|
|
2938
3148
|
this.store.dispatch(AddGeplandeActie(ongeplandeActie.actie, ongeplandeActie.puics));
|
|
2939
3149
|
this.store.dispatch(DeleteOngeplandeActie(ongeplandeActie));
|
|
@@ -3035,13 +3245,13 @@ class RitdelenLijstComponent {
|
|
|
3035
3245
|
return `${prefix}${ActieHelper.getVSTActieOmschrijving(actie)}`;
|
|
3036
3246
|
}
|
|
3037
3247
|
bepaalPrefixVoorActieOmschrijving(actie) {
|
|
3038
|
-
const
|
|
3039
|
-
if (this.selectedRitdeel
|
|
3248
|
+
const noPrefix = '';
|
|
3249
|
+
if (this.selectedRitdeel?.acties.includes(actie)) {
|
|
3040
3250
|
// Afwijkende naam bij niet gevisualiseerde actie in rit
|
|
3041
3251
|
const puics = this.geplandeActies.get(actie);
|
|
3042
|
-
return puics.length > 0 ?
|
|
3252
|
+
return puics.length > 0 ? noPrefix : this.NG_ACTIE_PREFIX;
|
|
3043
3253
|
}
|
|
3044
|
-
return
|
|
3254
|
+
return noPrefix;
|
|
3045
3255
|
}
|
|
3046
3256
|
actieVanKmTekst(actie) {
|
|
3047
3257
|
if (ActieHelper.isWisselSlijpenActie(actie)) {
|
|
@@ -3062,6 +3272,7 @@ class RitdelenLijstComponent {
|
|
|
3062
3272
|
return ritdeel.getPplgString();
|
|
3063
3273
|
}
|
|
3064
3274
|
getKantCode(stand) {
|
|
3275
|
+
// @ts-ignore
|
|
3065
3276
|
if (stand === window['domein'].Stand.LINKS) {
|
|
3066
3277
|
return 'L';
|
|
3067
3278
|
}
|
|
@@ -3198,49 +3409,18 @@ class RitdeelViewModel {
|
|
|
3198
3409
|
}
|
|
3199
3410
|
}
|
|
3200
3411
|
|
|
3201
|
-
class CarouselControlsComponent {
|
|
3202
|
-
constructor(store) {
|
|
3203
|
-
this.store = store;
|
|
3204
|
-
this.paginationSize = 4;
|
|
3205
|
-
this.ritdelen$ = this.store.select('ritDelen').pipe(filter(r => r?.length > 0));
|
|
3206
|
-
this.kanLinks$ = this.ritdelen$.pipe(map(r => this.kanLinksNavigeren(r)));
|
|
3207
|
-
this.kanRechts$ = this.ritdelen$.pipe(map(r => this.kanRechtsNavigeren(r)));
|
|
3208
|
-
}
|
|
3209
|
-
kanLinksNavigeren(ritDelen) {
|
|
3210
|
-
return ritDelen.length > this.paginationSize && !ritDelen[0].isBinnenWindow();
|
|
3211
|
-
}
|
|
3212
|
-
kanRechtsNavigeren(ritDelen) {
|
|
3213
|
-
return ritDelen.length > this.paginationSize && !ritDelen[ritDelen.length - 1].isBinnenWindow();
|
|
3214
|
-
}
|
|
3215
|
-
navigeerNaarLinks(event) {
|
|
3216
|
-
this.store.dispatch(navigeer(event?.ctrlKey ? -1 : -(this.paginationSize - 1), this.paginationSize, this.iaversieinfo));
|
|
3217
|
-
}
|
|
3218
|
-
navigeerNaarRechts(event) {
|
|
3219
|
-
this.store.dispatch(navigeer(event?.ctrlKey ? 1 : this.paginationSize - 1, this.paginationSize, this.iaversieinfo));
|
|
3220
|
-
}
|
|
3221
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CarouselControlsComponent, deps: [{ token: i2$1.Store }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3222
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: CarouselControlsComponent, selector: "carousel-controls", inputs: { paginationSize: "paginationSize", iaversieinfo: "iaversieinfo", sideNavOpen: "sideNavOpen" }, ngImport: i0, template: "<div *ngIf=\"ritdelen$ | async\">\n <a class=\"loxia-carousel-control-prev\" [ngClass]=\"(sideNavOpen)?'carousel-sidebar-open':'carousel-sidebar'\" role=\"button\"\n data-slide=\"prev\" (click)=\"navigeerNaarLinks($event)\" [hidden]=\"(kanLinks$ | async) === false\">\n <span id=\"previous-page\" class=\"loxia-carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"loxia-sr-only\">Previous</span>\n</a>\n <a class=\"loxia-carousel-control-next\" style=\"width: 2%;\" role=\"button\" data-slide=\"next\" (click)=\"navigeerNaarRechts($event)\"\n [hidden]=\"(kanRechts$ | async) === false\">\n <span id=\"next-page\" class=\"loxia-carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"loxia-sr-only\">Next</span>\n </a>\n</div>\n", styles: [".loxia-carousel-control-prev{left:0}.loxia-carousel-control-next{right:0}.loxia-carousel-control-next-icon,.loxia-carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.loxia-carousel-control-prev-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e\")}.loxia-carousel-control-next-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e\")}.loxia-carousel-control-next:focus,.loxia-carousel-control-next:hover,.loxia-carousel-control-prev:focus,.loxia-carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.loxia-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loxia-carousel-control-next,.loxia-carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}.carousel-sidebar{width:2%}.carousel-sidebar-open{width:2%;transition:all .3s;left:470px}[hidden]{display:none!important}\n"], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
3223
|
-
}
|
|
3224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CarouselControlsComponent, decorators: [{
|
|
3225
|
-
type: Component,
|
|
3226
|
-
args: [{ selector: 'carousel-controls', template: "<div *ngIf=\"ritdelen$ | async\">\n <a class=\"loxia-carousel-control-prev\" [ngClass]=\"(sideNavOpen)?'carousel-sidebar-open':'carousel-sidebar'\" role=\"button\"\n data-slide=\"prev\" (click)=\"navigeerNaarLinks($event)\" [hidden]=\"(kanLinks$ | async) === false\">\n <span id=\"previous-page\" class=\"loxia-carousel-control-prev-icon\" aria-hidden=\"true\"></span>\n <span class=\"loxia-sr-only\">Previous</span>\n</a>\n <a class=\"loxia-carousel-control-next\" style=\"width: 2%;\" role=\"button\" data-slide=\"next\" (click)=\"navigeerNaarRechts($event)\"\n [hidden]=\"(kanRechts$ | async) === false\">\n <span id=\"next-page\" class=\"loxia-carousel-control-next-icon\" aria-hidden=\"true\"></span>\n <span class=\"loxia-sr-only\">Next</span>\n </a>\n</div>\n", styles: [".loxia-carousel-control-prev{left:0}.loxia-carousel-control-next{right:0}.loxia-carousel-control-next-icon,.loxia-carousel-control-prev-icon{display:inline-block;width:20px;height:20px;background:50%/100% 100% no-repeat}.loxia-carousel-control-prev-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M5.25 0l-4 4 4 4 1.5-1.5L4.25 4l2.5-2.5L5.25 0z'/%3e%3c/svg%3e\")}.loxia-carousel-control-next-icon{background-image:url(\"data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath d='M2.75 0l-1.5 1.5L3.75 4l-2.5 2.5L2.75 8l4-4-4-4z'/%3e%3c/svg%3e\")}.loxia-carousel-control-next:focus,.loxia-carousel-control-next:hover,.loxia-carousel-control-prev:focus,.loxia-carousel-control-prev:hover{color:#fff;text-decoration:none;outline:0;opacity:.9}.loxia-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.loxia-carousel-control-next,.loxia-carousel-control-prev{position:absolute;top:0;bottom:0;z-index:1;display:flex;align-items:center;justify-content:center;padding:0;color:#fff;text-align:center;background:0 0;border:0;opacity:.5;transition:opacity .15s ease}.carousel-sidebar{width:2%}.carousel-sidebar-open{width:2%;transition:all .3s;left:470px}[hidden]{display:none!important}\n"] }]
|
|
3227
|
-
}], ctorParameters: () => [{ type: i2$1.Store }], propDecorators: { paginationSize: [{
|
|
3228
|
-
type: Input
|
|
3229
|
-
}], iaversieinfo: [{
|
|
3230
|
-
type: Input
|
|
3231
|
-
}], sideNavOpen: [{
|
|
3232
|
-
type: Input
|
|
3233
|
-
}] } });
|
|
3234
|
-
|
|
3235
3412
|
class ViewerControlsComponent {
|
|
3236
3413
|
constructor(store, viewerControlsService, bewegingUtils) {
|
|
3237
3414
|
this.store = store;
|
|
3238
3415
|
this.viewerControlsService = viewerControlsService;
|
|
3239
3416
|
this.bewegingUtils = bewegingUtils;
|
|
3240
3417
|
this.paginationSize = 4;
|
|
3418
|
+
this.treinpad = undefined;
|
|
3419
|
+
this.goedgekeurd = new EventEmitter();
|
|
3241
3420
|
this.printing$ = this.viewerControlsService.isPrinting$();
|
|
3242
3421
|
this.valideRit$ = this.viewerControlsService.isValideRit$();
|
|
3243
3422
|
this.subscriptions = new Subscription();
|
|
3423
|
+
this.editable = false;
|
|
3244
3424
|
this.subscriptions.add(this.store.select('editable').subscribe(editable => this.editable = editable));
|
|
3245
3425
|
}
|
|
3246
3426
|
ngOnChanges({ treinpad }) {
|
|
@@ -3249,27 +3429,26 @@ class ViewerControlsComponent {
|
|
|
3249
3429
|
}
|
|
3250
3430
|
}
|
|
3251
3431
|
showGoedkeuren() {
|
|
3252
|
-
return this.editable
|
|
3432
|
+
return this.editable;
|
|
3253
3433
|
}
|
|
3254
3434
|
goedkeurenClick() {
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3435
|
+
this.store.select('ritDelen').pipe(filter(ritdelen => !!ritdelen), tap(ritDelen => {
|
|
3436
|
+
if (this.treinpad) {
|
|
3437
|
+
delete this.treinpad.aantalRitActies;
|
|
3438
|
+
this.treinpad.bewegingen = this.bewegingUtils.extractBewegingenUitRitdelen(ritDelen, this.viewerControlsService.origineelTreinPad.bewegingen);
|
|
3439
|
+
this.goedgekeurd.emit(this.treinpad);
|
|
3440
|
+
this.viewerControlsService.setOrigineelTreinPad(this.treinpad);
|
|
3441
|
+
}
|
|
3442
|
+
})).subscribe();
|
|
3262
3443
|
}
|
|
3263
3444
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ViewerControlsComponent, deps: [{ token: i2$1.Store }, { token: ViewerControlService }, { token: BewegingUtils }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3264
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ViewerControlsComponent, selector: "viewer-controls", inputs: { paginationSize: "paginationSize",
|
|
3445
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: ViewerControlsComponent, selector: "viewer-controls", inputs: { paginationSize: "paginationSize", treinpad: "treinpad", goedgekeurd: "goedgekeurd" }, usesOnChanges: true, ngImport: i0, template: "<button id=\"toonSideNavKnop\"\n class=\"loxia-btn loxia-btn-primary loxia-btn-sm open-sidenav-button\"\n (click)=\"viewerControlsService.toggleSideNavVisible()\"\n [class.active]=\"viewerControlsService.sideNavOpen$ | async\"\n [hidden]=\"printing$ | async\">Ritdetails\n</button>\n<button *ngIf=\"showGoedkeuren()\"\n id=\"goedkeurenKnop\"\n class=\"loxia-btn loxia-btn-primary loxia-btn-sm goedkeuren-button\"\n (click)=\"goedkeurenClick()\"\n [disabled]=\"(valideRit$ | async ) === false\"\n [hidden]=\"printing$ | async\">Goedkeuren\n</button>\n\n<carousel-controls [paginationSize]=\"paginationSize\"\n [sideNavOpen]=\"viewerControlsService.sideNavOpen$ | async\">\n</carousel-controls>\n", styles: [".open-sidenav-button.active{visibility:hidden}.open-sidenav-button,.goedkeuren-button{position:absolute;top:15px;z-index:600}.open-sidenav-button{left:15px}.goedkeuren-button{right:15px}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: CarouselControlsComponent, selector: "carousel-controls", inputs: ["paginationSize", "sideNavOpen"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
3265
3446
|
}
|
|
3266
3447
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: ViewerControlsComponent, decorators: [{
|
|
3267
3448
|
type: Component,
|
|
3268
|
-
args: [{ selector: 'viewer-controls', template: "<button id=\"toonSideNavKnop\"\n class=\"loxia-btn loxia-btn-primary loxia-btn-sm open-sidenav-button\"\n (click)=\"viewerControlsService.toggleSideNavVisible()\"\n [class.active]=\"viewerControlsService.sideNavOpen$ | async\"\n [hidden]=\"printing$ | async\">Ritdetails\n</button>\n<button *ngIf=\"showGoedkeuren()\"\n id=\"goedkeurenKnop\"\n class=\"loxia-btn loxia-btn-primary loxia-btn-sm goedkeuren-button\"\n (click)=\"goedkeurenClick()\"\n [disabled]=\"(valideRit$ | async ) === false\"\n [hidden]=\"printing$ | async\">Goedkeuren\n</button>\n\n<carousel-controls [paginationSize]=\"paginationSize\"\n [
|
|
3449
|
+
args: [{ selector: 'viewer-controls', template: "<button id=\"toonSideNavKnop\"\n class=\"loxia-btn loxia-btn-primary loxia-btn-sm open-sidenav-button\"\n (click)=\"viewerControlsService.toggleSideNavVisible()\"\n [class.active]=\"viewerControlsService.sideNavOpen$ | async\"\n [hidden]=\"printing$ | async\">Ritdetails\n</button>\n<button *ngIf=\"showGoedkeuren()\"\n id=\"goedkeurenKnop\"\n class=\"loxia-btn loxia-btn-primary loxia-btn-sm goedkeuren-button\"\n (click)=\"goedkeurenClick()\"\n [disabled]=\"(valideRit$ | async ) === false\"\n [hidden]=\"printing$ | async\">Goedkeuren\n</button>\n\n<carousel-controls [paginationSize]=\"paginationSize\"\n [sideNavOpen]=\"viewerControlsService.sideNavOpen$ | async\">\n</carousel-controls>\n", styles: [".open-sidenav-button.active{visibility:hidden}.open-sidenav-button,.goedkeuren-button{position:absolute;top:15px;z-index:600}.open-sidenav-button{left:15px}.goedkeuren-button{right:15px}\n"] }]
|
|
3269
3450
|
}], ctorParameters: () => [{ type: i2$1.Store }, { type: ViewerControlService }, { type: BewegingUtils }], propDecorators: { paginationSize: [{
|
|
3270
3451
|
type: Input
|
|
3271
|
-
}], iaversieinfo: [{
|
|
3272
|
-
type: Input
|
|
3273
3452
|
}], treinpad: [{
|
|
3274
3453
|
type: Input
|
|
3275
3454
|
}], goedgekeurd: [{
|
|
@@ -3324,7 +3503,7 @@ class ActiePopoverBepaler {
|
|
|
3324
3503
|
ongeplandeActies.entries.forEach(entry => {
|
|
3325
3504
|
const treinNummerActieInfos = puicNaarOngeplandeActieMap.get(entry.key);
|
|
3326
3505
|
if (!treinNummerActieInfos?.map(({ actie }) => actie).includes(entry.value.actie)) {
|
|
3327
|
-
puicNaarOngeplandeActieMap.put(entry.key, {
|
|
3506
|
+
puicNaarOngeplandeActieMap.put(entry.key, { actie: entry.value.actie });
|
|
3328
3507
|
}
|
|
3329
3508
|
});
|
|
3330
3509
|
}
|
|
@@ -3384,12 +3563,16 @@ class SvgVisualisatieComponent {
|
|
|
3384
3563
|
this.actieHelper = actieHelper;
|
|
3385
3564
|
this.sbmService = sbmService;
|
|
3386
3565
|
this.editorService = editorService;
|
|
3566
|
+
this.nietGeplandeActies = [];
|
|
3567
|
+
this.useClickArea = false;
|
|
3387
3568
|
this.svgInfos$ = this.store.select('svgInfos');
|
|
3388
3569
|
this.popoverInfos = [];
|
|
3389
3570
|
this.clickableIds = [];
|
|
3571
|
+
this.selectieInfos$ = this.store.select('selectieInfos');
|
|
3390
3572
|
this.rightClickableIds = [];
|
|
3391
3573
|
this.contextMenuActions = [];
|
|
3392
3574
|
this.contextMenuStyle = { display: 'none' };
|
|
3575
|
+
this.editable = false;
|
|
3393
3576
|
this.puicNaarBeginSeinRitdeel = new Map();
|
|
3394
3577
|
this.puicNaarEindSeinCombinatie = new Map();
|
|
3395
3578
|
this.puicNaarAlternatieveRoute = new Map();
|
|
@@ -3413,7 +3596,7 @@ class SvgVisualisatieComponent {
|
|
|
3413
3596
|
}));
|
|
3414
3597
|
}
|
|
3415
3598
|
ngOnInit() {
|
|
3416
|
-
document.getElementById('contextMenu')
|
|
3599
|
+
document.getElementById('contextMenu')?.addEventListener('mouseleave', () => this.hideContextMenu());
|
|
3417
3600
|
}
|
|
3418
3601
|
ngOnDestroy() {
|
|
3419
3602
|
this.subscriptions.forEach(s => s.unsubscribe());
|
|
@@ -3440,7 +3623,6 @@ class SvgVisualisatieComponent {
|
|
|
3440
3623
|
this.store.dispatch(navigeerBuitenRit(puic));
|
|
3441
3624
|
}
|
|
3442
3625
|
}
|
|
3443
|
-
this.store.dispatch(SetSelectedRitdeel(undefined));
|
|
3444
3626
|
}
|
|
3445
3627
|
handleImxviewRightClick(evt) {
|
|
3446
3628
|
const fn = () => {
|
|
@@ -3471,7 +3653,7 @@ class SvgVisualisatieComponent {
|
|
|
3471
3653
|
handleNieuweRouteToegevoegd() {
|
|
3472
3654
|
this.store.select('nieuweRoute')
|
|
3473
3655
|
.subscribe((nieuweRoute) => {
|
|
3474
|
-
if (nieuweRoute
|
|
3656
|
+
if (nieuweRoute?.isValid()) {
|
|
3475
3657
|
this.store.dispatch(ResetNieuweRoute());
|
|
3476
3658
|
this.store.dispatch(ritdeelInvoegen(nieuweRoute));
|
|
3477
3659
|
}
|
|
@@ -3584,7 +3766,7 @@ class SvgVisualisatieComponent {
|
|
|
3584
3766
|
});
|
|
3585
3767
|
this.viewerControlsService.setValideRit(!gebrokenRit);
|
|
3586
3768
|
this.store.dispatch(SetGeplandeActies(actieOpRitSelectiePuics));
|
|
3587
|
-
const actieOpRitSelectiePuicsArray =
|
|
3769
|
+
const actieOpRitSelectiePuicsArray = Array.from(actieOpRitSelectiePuics.values()).flat();
|
|
3588
3770
|
this.store.dispatch(SetActieOpRitSelectieIds(actieOpRitSelectiePuicsArray));
|
|
3589
3771
|
ritSelectiePuics = ritSelectiePuics.filter(item => actieOpRitSelectiePuicsArray.indexOf(item) < 0); // make mutually exclusive
|
|
3590
3772
|
this.store.dispatch(SetRitSelectieIds(ritSelectiePuics));
|
|
@@ -3618,11 +3800,11 @@ class SvgVisualisatieComponent {
|
|
|
3618
3800
|
return topoElementen.map(e => e.getPuic());
|
|
3619
3801
|
}
|
|
3620
3802
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SvgVisualisatieComponent, deps: [{ token: i2$1.Store }, { token: ViewerControlService }, { token: ActieHelper }, { token: SignaleringsBeeldManagerService }, { token: EditorService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3621
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: SvgVisualisatieComponent, selector: "svg-visualisatie", inputs: { nietGeplandeActies: "nietGeplandeActies", useClickArea: "useClickArea" }, viewQueries: [{ propertyName: "imxviewer", first: true, predicate: ["imxviewercontainer"], descendants: true }], ngImport: i0, template: "<imx-viewer #imxviewercontainer\n [svgInfo]=\"svgInfos$ | async\"\n [selectieInfos]=\"
|
|
3803
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: SvgVisualisatieComponent, selector: "svg-visualisatie", inputs: { nietGeplandeActies: "nietGeplandeActies", useClickArea: "useClickArea" }, viewQueries: [{ propertyName: "imxviewer", first: true, predicate: ["imxviewercontainer"], descendants: true }], ngImport: i0, template: "<imx-viewer #imxviewercontainer\n [svgInfo]=\"svgInfos$ | async\"\n [selectieInfos]=\"selectieInfos$ | async\"\n [clickableIds]=\"clickableIds\"\n [rightClickableIds]=\"rightClickableIds\"\n [popoverInfos]=\"popoverInfos\"\n [inlineDgnCssImport]=\"false\"\n [useClickArea]=\"useClickArea\"\n [zoomScaleSensitivity]=\"0.25\"\n (clickHandler)=\"handleImxviewClick($event)\"\n (rightClickHandler)=\"handleImxviewRightClick($event)\"\n ></imx-viewer>\n\n<ul id=\"contextMenu\" class=\"dropdown-menu\" role=\"menu\" [ngStyle]=\"contextMenuStyle\">\n <li *ngFor=\"let action of contextMenuActions\"><a class=\"dropdown-item\" tabindex=\"-1\"\n (click)=\"action.click()\">{{action.label}}</a></li>\n</ul>\n", styles: [".dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: i7.ImxViewerComponent, selector: "imx-viewer", inputs: ["useClickArea", "inlineDgnCssImport", "svgInfo", "selectieInfos", "clickableIds", "rightClickableIds", "popoverInfos", "zoomScaleSensitivity", "autoAlignSvgsHorizontally", "initialPanAndZoom"], outputs: ["clickHandler", "rightClickHandler", "svgLoaded", "panned"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
3622
3804
|
}
|
|
3623
3805
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SvgVisualisatieComponent, decorators: [{
|
|
3624
3806
|
type: Component,
|
|
3625
|
-
args: [{ selector: 'svg-visualisatie', template: "<imx-viewer #imxviewercontainer\n [svgInfo]=\"svgInfos$ | async\"\n [selectieInfos]=\"
|
|
3807
|
+
args: [{ selector: 'svg-visualisatie', template: "<imx-viewer #imxviewercontainer\n [svgInfo]=\"svgInfos$ | async\"\n [selectieInfos]=\"selectieInfos$ | async\"\n [clickableIds]=\"clickableIds\"\n [rightClickableIds]=\"rightClickableIds\"\n [popoverInfos]=\"popoverInfos\"\n [inlineDgnCssImport]=\"false\"\n [useClickArea]=\"useClickArea\"\n [zoomScaleSensitivity]=\"0.25\"\n (clickHandler)=\"handleImxviewClick($event)\"\n (rightClickHandler)=\"handleImxviewRightClick($event)\"\n ></imx-viewer>\n\n<ul id=\"contextMenu\" class=\"dropdown-menu\" role=\"menu\" [ngStyle]=\"contextMenuStyle\">\n <li *ngFor=\"let action of contextMenuActions\"><a class=\"dropdown-item\" tabindex=\"-1\"\n (click)=\"action.click()\">{{action.label}}</a></li>\n</ul>\n", styles: [".dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:10rem;padding:.5rem 0;margin:.125rem 0 0;font-size:1rem;color:#212529;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid rgba(0,0,0,.15);border-radius:.25rem}.dropdown-item{display:block;width:100%;padding:.25rem 1.5rem;clear:both;font-weight:400;color:#212529;text-align:inherit;white-space:nowrap;background-color:transparent;border:0}\n"] }]
|
|
3626
3808
|
}], ctorParameters: () => [{ type: i2$1.Store }, { type: ViewerControlService }, { type: ActieHelper }, { type: SignaleringsBeeldManagerService }, { type: EditorService }], propDecorators: { nietGeplandeActies: [{
|
|
3627
3809
|
type: Input
|
|
3628
3810
|
}], useClickArea: [{
|
|
@@ -3640,6 +3822,9 @@ class MstviewerComponent {
|
|
|
3640
3822
|
this.printBewegingService = printBewegingService;
|
|
3641
3823
|
this.paginationSize = 4;
|
|
3642
3824
|
this.baseurl = 'https://acceptatie.raildesign.nl';
|
|
3825
|
+
this.debug = false;
|
|
3826
|
+
this.viewer = false;
|
|
3827
|
+
this.useClickArea = false;
|
|
3643
3828
|
this.goedgekeurd = new EventEmitter();
|
|
3644
3829
|
this.subscriptions = new Subscription();
|
|
3645
3830
|
this.subscriptions.add(this.store.select('nieuweBewegingen').subscribe(nieuweRit => {
|
|
@@ -3690,23 +3875,26 @@ class MstviewerComponent {
|
|
|
3690
3875
|
}
|
|
3691
3876
|
}
|
|
3692
3877
|
printFocusBeweging(bewegingId) {
|
|
3693
|
-
return this.printBewegingService.printBeweging(bewegingId, this.paginationSize
|
|
3878
|
+
return this.printBewegingService.printBeweging(bewegingId, this.paginationSize);
|
|
3694
3879
|
}
|
|
3695
3880
|
keurAlleActiesGoed() {
|
|
3696
3881
|
this.viewerControlsService.keurAlleActiesGoed(this.ongeplandeActies);
|
|
3697
3882
|
}
|
|
3698
3883
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: MstviewerComponent, deps: [{ token: i2$1.Store }, { token: ViewerControlService }, { token: DebugService }, { token: PrintBewegingService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3699
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: MstviewerComponent, selector: "mst-viewer", inputs: { iaversieinfo: "iaversieinfo", treinpad: "treinpad", ongeplandeActies: "ongeplandeActies", paginationSize: "paginationSize", baseurl: "baseurl", debug: "debug", viewer: "viewer", useClickArea: "useClickArea" }, outputs: { goedgekeurd: "goedgekeurd" }, usesOnChanges: true, ngImport: i0, template: "<loxia-messages></loxia-messages>\n<loxia-overlay *ngIf=\"(progressIndicator$ | async)\">\n <loxia-progress-indicator id=\"progress-indicator\" [border]=\"false\" upperText=\"\">\n </loxia-progress-indicator>\n</loxia-overlay>\n\n<div style=\"position: relative\">\n <rpe-component [baseurl]=\"baseurl\" path=\"/mst/editor/editor.nocache.js\"></rpe-component>\n\n <svg-visualisatie [useClickArea]=\"useClickArea\" [nietGeplandeActies]=\"ongeplandeActies\"></svg-visualisatie>\n\n <nav [class.active]=\"(viewerControlsService.sideNavOpen$ | async) === false\" id=\"sidebar\">\n <div id=\"dismiss\">\n <em id=\"verbergSideNav\" class=\"fa fa-arrow-left\" (click)=\"viewerControlsService.toggleSideNavVisible()\">×</em>\n </div>\n <ritdelen-lijst *ngIf=\"!viewer\" (focusEmitter)=\"focusRitdeel($event)\" (keurAlleActiesGoed)=\"keurAlleActiesGoed()\"\n [nietGeplandeActies]=\"ongeplandeActies\"></ritdelen-lijst>\n <ritdelen-view *ngIf=\"viewer\" (focusEmitter)=\"focusRitdeel($event)\"></ritdelen-view>\n </nav>\n\n <viewer-controls [paginationSize]=\"paginationSize\"\n [
|
|
3884
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.7", type: MstviewerComponent, selector: "mst-viewer", inputs: { iaversieinfo: "iaversieinfo", treinpad: "treinpad", ongeplandeActies: "ongeplandeActies", paginationSize: "paginationSize", baseurl: "baseurl", debug: "debug", viewer: "viewer", useClickArea: "useClickArea" }, outputs: { goedgekeurd: "goedgekeurd" }, usesOnChanges: true, ngImport: i0, template: "<loxia-messages></loxia-messages>\n<loxia-overlay *ngIf=\"(progressIndicator$ | async)\">\n <loxia-progress-indicator id=\"progress-indicator\" [border]=\"false\" upperText=\"\">\n </loxia-progress-indicator>\n</loxia-overlay>\n\n<div style=\"position: relative\">\n <rpe-component [baseurl]=\"baseurl\" path=\"/mst/editor/editor.nocache.js\"></rpe-component>\n\n <svg-visualisatie [useClickArea]=\"useClickArea\" [nietGeplandeActies]=\"ongeplandeActies\"></svg-visualisatie>\n\n <nav [class.active]=\"(viewerControlsService.sideNavOpen$ | async) === false\" id=\"sidebar\">\n <div id=\"dismiss\">\n <em id=\"verbergSideNav\" class=\"fa fa-arrow-left\" (click)=\"viewerControlsService.toggleSideNavVisible()\">×</em>\n </div>\n <ritdelen-lijst *ngIf=\"!viewer\" (focusEmitter)=\"focusRitdeel($event)\" (keurAlleActiesGoed)=\"keurAlleActiesGoed()\"\n [nietGeplandeActies]=\"ongeplandeActies\"></ritdelen-lijst>\n <ritdelen-view *ngIf=\"viewer\" (focusEmitter)=\"focusRitdeel($event)\"></ritdelen-view>\n </nav>\n\n <viewer-controls [paginationSize]=\"paginationSize\"\n [treinpad]=\"treinpad\"\n [goedgekeurd]=\"goedgekeurd\"\n ></viewer-controls>\n\n</div>\n", styles: ["#sidebar{min-width:350px;max-width:475px;background:#fff;transition:all .3s;height:93vh;position:absolute;top:0;z-index:20}#sidebar.active{margin-left:-475px}#sidebar .sidebar-header{padding:20px;background:#6d7fcc}#dismiss{width:20px;height:20px;position:absolute;cursor:pointer;top:5px;right:0;color:#000;z-index:300}[hidden]{display:none}\n"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: OverlayComponent, selector: "loxia-overlay" }, { kind: "component", type: ProgressIndicatorComponent, selector: "loxia-progress-indicator" }, { kind: "component", type: RpeComponent, selector: "rpe-component", inputs: ["baseurl", "path"] }, { kind: "component", type: RitdelenLijstComponent, selector: "ritdelen-lijst", inputs: ["nietGeplandeActies"], outputs: ["focusEmitter", "keurAlleActiesGoed"] }, { kind: "component", type: RitdelenViewComponent, selector: "ritdelen-view", outputs: ["focusEmitter"] }, { kind: "component", type: ViewerControlsComponent, selector: "viewer-controls", inputs: ["paginationSize", "treinpad", "goedgekeurd"] }, { kind: "component", type: SvgVisualisatieComponent, selector: "svg-visualisatie", inputs: ["nietGeplandeActies", "useClickArea"] }, { kind: "component", type: MessagesComponent, selector: "loxia-messages" }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
3700
3885
|
}
|
|
3701
3886
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: MstviewerComponent, decorators: [{
|
|
3702
3887
|
type: Component,
|
|
3703
|
-
args: [{ selector: 'mst-viewer', template: "<loxia-messages></loxia-messages>\n<loxia-overlay *ngIf=\"(progressIndicator$ | async)\">\n <loxia-progress-indicator id=\"progress-indicator\" [border]=\"false\" upperText=\"\">\n </loxia-progress-indicator>\n</loxia-overlay>\n\n<div style=\"position: relative\">\n <rpe-component [baseurl]=\"baseurl\" path=\"/mst/editor/editor.nocache.js\"></rpe-component>\n\n <svg-visualisatie [useClickArea]=\"useClickArea\" [nietGeplandeActies]=\"ongeplandeActies\"></svg-visualisatie>\n\n <nav [class.active]=\"(viewerControlsService.sideNavOpen$ | async) === false\" id=\"sidebar\">\n <div id=\"dismiss\">\n <em id=\"verbergSideNav\" class=\"fa fa-arrow-left\" (click)=\"viewerControlsService.toggleSideNavVisible()\">×</em>\n </div>\n <ritdelen-lijst *ngIf=\"!viewer\" (focusEmitter)=\"focusRitdeel($event)\" (keurAlleActiesGoed)=\"keurAlleActiesGoed()\"\n [nietGeplandeActies]=\"ongeplandeActies\"></ritdelen-lijst>\n <ritdelen-view *ngIf=\"viewer\" (focusEmitter)=\"focusRitdeel($event)\"></ritdelen-view>\n </nav>\n\n <viewer-controls [paginationSize]=\"paginationSize\"\n [
|
|
3888
|
+
args: [{ selector: 'mst-viewer', template: "<loxia-messages></loxia-messages>\n<loxia-overlay *ngIf=\"(progressIndicator$ | async)\">\n <loxia-progress-indicator id=\"progress-indicator\" [border]=\"false\" upperText=\"\">\n </loxia-progress-indicator>\n</loxia-overlay>\n\n<div style=\"position: relative\">\n <rpe-component [baseurl]=\"baseurl\" path=\"/mst/editor/editor.nocache.js\"></rpe-component>\n\n <svg-visualisatie [useClickArea]=\"useClickArea\" [nietGeplandeActies]=\"ongeplandeActies\"></svg-visualisatie>\n\n <nav [class.active]=\"(viewerControlsService.sideNavOpen$ | async) === false\" id=\"sidebar\">\n <div id=\"dismiss\">\n <em id=\"verbergSideNav\" class=\"fa fa-arrow-left\" (click)=\"viewerControlsService.toggleSideNavVisible()\">×</em>\n </div>\n <ritdelen-lijst *ngIf=\"!viewer\" (focusEmitter)=\"focusRitdeel($event)\" (keurAlleActiesGoed)=\"keurAlleActiesGoed()\"\n [nietGeplandeActies]=\"ongeplandeActies\"></ritdelen-lijst>\n <ritdelen-view *ngIf=\"viewer\" (focusEmitter)=\"focusRitdeel($event)\"></ritdelen-view>\n </nav>\n\n <viewer-controls [paginationSize]=\"paginationSize\"\n [treinpad]=\"treinpad\"\n [goedgekeurd]=\"goedgekeurd\"\n ></viewer-controls>\n\n</div>\n", styles: ["#sidebar{min-width:350px;max-width:475px;background:#fff;transition:all .3s;height:93vh;position:absolute;top:0;z-index:20}#sidebar.active{margin-left:-475px}#sidebar .sidebar-header{padding:20px;background:#6d7fcc}#dismiss{width:20px;height:20px;position:absolute;cursor:pointer;top:5px;right:0;color:#000;z-index:300}[hidden]{display:none}\n"] }]
|
|
3704
3889
|
}], ctorParameters: () => [{ type: i2$1.Store }, { type: ViewerControlService }, { type: DebugService }, { type: PrintBewegingService }], propDecorators: { iaversieinfo: [{
|
|
3705
|
-
type: Input
|
|
3890
|
+
type: Input,
|
|
3891
|
+
args: [{ required: true }]
|
|
3706
3892
|
}], treinpad: [{
|
|
3707
|
-
type: Input
|
|
3893
|
+
type: Input,
|
|
3894
|
+
args: [{ required: true }]
|
|
3708
3895
|
}], ongeplandeActies: [{
|
|
3709
|
-
type: Input
|
|
3896
|
+
type: Input,
|
|
3897
|
+
args: [{ required: true }]
|
|
3710
3898
|
}], paginationSize: [{
|
|
3711
3899
|
type: Input
|
|
3712
3900
|
}], baseurl: [{
|
|
@@ -3722,24 +3910,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
3722
3910
|
}] } });
|
|
3723
3911
|
|
|
3724
3912
|
let SignaleringsbeeldInfoResource = class SignaleringsbeeldInfoResource extends Resource {
|
|
3725
|
-
constructor(restHandler, store) {
|
|
3913
|
+
constructor(restHandler, store, sbControllerService) {
|
|
3726
3914
|
super(restHandler);
|
|
3915
|
+
this.restHandler = restHandler;
|
|
3727
3916
|
this.store = store;
|
|
3917
|
+
this.sbControllerService = sbControllerService;
|
|
3728
3918
|
this.subscriptions = new Subscription();
|
|
3729
|
-
this.subscriptions.add(this.store.select('baseUrl').subscribe(baseUrl =>
|
|
3919
|
+
this.subscriptions.add(this.store.select('baseUrl').subscribe(baseUrl => {
|
|
3920
|
+
this.$setUrl(baseUrl);
|
|
3921
|
+
sbControllerService.configuration.basePath = baseUrl + '/mst';
|
|
3922
|
+
}));
|
|
3730
3923
|
}
|
|
3731
3924
|
ngOnDestroy() {
|
|
3732
3925
|
this.subscriptions.unsubscribe();
|
|
3733
3926
|
}
|
|
3734
|
-
|
|
3927
|
+
laadSignaleringsbeeldInfo(versie, pplgs) {
|
|
3928
|
+
return this.sbControllerService.getSignaleringsbeelden(versie, pplgs);
|
|
3929
|
+
}
|
|
3930
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SignaleringsbeeldInfoResource, deps: [{ token: i1$1.ResourceHandler }, { token: i2$1.Store }, { token: SbControllerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3735
3931
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SignaleringsbeeldInfoResource }); }
|
|
3736
3932
|
};
|
|
3737
|
-
__decorate([
|
|
3738
|
-
ResourceAction({
|
|
3739
|
-
path: '/',
|
|
3740
|
-
method: ResourceRequestMethod.Post
|
|
3741
|
-
})
|
|
3742
|
-
], SignaleringsbeeldInfoResource.prototype, "laadSignaleringsbeeldInfo", void 0);
|
|
3743
3933
|
__decorate([
|
|
3744
3934
|
ResourceAction({
|
|
3745
3935
|
path: '/valideeriaversie'
|
|
@@ -3752,7 +3942,7 @@ SignaleringsbeeldInfoResource = __decorate([
|
|
|
3752
3942
|
], SignaleringsbeeldInfoResource);
|
|
3753
3943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SignaleringsbeeldInfoResource, decorators: [{
|
|
3754
3944
|
type: Injectable
|
|
3755
|
-
}], ctorParameters: () => [{ type: i1$1.ResourceHandler }, { type: i2$1.Store }
|
|
3945
|
+
}], ctorParameters: () => [{ type: i1$1.ResourceHandler }, { type: i2$1.Store }, { type: SbControllerService }], propDecorators: { getBestaatIALevering: [] } });
|
|
3756
3946
|
class SignaleringsbeeldInfoDto extends ResourceModel {
|
|
3757
3947
|
constructor(data) {
|
|
3758
3948
|
super();
|
|
@@ -3780,6 +3970,8 @@ class BaseRestService {
|
|
|
3780
3970
|
this.httpClient = httpClient;
|
|
3781
3971
|
this.store = store;
|
|
3782
3972
|
this.subscriptions = new Subscription();
|
|
3973
|
+
this.baseUrl = '';
|
|
3974
|
+
this.iaVersie = '';
|
|
3783
3975
|
this.subscriptions.add(this.store.select('baseUrl').subscribe(baseUrl => this.baseUrl = baseUrl));
|
|
3784
3976
|
this.subscriptions.add(this.store.select('iaVersie').subscribe(iaVersie => this.iaVersie = iaVersie.versie));
|
|
3785
3977
|
}
|
|
@@ -3955,13 +4147,13 @@ class Ritdeel {
|
|
|
3955
4147
|
return retval;
|
|
3956
4148
|
}
|
|
3957
4149
|
getVrijebaanRijwegplan() {
|
|
3958
|
-
return this.vrijebaanRijwegplanRijwegDwangCombi
|
|
4150
|
+
return this.vrijebaanRijwegplanRijwegDwangCombi?.rijwegplan;
|
|
3959
4151
|
}
|
|
3960
4152
|
getVrijebaanRijweg() {
|
|
3961
|
-
return this.vrijebaanRijwegplanRijwegDwangCombi
|
|
4153
|
+
return this.vrijebaanRijwegplanRijwegDwangCombi?.rijweg;
|
|
3962
4154
|
}
|
|
3963
4155
|
getVrijebaanDwang() {
|
|
3964
|
-
return this.vrijebaanRijwegplanRijwegDwangCombi
|
|
4156
|
+
return this.vrijebaanRijwegplanRijwegDwangCombi?.dwang;
|
|
3965
4157
|
}
|
|
3966
4158
|
getDwangNummer() {
|
|
3967
4159
|
return this.rijwegplanRijwegDwangCombi.getDwangNummer();
|
|
@@ -3978,7 +4170,7 @@ class Ritdeel {
|
|
|
3978
4170
|
isBinnenWindow() {
|
|
3979
4171
|
return (this.zichtbaarheid === RitdeelZichtbaarheid.ZICHTBAAR ||
|
|
3980
4172
|
this.zichtbaarheid === RitdeelZichtbaarheid.ONZICHTBAAR_DOOR_GEBRUIKER)
|
|
3981
|
-
&& this.zichtbaarBuitenPaginatie
|
|
4173
|
+
&& !this.zichtbaarBuitenPaginatie;
|
|
3982
4174
|
}
|
|
3983
4175
|
isNietBeschikbaar() {
|
|
3984
4176
|
return this.zichtbaarheid === RitdeelZichtbaarheid.ONZICHTBAAR_DOOR_SYSTEEM;
|
|
@@ -4001,10 +4193,10 @@ class Ritdeel {
|
|
|
4001
4193
|
}
|
|
4002
4194
|
}
|
|
4003
4195
|
heeftVrijebaanInfo() {
|
|
4004
|
-
return this.vrijebaanRijwegplanRijwegDwangCombi && !!this.vrijebaanRijwegplanRijwegDwangCombi.dwang;
|
|
4196
|
+
return !!this.vrijebaanRijwegplanRijwegDwangCombi && !!this.vrijebaanRijwegplanRijwegDwangCombi.dwang;
|
|
4005
4197
|
}
|
|
4006
4198
|
getVrijebaanPrlRoute() {
|
|
4007
|
-
return this.vrijebaanRijwegplanRijwegDwangCombi
|
|
4199
|
+
return this.vrijebaanRijwegplanRijwegDwangCombi?.getRoute();
|
|
4008
4200
|
}
|
|
4009
4201
|
getTopologieElementen() {
|
|
4010
4202
|
return this.topoElementen;
|
|
@@ -4036,10 +4228,10 @@ class Ritdeel {
|
|
|
4036
4228
|
getZichtbaarheidBuitenPaginatie() {
|
|
4037
4229
|
return this.zichtbaarBuitenPaginatie;
|
|
4038
4230
|
}
|
|
4039
|
-
bepaalTopologieElementen(
|
|
4040
|
-
const topoElementen =
|
|
4231
|
+
bepaalTopologieElementen(sbmService) {
|
|
4232
|
+
const topoElementen = sbmService.bepaalRouteElementen(this.getRoute());
|
|
4041
4233
|
if (this.heeftVrijebaanInfo()) {
|
|
4042
|
-
const vrijebaanTopoElementen =
|
|
4234
|
+
const vrijebaanTopoElementen = sbmService.bepaalRouteElementen(this.getVrijebaanPrlRoute());
|
|
4043
4235
|
topoElementen.push(...vrijebaanTopoElementen);
|
|
4044
4236
|
}
|
|
4045
4237
|
this.topoElementen = topoElementen;
|
|
@@ -4085,7 +4277,7 @@ class RitLezerService {
|
|
|
4085
4277
|
ritDelen.push(new Ritdeel(dwangInfo, beweging.ritActies, beweging, vrijebaanDwangInfo, vervolgSpoor, []));
|
|
4086
4278
|
}
|
|
4087
4279
|
extractVrijebaanDwangInfo(beweging, rijwegPlan, rijweg) {
|
|
4088
|
-
let vrijebaanDwangInfo =
|
|
4280
|
+
let vrijebaanDwangInfo = undefined;
|
|
4089
4281
|
let vervolgSpoor;
|
|
4090
4282
|
if (beweging.naarSpoor.endsWith(SPOOR_NAAR_VRIJEBAAN_POSTFIX) ||
|
|
4091
4283
|
beweging.naarSpoor.endsWith(SPOOR_NAAR_VEERWISSEL_VRIJEBAAN_POSTFIX)) {
|
|
@@ -4099,9 +4291,9 @@ class RitLezerService {
|
|
|
4099
4291
|
vrijebaanRijweg = vrijebaanRijwegen[0];
|
|
4100
4292
|
vrijebaanDwang = vrijebaanRijweg.getDwangVoorDwangNummer(0);
|
|
4101
4293
|
vervolgSpoor = vrijebaanRijwegplan.getVervolgSpoor(vrijebaanRijweg);
|
|
4294
|
+
vrijebaanDwangInfo =
|
|
4295
|
+
new RijwegplanRijwegDwangCombinatie(vrijebaanRijwegplan, vrijebaanRijweg, vrijebaanDwang);
|
|
4102
4296
|
}
|
|
4103
|
-
vrijebaanDwangInfo =
|
|
4104
|
-
new RijwegplanRijwegDwangCombinatie(vrijebaanRijwegplan, vrijebaanRijweg, vrijebaanDwang);
|
|
4105
4297
|
}
|
|
4106
4298
|
}
|
|
4107
4299
|
return { vrijebaanDwangInfo, vervolgSpoor };
|
|
@@ -4154,7 +4346,7 @@ class BepaalOngeplandeActiesEffect {
|
|
|
4154
4346
|
this.bepaalOngeplandeActies$ = createEffect(() => this.actions$.pipe(ofType(BepaalOngeplandeActies), withLatestFrom(this.store), map(([action, store]) => {
|
|
4155
4347
|
const puicActieMap = new ArrayMultimap();
|
|
4156
4348
|
const nietGevondenTakken = [];
|
|
4157
|
-
const logMeldingDTOs = [];
|
|
4349
|
+
const logMeldingDTOs$ = [];
|
|
4158
4350
|
const acties = store.ritDelen.flatMap(rd => rd.acties);
|
|
4159
4351
|
action.ongeplandeActies.forEach(actie => {
|
|
4160
4352
|
const alreadyAdded = acties.filter(a => a.id === actie.id).length > 0;
|
|
@@ -4170,11 +4362,11 @@ class BepaalOngeplandeActiesEffect {
|
|
|
4170
4362
|
if (!spoortak && nietGevondenTakken.indexOf(takId) < 0) {
|
|
4171
4363
|
nietGevondenTakken.push(takId);
|
|
4172
4364
|
const melding = MeldingBuilder.nietGevondenTakkenOngeplandeActies(nietGevondenTakken);
|
|
4173
|
-
logMeldingDTOs
|
|
4365
|
+
logMeldingDTOs$.push(this.loggingHelper.maakLogDTO(melding, actie));
|
|
4174
4366
|
}
|
|
4175
4367
|
else if (spoortak) {
|
|
4176
4368
|
const melding = MeldingBuilder.actieHighlightError([actie.id]);
|
|
4177
|
-
logMeldingDTOs
|
|
4369
|
+
logMeldingDTOs$.push(this.loggingHelper.maakLogDTO(melding, actie));
|
|
4178
4370
|
this.messagesService.showMessage(MessageBuilder.actieHighlightError([actie.id]));
|
|
4179
4371
|
}
|
|
4180
4372
|
}
|
|
@@ -4183,8 +4375,8 @@ class BepaalOngeplandeActiesEffect {
|
|
|
4183
4375
|
if (nietGevondenTakken.length > 0) {
|
|
4184
4376
|
this.messagesService.showMessage(MessageBuilder.nietGevondenTakkenOngeplandeActies(nietGevondenTakken));
|
|
4185
4377
|
}
|
|
4186
|
-
if (logMeldingDTOs
|
|
4187
|
-
this.mstLogResource.logMessages(
|
|
4378
|
+
if (logMeldingDTOs$.length > 0) {
|
|
4379
|
+
forkJoin(logMeldingDTOs$).pipe(tap(dtos => this.mstLogResource.logMessages(dtos))).subscribe();
|
|
4188
4380
|
}
|
|
4189
4381
|
this.store.dispatch(SetOngeplandeActies(puicActieMap));
|
|
4190
4382
|
this.store.dispatch(SetOngeplandeActieSelectieIds(Array.from(puicActieMap.keys())));
|
|
@@ -4377,7 +4569,7 @@ class FocusEffect {
|
|
|
4377
4569
|
const dwangPuics = this.getPuics(topoElementen);
|
|
4378
4570
|
if (ritdeel.isNietBeschikbaar()) {
|
|
4379
4571
|
this.store.dispatch(SetOngeplandeActiesBepaald(false));
|
|
4380
|
-
this.store.dispatch(navigeerVanaf(actie.paginationSize,
|
|
4572
|
+
this.store.dispatch(navigeerVanaf(actie.paginationSize, ritdeel));
|
|
4381
4573
|
}
|
|
4382
4574
|
return focusOpIds(dwangPuics);
|
|
4383
4575
|
})));
|
|
@@ -4399,16 +4591,16 @@ class LaadRouteFilesEffect {
|
|
|
4399
4591
|
this.ritLezer = ritLezer;
|
|
4400
4592
|
this.editorService = editorService;
|
|
4401
4593
|
this.messagesService = messagesService;
|
|
4402
|
-
this.authActions$ = createEffect(() => this.actions$.pipe(ofType(SetSignaleringsbeeldInfoDtos), map(action => this.laadRouteFiles(action))), { dispatch: false });
|
|
4594
|
+
this.authActions$ = createEffect(() => this.actions$.pipe(ofType(SetSignaleringsbeeldInfoDtos), withLatestFrom(this.store), map(([action, storeState]) => this.laadRouteFiles(action, storeState.iaVersie.versie))), { dispatch: false });
|
|
4403
4595
|
}
|
|
4404
|
-
laadRouteFiles(actie) {
|
|
4596
|
+
laadRouteFiles(actie, iaVersie) {
|
|
4405
4597
|
const isReady = this.editorService.isReady();
|
|
4406
4598
|
isReady.then(() => {
|
|
4407
4599
|
const pplgs = this.bepaalSbDtoPplgs(actie.dtos);
|
|
4408
|
-
const promise = this.editorService.laadRouteFiles(
|
|
4600
|
+
const promise = this.editorService.laadRouteFiles(iaVersie, pplgs);
|
|
4409
4601
|
promise.then(() => {
|
|
4410
4602
|
this.updateRitdelen(actie);
|
|
4411
|
-
}, err => {
|
|
4603
|
+
}, (err) => {
|
|
4412
4604
|
this.messagesService.showMessage(MessageBuilder.rwpDataNietGevonden(Utils.getValidErorrMessage(err)));
|
|
4413
4605
|
});
|
|
4414
4606
|
});
|
|
@@ -4419,7 +4611,7 @@ class LaadRouteFilesEffect {
|
|
|
4419
4611
|
if (ritdelen.length === 0) {
|
|
4420
4612
|
ritdelen = this.ritLezer.parseRit(actie.treinpad, actie.ritGewijzigdToegestaan);
|
|
4421
4613
|
}
|
|
4422
|
-
this.store.dispatch(setRitDelen(ritdelen, actie.paginationSize
|
|
4614
|
+
this.store.dispatch(setRitDelen(ritdelen, actie.paginationSize));
|
|
4423
4615
|
this.store.dispatch(setEditable(actie.treinpad.ritStatus !== 'Definitief'));
|
|
4424
4616
|
});
|
|
4425
4617
|
}, 0);
|
|
@@ -4427,7 +4619,7 @@ class LaadRouteFilesEffect {
|
|
|
4427
4619
|
bepaalSbDtoPplgs(dtos) {
|
|
4428
4620
|
const pplgs = [];
|
|
4429
4621
|
dtos.forEach(dto => {
|
|
4430
|
-
dto.pplgs
|
|
4622
|
+
dto.pplgs?.forEach(pplg => {
|
|
4431
4623
|
if (!pplgs.includes(pplg)) {
|
|
4432
4624
|
pplgs.push(pplg);
|
|
4433
4625
|
}
|
|
@@ -4468,14 +4660,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4468
4660
|
}] });
|
|
4469
4661
|
|
|
4470
4662
|
class LaadSignaleringsbeeldenEffect {
|
|
4471
|
-
constructor(actions$, store, signaleringsBeeldManagerService, editorService, sbiResource, connectorService,
|
|
4663
|
+
constructor(actions$, store, signaleringsBeeldManagerService, editorService, sbiResource, connectorService, messagesService) {
|
|
4472
4664
|
this.actions$ = actions$;
|
|
4473
4665
|
this.store = store;
|
|
4474
4666
|
this.signaleringsBeeldManagerService = signaleringsBeeldManagerService;
|
|
4475
4667
|
this.editorService = editorService;
|
|
4476
4668
|
this.sbiResource = sbiResource;
|
|
4477
4669
|
this.connectorService = connectorService;
|
|
4478
|
-
this.
|
|
4670
|
+
this.messagesService = messagesService;
|
|
4479
4671
|
this.SVG_PIXEL_RUIMTE = 30;
|
|
4480
4672
|
this.verwerkRitdelen$ = createEffect(() => this.actions$.pipe(ofType(setRitDelen, navigeer, navigeerVanaf), withLatestFrom(this.store), map(([actie, storeState]) => {
|
|
4481
4673
|
this.store.dispatch(SetOngeplandeActiesBepaald(false));
|
|
@@ -4489,14 +4681,14 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4489
4681
|
}).pipe(switchMap(this.getOtherRand.bind(this)), switchMap(this.loadRouteFilesAndSignaleringsbeeldInfo.bind(this)), switchMap(this.loadSignaleringsbeelden.bind(this)), map(this.processSvgsAndUpdateRitdelen.bind(this))))), { dispatch: false });
|
|
4490
4682
|
}
|
|
4491
4683
|
handleSignaleringsbeeldInfo({ actie, storeState }) {
|
|
4492
|
-
return this.sbiResource.laadSignaleringsbeeldInfo(
|
|
4493
|
-
this.
|
|
4684
|
+
return this.sbiResource.laadSignaleringsbeeldInfo(storeState.iaVersie.versie, actie.pplgs).pipe(take(1), tap((dtos) => this.processResponse({ dtos, storeState, actie })), catchError((err) => {
|
|
4685
|
+
this.messagesService.showMessage(MessageBuilder.nietGevondenSBI(err));
|
|
4494
4686
|
return throwError(() => err);
|
|
4495
4687
|
}));
|
|
4496
4688
|
}
|
|
4497
4689
|
processResponse({ dtos, storeState, actie }) {
|
|
4498
4690
|
if (dtos && dtos.filter(dto => dto.metVisualisatie).length > 12) {
|
|
4499
|
-
this.
|
|
4691
|
+
this.messagesService.showMessage(MessageBuilder.meerDan12BladenGevonden(dtos.length));
|
|
4500
4692
|
}
|
|
4501
4693
|
this.store.dispatch(SetSignaleringsbeeldInfoDtos(dtos, storeState.iaVersie, actie.rit, actie.paginationSize, actie.ritGewijzigdToegestaan));
|
|
4502
4694
|
this.store.dispatch(SetVisibleSignaleringsbeeldInfoDtos(dtos));
|
|
@@ -4506,14 +4698,14 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4506
4698
|
}
|
|
4507
4699
|
loadRouteFilesAndSignaleringsbeeldInfo({ otherPplg, rand, storeState }) {
|
|
4508
4700
|
this.editorService.laadRouteFiles(storeState.iaVersie.versie, [rand.getPPLG(), otherPplg]);
|
|
4509
|
-
return this.sbiResource.laadSignaleringsbeeldInfo(
|
|
4701
|
+
return this.sbiResource.laadSignaleringsbeeldInfo(storeState.iaVersie.versie, [rand.getPPLG(), otherPplg]).pipe(map(dtos => ({ dtos, storeState })));
|
|
4510
4702
|
}
|
|
4511
4703
|
loadSignaleringsbeelden({ dtos, storeState }) {
|
|
4512
|
-
return this.editorService.laadSignaleringsbeelden(storeState.iaVersie.versie, dtos).pipe(map(svgDataUrls => ({ svgDataUrls, storeState, dtos })));
|
|
4704
|
+
return this.editorService.laadSignaleringsbeelden(storeState.iaVersie.versie, dtos).pipe(map(svgDataUrls => ({ svgDataUrls, ritDelen: storeState.ritDelen, dtos })));
|
|
4513
4705
|
}
|
|
4514
|
-
processSvgsAndUpdateRitdelen({ svgDataUrls,
|
|
4706
|
+
processSvgsAndUpdateRitdelen({ svgDataUrls, ritDelen, dtos }) {
|
|
4515
4707
|
this.verwerkSvgs(svgDataUrls);
|
|
4516
|
-
const nieuweRitdelen = this.updateRitdelen(
|
|
4708
|
+
const nieuweRitdelen = this.updateRitdelen(ritDelen, dtos);
|
|
4517
4709
|
this.store.dispatch(UpdateVisibleSignaleringsbeeldInfoDtos(dtos));
|
|
4518
4710
|
this.store.dispatch(updateRitDelen(nieuweRitdelen));
|
|
4519
4711
|
}
|
|
@@ -4526,11 +4718,11 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4526
4718
|
const visibleRitPplgs = visibleRitDelen.map(r => r.getPplg()).filter(this.distinct);
|
|
4527
4719
|
const visibleDtos = this.bepaalZichtbareDtos(visibleRitPplgs, storeDtos);
|
|
4528
4720
|
const loadingDtos = this.bepaalToLoadDtos(visibleDtos, ritDelen, visibleRitDelen, visibleRitPplgs, storeState);
|
|
4529
|
-
this.editorService.laadSignaleringsbeelden(
|
|
4721
|
+
this.editorService.laadSignaleringsbeelden(storeState.iaVersie.versie, loadingDtos).pipe(tap(svgDataUrls => {
|
|
4530
4722
|
this.verwerkSvgs(svgDataUrls);
|
|
4531
4723
|
this.updateState(ritDelen, visibleDtos, storeState, visibleRitPplgs, loadingDtos, isInit, storeDtos);
|
|
4532
4724
|
}), catchError(err => {
|
|
4533
|
-
this.
|
|
4725
|
+
this.messagesService.showMessage(MessageBuilder.rwpDataNietGevonden(Utils.getValidErorrMessage(err)));
|
|
4534
4726
|
throw err;
|
|
4535
4727
|
})).subscribe();
|
|
4536
4728
|
}
|
|
@@ -4545,10 +4737,6 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4545
4737
|
this.store.dispatch(updateRitDelen(nieuweRitdelen));
|
|
4546
4738
|
}, 0);
|
|
4547
4739
|
}
|
|
4548
|
-
createSignaleringsbeeldInfoQueryDto(pplgs, iainfo) {
|
|
4549
|
-
const datum = iainfo.ingangsDatum && !isNaN(iainfo.ingangsDatum.getTime()) ? iainfo.ingangsDatum.toISOString() : undefined;
|
|
4550
|
-
return { pplgs, versie: iainfo.versie, ingangsDatum: datum };
|
|
4551
|
-
}
|
|
4552
4740
|
verwerkSvgs(svgDataUrls) {
|
|
4553
4741
|
this.store.dispatch(SetSvgInfos(this.bepaalSvgInfos(svgDataUrls)));
|
|
4554
4742
|
}
|
|
@@ -4575,7 +4763,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4575
4763
|
bepaalZichtbareDtos(visibleRitPplgs, dtos) {
|
|
4576
4764
|
const visibleDtos = [];
|
|
4577
4765
|
visibleRitPplgs.forEach(pplg => {
|
|
4578
|
-
dtos.filter(dto => dto.pplgs
|
|
4766
|
+
dtos.filter(dto => dto.pplgs?.includes(pplg)).forEach(dto => {
|
|
4579
4767
|
if (!visibleDtos.includes(dto)) {
|
|
4580
4768
|
visibleDtos.push(dto);
|
|
4581
4769
|
}
|
|
@@ -4585,13 +4773,13 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4585
4773
|
dtos.filter(d => !visibleDtos.includes(d)).forEach(d => d.metVisualisatie = false);
|
|
4586
4774
|
return visibleDtos;
|
|
4587
4775
|
}
|
|
4588
|
-
distinct(value, index,
|
|
4589
|
-
return
|
|
4776
|
+
distinct(value, index, values) {
|
|
4777
|
+
return values.indexOf(value) === index;
|
|
4590
4778
|
}
|
|
4591
4779
|
addPrevNonVisibleDto(firstIdx, ritdelen, loadingDtos, visibleRitPplgs, allDtos) {
|
|
4592
4780
|
if (firstIdx >= 0) {
|
|
4593
4781
|
const pplg = ritdelen[firstIdx].getPplg();
|
|
4594
|
-
const ritdeelDtos = allDtos.filter(dto => dto.pplgs
|
|
4782
|
+
const ritdeelDtos = allDtos.filter(dto => dto.pplgs?.includes(pplg)).filter(dto => !loadingDtos.includes(dto));
|
|
4595
4783
|
if (!visibleRitPplgs.includes(pplg) && ritdeelDtos.length > 0) {
|
|
4596
4784
|
ritdeelDtos.filter(d => !loadingDtos.includes(d)).forEach(d => {
|
|
4597
4785
|
d.metVisualisatie = false;
|
|
@@ -4606,7 +4794,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4606
4794
|
addNextNonVisibleDto(lastIdx, ritdelen, loadingDtos, visibleRitPplgs, allDtos) {
|
|
4607
4795
|
if (lastIdx <= ritdelen.length - 1) {
|
|
4608
4796
|
const pplg = ritdelen[lastIdx].getPplg();
|
|
4609
|
-
const ritdeelDtos = allDtos.filter(dto => dto.pplgs
|
|
4797
|
+
const ritdeelDtos = allDtos.filter(dto => dto.pplgs?.includes(pplg)).filter(dto => !loadingDtos.includes(dto));
|
|
4610
4798
|
if (!visibleRitPplgs.includes(pplg) && ritdeelDtos.length > 0) {
|
|
4611
4799
|
ritdeelDtos.filter(d => !loadingDtos.includes(d)).forEach(d => {
|
|
4612
4800
|
d.metVisualisatie = false;
|
|
@@ -4675,7 +4863,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4675
4863
|
}
|
|
4676
4864
|
}
|
|
4677
4865
|
}
|
|
4678
|
-
this.
|
|
4866
|
+
this.updateZichtbaarheidAangrenzendeRitdelen(min, max, ritdelen, visibleDtos);
|
|
4679
4867
|
return this.updateZichtbaarheidBuitenWindow(ritdelen, visibleDtos);
|
|
4680
4868
|
}
|
|
4681
4869
|
updateZichtbaarheidBuitenWindow(nieuweRitdelen, visibleDtos) {
|
|
@@ -4691,7 +4879,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4691
4879
|
}
|
|
4692
4880
|
return nieuweRitdelen;
|
|
4693
4881
|
}
|
|
4694
|
-
|
|
4882
|
+
updateZichtbaarheidAangrenzendeRitdelen(min, max, nieuweRitdelen, visibleDtos) {
|
|
4695
4883
|
let i = min - 1;
|
|
4696
4884
|
while (i >= 0) {
|
|
4697
4885
|
i = this.updateZichtbaarHeid(i, 0, visibleDtos, nieuweRitdelen) - 1;
|
|
@@ -4727,9 +4915,11 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4727
4915
|
}
|
|
4728
4916
|
bevatGevisualiseerdePplg(visibleDtos, pplg) {
|
|
4729
4917
|
for (const dto of visibleDtos) {
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4918
|
+
if (dto.pplgs) {
|
|
4919
|
+
for (const dtopplg of dto.pplgs) {
|
|
4920
|
+
if (dtopplg === pplg) {
|
|
4921
|
+
return true;
|
|
4922
|
+
}
|
|
4733
4923
|
}
|
|
4734
4924
|
}
|
|
4735
4925
|
}
|
|
@@ -4779,7 +4969,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4779
4969
|
pplgsWindow.push(itemPplg);
|
|
4780
4970
|
}
|
|
4781
4971
|
const pplgDtos = [];
|
|
4782
|
-
dtos.filter(dto => dto.pplgs
|
|
4972
|
+
dtos.filter(dto => dto.pplgs?.includes(itemPplg)).forEach(dto => {
|
|
4783
4973
|
if (!pplgDtos.includes(dto)) {
|
|
4784
4974
|
pplgDtos.push(dto);
|
|
4785
4975
|
}
|
|
@@ -4826,11 +5016,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4826
5016
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: BewegingVerrijkerService }] });
|
|
4827
5017
|
|
|
4828
5018
|
class RitdelenEffect {
|
|
4829
|
-
constructor(actions$, store, sbmService,
|
|
5019
|
+
constructor(actions$, store, sbmService, editorService) {
|
|
4830
5020
|
this.actions$ = actions$;
|
|
4831
5021
|
this.store = store;
|
|
4832
5022
|
this.sbmService = sbmService;
|
|
4833
|
-
this.
|
|
5023
|
+
this.editorService = editorService;
|
|
4834
5024
|
this.updateRitDelen$ = createEffect(() => this.actions$.pipe(ofType(updateRitDelen), withLatestFrom(this.store), map(([actie, _storeState]) => {
|
|
4835
5025
|
const nieuweRitDelen = actie.ritDelen.map(ritDeel => ritDeel.isZichtbaar() ?
|
|
4836
5026
|
ritDeel.copyMetAlternatieveRoutes(this.sbmService.bepaalAlternativeRoutes(ritDeel.getRijweg())) : ritDeel);
|
|
@@ -4848,25 +5038,25 @@ class RitdelenEffect {
|
|
|
4848
5038
|
return setRitdelenAfterUpdate(ritDelen);
|
|
4849
5039
|
})));
|
|
4850
5040
|
this.ritdeelInvoegen$ = createEffect(() => this.actions$.pipe(ofType(ritdeelInvoegen), withLatestFrom(this.store), map(([actie, storeState]) => {
|
|
4851
|
-
const ritDelen = this.ritdeelInvoegenFunc(storeState.ritDelen, actie.nieuweRoute
|
|
5041
|
+
const ritDelen = this.ritdeelInvoegenFunc(storeState.ritDelen, actie.nieuweRoute);
|
|
4852
5042
|
return setRitdelenAfterUpdate(ritDelen);
|
|
4853
5043
|
})));
|
|
4854
5044
|
}
|
|
4855
|
-
ritdeelInvoegenFunc(ritDelen, nieuweRoute
|
|
5045
|
+
ritdeelInvoegenFunc(ritDelen, nieuweRoute) {
|
|
4856
5046
|
const origineelRitdeel = nieuweRoute.beginSeinOpRitdeel.ritdeel;
|
|
4857
5047
|
const beginSein = nieuweRoute.beginSeinOpRitdeel.sein;
|
|
4858
|
-
const rijwegplan =
|
|
5048
|
+
const rijwegplan = this.editorService.getRijwegplan(beginSein.getPPLG());
|
|
4859
5049
|
const dwangen = JsJavaUtil.listToArray(rijwegplan.getOnderliggendeDwangenTotEnVanSein(origineelRitdeel.getDwang(), beginSein));
|
|
4860
5050
|
const isSamengesteldeRoute = dwangen[0] && dwangen[1];
|
|
4861
5051
|
let newRitdeel1 = origineelRitdeel;
|
|
4862
5052
|
if (isSamengesteldeRoute) {
|
|
4863
|
-
newRitdeel1 = this.verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen,
|
|
5053
|
+
newRitdeel1 = this.verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, ritDelen);
|
|
4864
5054
|
}
|
|
4865
|
-
if (nieuweRoute.combinatieVoorEindsein
|
|
4866
|
-
this.extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute
|
|
5055
|
+
if (nieuweRoute.combinatieVoorEindsein?.isVrijeBaanRijweg()) {
|
|
5056
|
+
this.extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute);
|
|
4867
5057
|
}
|
|
4868
5058
|
else {
|
|
4869
|
-
this.maakNieuwRitdeel(newRitdeel1, nieuweRoute,
|
|
5059
|
+
this.maakNieuwRitdeel(newRitdeel1, nieuweRoute, ritDelen);
|
|
4870
5060
|
}
|
|
4871
5061
|
if (isSamengesteldeRoute) {
|
|
4872
5062
|
ritDelen.splice(ritDelen.indexOf(origineelRitdeel), 1);
|
|
@@ -4881,38 +5071,39 @@ class RitdelenEffect {
|
|
|
4881
5071
|
}
|
|
4882
5072
|
}
|
|
4883
5073
|
}
|
|
4884
|
-
verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen,
|
|
5074
|
+
verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, ritDelen) {
|
|
4885
5075
|
// dwangen in 2 nieuwe ritdelen verwerken voor de knip
|
|
4886
5076
|
const nieuweRijweg1 = rijwegplan.getRijwegVoorSeinen(dwangen[0].getRoute().getBeginSein(), dwangen[0].getRoute().getEindSein());
|
|
4887
5077
|
const dwangInfo1 = new RijwegplanRijwegDwangCombinatie(rijwegplan, nieuweRijweg1, dwangen[0]);
|
|
4888
|
-
const newRitdeel1 = new Ritdeel(dwangInfo1, [],
|
|
5078
|
+
const newRitdeel1 = new Ritdeel(dwangInfo1, [], undefined, undefined, undefined, []);
|
|
4889
5079
|
// remove vrijbaan info uit ritdeel
|
|
4890
|
-
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi =
|
|
4891
|
-
newRitdeel1.vervolgSpoor =
|
|
4892
|
-
newRitdeel1.bepaalTopologieElementen(sbmService);
|
|
5080
|
+
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi = undefined;
|
|
5081
|
+
newRitdeel1.vervolgSpoor = undefined;
|
|
5082
|
+
newRitdeel1.bepaalTopologieElementen(this.sbmService);
|
|
4893
5083
|
this.insertRitdeel(ritDelen, origineelRitdeel, newRitdeel1);
|
|
4894
5084
|
const nieuweRijweg2 = rijwegplan.getRijwegVoorSeinen(dwangen[1].getRoute().getBeginSein(), dwangen[1].getRoute().getEindSein());
|
|
4895
5085
|
const dwangInfo2 = new RijwegplanRijwegDwangCombinatie(rijwegplan, nieuweRijweg2, dwangen[1]);
|
|
4896
|
-
const newRitdeel2 = new Ritdeel(dwangInfo2, [],
|
|
4897
|
-
newRitdeel2.bepaalTopologieElementen(sbmService);
|
|
5086
|
+
const newRitdeel2 = new Ritdeel(dwangInfo2, [], undefined, undefined, undefined, []);
|
|
5087
|
+
newRitdeel2.bepaalTopologieElementen(this.sbmService);
|
|
4898
5088
|
this.insertRitdeel(ritDelen, newRitdeel1, newRitdeel2);
|
|
4899
5089
|
return newRitdeel1;
|
|
4900
5090
|
}
|
|
4901
|
-
extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute
|
|
5091
|
+
extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute) {
|
|
4902
5092
|
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi = nieuweRoute.combinatieVoorEindsein;
|
|
4903
|
-
const vbrwp = nieuweRoute.combinatieVoorEindsein
|
|
4904
|
-
newRitdeel1.vervolgSpoor =
|
|
4905
|
-
|
|
5093
|
+
const vbrwp = nieuweRoute.combinatieVoorEindsein?.rijwegplan;
|
|
5094
|
+
newRitdeel1.vervolgSpoor = nieuweRoute.combinatieVoorEindsein ?
|
|
5095
|
+
vbrwp.getVervolgSpoor(nieuweRoute.combinatieVoorEindsein?.rijweg) : undefined;
|
|
5096
|
+
newRitdeel1.bepaalTopologieElementen(this.sbmService);
|
|
4906
5097
|
}
|
|
4907
|
-
maakNieuwRitdeel(newRitdeel1, nieuweRoute,
|
|
5098
|
+
maakNieuwRitdeel(newRitdeel1, nieuweRoute, ritDelen) {
|
|
4908
5099
|
let newRitdeel = this.createRitdeel(nieuweRoute);
|
|
4909
|
-
const altRoutes = sbmService.bepaalAlternativeRoutes(newRitdeel.getRijweg());
|
|
5100
|
+
const altRoutes = this.sbmService.bepaalAlternativeRoutes(newRitdeel.getRijweg());
|
|
4910
5101
|
newRitdeel = newRitdeel.copyMetAlternatieveRoutes(altRoutes);
|
|
4911
|
-
newRitdeel.bepaalTopologieElementen(sbmService);
|
|
5102
|
+
newRitdeel.bepaalTopologieElementen(this.sbmService);
|
|
4912
5103
|
this.insertRitdeel(ritDelen, newRitdeel1, newRitdeel);
|
|
4913
5104
|
}
|
|
4914
5105
|
createRitdeel(nieuweRoute) {
|
|
4915
|
-
return new Ritdeel(nieuweRoute.combinatieVoorEindsein, [],
|
|
5106
|
+
return new Ritdeel(nieuweRoute.combinatieVoorEindsein, [], undefined, undefined, undefined, []);
|
|
4916
5107
|
}
|
|
4917
5108
|
insertRitdeel(ritdelen, naRitdeelPositie, newRitdeel) {
|
|
4918
5109
|
const idx = ritdelen.indexOf(naRitdeelPositie);
|
|
@@ -4926,29 +5117,57 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4926
5117
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: SignaleringsBeeldManagerService }, { type: EditorService }] });
|
|
4927
5118
|
|
|
4928
5119
|
class SvgViewEffect {
|
|
4929
|
-
constructor(actions$, store,
|
|
5120
|
+
constructor(actions$, store, sbSvgUtilService, svgService) {
|
|
4930
5121
|
this.actions$ = actions$;
|
|
4931
5122
|
this.store = store;
|
|
4932
|
-
this.signaleringsBeeldManagerService = signaleringsBeeldManagerService;
|
|
4933
5123
|
this.sbSvgUtilService = sbSvgUtilService;
|
|
4934
|
-
this.
|
|
5124
|
+
this.svgService = svgService;
|
|
5125
|
+
this.updateSvgView$ = createEffect(() => this.actions$.pipe(ofType(SetSvgInfos), withLatestFrom(this.store), switchMap(([_actie, storeState]) => this.svgService.getSvgInfo(storeState.iaVersie.versie, storeState.signaleringsbeeldInfoDtos)), map((svgInfo) => {
|
|
4935
5126
|
setTimeout(() => {
|
|
5127
|
+
console.log('SVG INFO RECEIVED, updating SVG view');
|
|
5128
|
+
const svgTopology = svgInfo.topology;
|
|
5129
|
+
if (!svgTopology) {
|
|
5130
|
+
return;
|
|
5131
|
+
}
|
|
4936
5132
|
this.sbSvgUtilService.addSvgDefs();
|
|
4937
5133
|
const wisselEnStoringskaderPuicMap = new Map();
|
|
4938
|
-
|
|
4939
|
-
|
|
5134
|
+
svgTopology.alleSoortenWissels
|
|
5135
|
+
?.forEach(wissel => wisselEnStoringskaderPuicMap.set(wissel.puic, wissel.storingSymboolPuic));
|
|
4940
5136
|
this.sbSvgUtilService.zetClassOpStoringSymbolenMetMap(wisselEnStoringskaderPuicMap);
|
|
4941
|
-
this.sbSvgUtilService.zetClassOpSpoornummers(
|
|
5137
|
+
this.sbSvgUtilService.zetClassOpSpoornummers(svgTopology.puicVoorSpoorNummers ?? []);
|
|
4942
5138
|
this.sbSvgUtilService.maakOngewensteElementenOnzichtbaar();
|
|
4943
5139
|
this.sbSvgUtilService.zetClassOpLangeText();
|
|
4944
|
-
|
|
4945
|
-
this.sbSvgUtilService.
|
|
4946
|
-
|
|
5140
|
+
const seinen = svgTopology.seinen?.map(this.toSbSein) ?? [];
|
|
5141
|
+
this.sbSvgUtilService.maakOngewensteSeindelenOnzichtbaar(seinen);
|
|
5142
|
+
this.sbSvgUtilService.maakSignaleringsElementenOnzichtbaar(svgTopology.signaleringsElementen
|
|
5143
|
+
?.map(signaleringsElement => this.toSbSignaleringsElement(signaleringsElement)) ?? []);
|
|
5144
|
+
const puicsVoorRanden = svgTopology.puicVoorRanden ?? [];
|
|
4947
5145
|
this.zetClassOpRanden(puicsVoorRanden);
|
|
4948
|
-
this.sbSvgUtilService.zetClassOpRijrichtingen(
|
|
5146
|
+
this.sbSvgUtilService.zetClassOpRijrichtingen(seinen);
|
|
4949
5147
|
this.store.dispatch(SetConnectorenClickableIds(puicsVoorRanden));
|
|
5148
|
+
this.store.dispatch(svgUpdateFinished());
|
|
4950
5149
|
}, 0);
|
|
4951
5150
|
})), { dispatch: false });
|
|
5151
|
+
this.updateSelectieInfos$ = createEffect(() => this.actions$.pipe(ofType(svgUpdateFinished), switchMap(() => combineLatest([
|
|
5152
|
+
this.store.select('ritSelectieIds'),
|
|
5153
|
+
this.store.select('actieOpRitSelectieIds'),
|
|
5154
|
+
this.store.select('ongeplandeActieSelectieIds'),
|
|
5155
|
+
this.store.select('gebrokenRitSelectieIds'),
|
|
5156
|
+
this.store.select('alternatievenSelectieIds'),
|
|
5157
|
+
this.store.select('beginSeinSelectieIds'),
|
|
5158
|
+
this.store.select('eindSeinSelectieIds')
|
|
5159
|
+
]).pipe(map(([rit, actieOpRitSelectieIds, ongeplandeActieSelectieIds, gebrokenRit, alternatieven, begin, eind]) => {
|
|
5160
|
+
return setSelectieInfos([
|
|
5161
|
+
new SelectieInfo(rit, 'rit'),
|
|
5162
|
+
new SelectieInfo(actieOpRitSelectieIds, 'actieoprit'),
|
|
5163
|
+
new SelectieInfo(ongeplandeActieSelectieIds, 'ongeplandeActie'),
|
|
5164
|
+
new SelectieInfo(gebrokenRit, 'gebrokenrit'),
|
|
5165
|
+
new SelectieInfo(alternatieven, 'alternatieveRoute'),
|
|
5166
|
+
new SelectieInfo(begin, 'zigzagVan'),
|
|
5167
|
+
new SelectieInfo(eind, 'zigzagNaar')
|
|
5168
|
+
]);
|
|
5169
|
+
})))));
|
|
5170
|
+
this.store.select('baseUrl').pipe(filter(baseUrl => !!baseUrl), take(1), tap(baseUrl => svgService.configuration.basePath = baseUrl + '/mst')).subscribe();
|
|
4952
5171
|
}
|
|
4953
5172
|
zetClassOpRanden(puics) {
|
|
4954
5173
|
puics.forEach(element => {
|
|
@@ -4956,12 +5175,35 @@ class SvgViewEffect {
|
|
|
4956
5175
|
rand?.classList.add('connector');
|
|
4957
5176
|
});
|
|
4958
5177
|
}
|
|
4959
|
-
|
|
5178
|
+
toSbSein(sein) {
|
|
5179
|
+
return {
|
|
5180
|
+
getPuic: () => sein.puic,
|
|
5181
|
+
isBediend: () => sein.bediend,
|
|
5182
|
+
getType: () => sein.type
|
|
5183
|
+
};
|
|
5184
|
+
}
|
|
5185
|
+
toSbSignaleringsElement(signaleringsElement) {
|
|
5186
|
+
return {
|
|
5187
|
+
getPuic: () => signaleringsElement.puic
|
|
5188
|
+
};
|
|
5189
|
+
}
|
|
5190
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SvgViewEffect, deps: [{ token: i1$2.Actions }, { token: i2$1.Store }, { token: i3.SignaleringsbeeldSvgUtilityService }, { token: SvgControllerService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
4960
5191
|
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SvgViewEffect }); }
|
|
4961
5192
|
}
|
|
4962
5193
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: SvgViewEffect, decorators: [{
|
|
4963
5194
|
type: Injectable
|
|
4964
|
-
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type:
|
|
5195
|
+
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: i3.SignaleringsbeeldSvgUtilityService }, { type: SvgControllerService }] });
|
|
5196
|
+
|
|
5197
|
+
class ProgressIndicator {
|
|
5198
|
+
constructor(lowerText, upperText, iconClass) {
|
|
5199
|
+
this.lowerText = '';
|
|
5200
|
+
this.upperText = '';
|
|
5201
|
+
this.iconClass = '';
|
|
5202
|
+
this.lowerText = lowerText ?? this.lowerText;
|
|
5203
|
+
this.upperText = upperText ?? this.upperText;
|
|
5204
|
+
this.iconClass = iconClass ?? this.iconClass;
|
|
5205
|
+
}
|
|
5206
|
+
}
|
|
4965
5207
|
|
|
4966
5208
|
class NieuweRoute {
|
|
4967
5209
|
constructor(beginSeinOpRitdeel, combinatieVoorEindsein) {
|
|
@@ -4969,7 +5211,7 @@ class NieuweRoute {
|
|
|
4969
5211
|
this.combinatieVoorEindsein = combinatieVoorEindsein;
|
|
4970
5212
|
}
|
|
4971
5213
|
isValid() {
|
|
4972
|
-
return this.combinatieVoorEindsein
|
|
5214
|
+
return !!this.combinatieVoorEindsein;
|
|
4973
5215
|
}
|
|
4974
5216
|
}
|
|
4975
5217
|
|
|
@@ -5035,10 +5277,11 @@ function addRitdeelActieFunc(ritDelen, { ritDeel, actie }) {
|
|
|
5035
5277
|
const onIdsActionHandler = (action) => on(action, (_, { ids }) => ids);
|
|
5036
5278
|
const createIdsReducer = (action) => createReducer([], onIdsActionHandler(action));
|
|
5037
5279
|
const editableReducer = createReducer(true, on(setEditable, (_, { editable }) => editable));
|
|
5038
|
-
const progressIndicatorReducer = createReducer(
|
|
5280
|
+
const progressIndicatorReducer = createReducer({}, on(ShowProgress, () => ({ progressIndicator: new ProgressIndicator() })), on(ClearProgress, () => ({})));
|
|
5039
5281
|
const svgInfoReducer = createReducer([], on(SetSvgInfos, (_, { svgInfos }) => svgInfos));
|
|
5040
5282
|
const debugReducer = createReducer(false, on(SetDebug, (_, { debug }) => debug));
|
|
5041
5283
|
const ritSelectieIdsReducer = createIdsReducer(SetRitSelectieIds);
|
|
5284
|
+
const selectieInfosReducer = createReducer([], on(setSelectieInfos, (_, { selectieInfos }) => selectieInfos));
|
|
5042
5285
|
const actieOpRitReducer = createReducer(new ArrayMultimap(), on(SetGeplandeActies, (_, { geplandeActiesMap }) => geplandeActiesMap), on(AddGeplandeActie, (geplandeActies, { actie, puics }) => {
|
|
5043
5286
|
geplandeActies.putAll(actie, puics);
|
|
5044
5287
|
return new ArrayMultimap(geplandeActies);
|
|
@@ -5061,12 +5304,10 @@ const ongeplandeActieReducer = createReducer(new ArrayMultimap(), on(SetOngeplan
|
|
|
5061
5304
|
ongeplandeActie.puics.forEach(puic => ongeplandeActies.delete(puic, ongeplandeActie));
|
|
5062
5305
|
return new ArrayMultimap(ongeplandeActies);
|
|
5063
5306
|
}));
|
|
5064
|
-
const ongeplandeActieSelectieIdsReducer = createReducer([],
|
|
5065
|
-
// on(MstActions.SetOngeplandeActieSelectieIds, (_, { ids }) => ids),
|
|
5066
|
-
onIdsActionHandler(SetOngeplandeActieSelectieIds), on(AddOngeplandeActie, (ids, { ongeplandeActie }) => {
|
|
5307
|
+
const ongeplandeActieSelectieIdsReducer = createReducer([], onIdsActionHandler(SetOngeplandeActieSelectieIds), on(AddOngeplandeActie, (ids, { ongeplandeActie }) => {
|
|
5067
5308
|
ongeplandeActie.puics.filter(puic => !ids.includes(puic)).forEach(puic => ids.push(puic));
|
|
5068
5309
|
return [...ids];
|
|
5069
|
-
}), on(DeleteOngeplandeActieSelectieId, (ids, { id }) =>
|
|
5310
|
+
}), on(DeleteOngeplandeActieSelectieId, (ids, { id }) => ids.includes(id) ? ids.filter(_id => _id !== id) : ids));
|
|
5070
5311
|
const gebrokenRitSelectieIdsReducer = createIdsReducer(SetGebrokenRitSelectieIds);
|
|
5071
5312
|
const alternatievenSelectieIdsReducer = createIdsReducer(SetAlternatievenSelectieIds);
|
|
5072
5313
|
const beginSeinSelectieIdsReducer = createIdsReducer(SetBeginSeinSelectieIds);
|
|
@@ -5075,16 +5316,15 @@ const alternatievenClickableIdsReducer = createIdsReducer(SetAlternatievenClicka
|
|
|
5075
5316
|
const eindSeinenClickableIdsReducer = createIdsReducer(SetEindSeinenClickableIds);
|
|
5076
5317
|
const connectorClickableIdsReducer = createIdsReducer(SetConnectorenClickableIds);
|
|
5077
5318
|
const beginSeinRightClickableIdsReducer = createIdsReducer(SetBeginSeinRightClickableIds);
|
|
5078
|
-
const nieuweRouteReducer = createReducer(
|
|
5319
|
+
const nieuweRouteReducer = createReducer(undefined, on(SetNieuwRouteBeginSein, (_, { startSeinOpRitdeel }) => new NieuweRoute(startSeinOpRitdeel, undefined)), on(SetNieuwRouteEindSein, (nieuweRoute, { combinatieVoorEindsein }) => nieuweRoute ? new NieuweRoute(nieuweRoute.beginSeinOpRitdeel, combinatieVoorEindsein) : undefined), on(ResetNieuweRoute, () => undefined));
|
|
5079
5320
|
const signaleringsbeeldInfoDtosReducer = createReducer([], on(SetSignaleringsbeeldInfoDtos, (_, { dtos }) => dtos), on(UpdateSignaleringsbeeldInfoDtos, (_, { dtos }) => [...dtos]));
|
|
5080
5321
|
const visibleSbInfoDtosReducer = createReducer([], on(SetVisibleSignaleringsbeeldInfoDtos, (_, { dtos }) => dtos), on(UpdateVisibleSignaleringsbeeldInfoDtos, (_, { dtos }) => [...dtos]));
|
|
5081
|
-
const iaVersieReducer = createReducer({}, on(SetIaVersie, (_, { iaVersie }) => Object.assign({}, iaVersie, { versie: iaVersie.versie.toUpperCase() })));
|
|
5322
|
+
const iaVersieReducer = createReducer({ versie: 'unknown', ingangsDatum: new Date() }, on(SetIaVersie, (_, { iaVersie }) => Object.assign({}, iaVersie, { versie: iaVersie.versie.toUpperCase() })));
|
|
5082
5323
|
const algemeneRitInfoDtoReducer = createReducer({}, on(SetAlgemeneRitInfo, (_, { algemeneRitInfoDto }) => algemeneRitInfoDto));
|
|
5083
5324
|
const ongeplandeActiesBepaaldReducer = createReducer(false, on(SetOngeplandeActiesBepaald, (_, { bepaald }) => bepaald));
|
|
5084
|
-
const nieuweBewegingReducer = createReducer(
|
|
5085
|
-
const baseUrlReducer = createReducer(
|
|
5086
|
-
const focusIdsReducer = createReducer(
|
|
5087
|
-
const selectedRitdeelIdReducer = createReducer({}, on(SetSelectedRitdeel, (_, { id }) => id));
|
|
5325
|
+
const nieuweBewegingReducer = createReducer([], on(UpdateRit, (_, { bewegingen }) => bewegingen));
|
|
5326
|
+
const baseUrlReducer = createReducer('', on(SetBaseUrl, (_, { baseUrl }) => baseUrl));
|
|
5327
|
+
const focusIdsReducer = createReducer([], on(focusOpIds, (_, { puics }) => puics));
|
|
5088
5328
|
const storeReducers = {
|
|
5089
5329
|
ritDelen: ritdelenReducer,
|
|
5090
5330
|
ritSelectieIds: ritSelectieIdsReducer,
|
|
@@ -5113,9 +5353,10 @@ const storeReducers = {
|
|
|
5113
5353
|
nieuweBewegingen: nieuweBewegingReducer,
|
|
5114
5354
|
baseUrl: baseUrlReducer,
|
|
5115
5355
|
focusIds: focusIdsReducer,
|
|
5116
|
-
|
|
5356
|
+
selectieInfos: selectieInfosReducer
|
|
5117
5357
|
};
|
|
5118
5358
|
|
|
5359
|
+
// @ts-nocheck
|
|
5119
5360
|
class ZoneUtil {
|
|
5120
5361
|
constructor(ngZone) {
|
|
5121
5362
|
this.ngZone = ngZone;
|
|
@@ -5178,6 +5419,7 @@ class MstViewerModule {
|
|
|
5178
5419
|
constructor(service, zoneUtil) {
|
|
5179
5420
|
this.service = service;
|
|
5180
5421
|
// maak de EditorService toegankelijk voor GWT code
|
|
5422
|
+
// @ts-ignore
|
|
5181
5423
|
window['rpe'] = {
|
|
5182
5424
|
EditorService: zoneUtil.proxy(service)
|
|
5183
5425
|
};
|