@loxia/mst-viewer 8.1.3-202511180742 → 8.1.3-202511180833
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/lib/atomic-components/message/message.component.mjs +3 -3
- package/esm2022/lib/atomic-components/progress-indicator/progress-indicator.entity.mjs +4 -7
- package/esm2022/lib/components/mstviewer/mstviewer.component.mjs +4 -10
- package/esm2022/lib/components/ritdelen-lijst/ritdelen-lijst.component.mjs +12 -18
- package/esm2022/lib/components/rpe/rpe.component.mjs +2 -6
- package/esm2022/lib/components/svg-visualisatie/svg-visualisatie.component.mjs +7 -8
- package/esm2022/lib/components/viewer-controls/viewer-controls.component.mjs +3 -7
- package/esm2022/lib/model/nieuwe-route.mjs +2 -2
- package/esm2022/lib/model/ritdeel.mjs +4 -4
- package/esm2022/lib/mst-viewer.module.mjs +5 -6
- package/esm2022/lib/resources/signaleringsbeeldinfo.resource.mjs +1 -2
- package/esm2022/lib/services/base-rest.service.mjs +1 -3
- package/esm2022/lib/services/editor.service.mjs +1 -3
- package/esm2022/lib/services/rit-lezer.service.mjs +4 -4
- package/esm2022/lib/services/signalerings-beeld-manager.service.mjs +1 -1
- package/esm2022/lib/state/actions/actions.mjs +4 -2
- package/esm2022/lib/state/effect/bepaal-ongeplande-acties.effect.mjs +7 -8
- 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/laad-route-files.effect.mjs +2 -2
- package/esm2022/lib/state/effect/laad-signaleringsbeelden.effect.mjs +13 -13
- package/esm2022/lib/state/effect/ritdelen.effect.mjs +25 -26
- package/esm2022/lib/state/mst-editor-state.mjs +13 -10
- package/esm2022/lib/state/reducer/rit-delen.reducer.mjs +1 -1
- package/esm2022/lib/util/actie-helper.mjs +19 -23
- package/esm2022/lib/util/actie-popover-bepaler.mjs +2 -2
- package/esm2022/lib/util/logging-helper.mjs +33 -31
- package/esm2022/lib/util/multi-map.mjs +3 -2
- package/esm2022/lib/util/utils.mjs +5 -2
- package/esm2022/lib/util/zone-util.mjs +1 -2
- package/fesm2022/loxia-mst-viewer.mjs +251 -282
- package/fesm2022/loxia-mst-viewer.mjs.map +1 -1
- 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/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 +1 -1
- package/lib/components/viewer-controls/viewer-controls.component.d.ts +2 -2
- package/lib/model/nieuwe-route.d.ts +2 -2
- package/lib/model/ritdeel.d.ts +6 -7
- package/lib/state/actions/actions.d.ts +6 -1
- package/lib/state/effect/bepaal-ongeplande-acties.effect.d.ts +1 -2
- package/lib/state/effect/delete-ongeplande-actie.effect.d.ts +1 -1
- package/lib/state/effect/laad-route-files.effect.d.ts +1 -2
- package/lib/state/effect/laad-signaleringsbeelden.effect.d.ts +9 -9
- package/lib/state/effect/ritdelen.effect.d.ts +6 -7
- package/lib/state/mst-editor-state.d.ts +83 -20
- package/lib/util/actie-helper.d.ts +4 -4
- package/lib/util/logging-helper.d.ts +1 -2
- package/lib/util/utils.d.ts +1 -0
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ 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,
|
|
15
|
-
import { filter, map,
|
|
14
|
+
import { BehaviorSubject, from, Subscription, combineLatest, of, throwError } from 'rxjs';
|
|
15
|
+
import { take, filter, map, catchError, withLatestFrom, switchMap, tap } 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';
|
|
@@ -41,7 +41,7 @@ class MessageComponent {
|
|
|
41
41
|
this.onClearMessage = new EventEmitter();
|
|
42
42
|
}
|
|
43
43
|
ngOnInit() {
|
|
44
|
-
if (this.message
|
|
44
|
+
if (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,84 +124,6 @@ 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, iaversieinfo) => ({ ritDelen, paginationSize, iaversieinfo }));
|
|
142
|
-
const setRitdelenAfterUpdate = createAction(SET_RIT_DELEN_AFTER_UPDATE, (ritDelen) => ({ ritDelen }));
|
|
143
|
-
const navigeer = createAction(NAVIGEER, (stapSize, paginationSize, iaversieinfo) => ({ stapSize, paginationSize, iaversieinfo }));
|
|
144
|
-
const navigeerVanaf = createAction(NAVIGEER_VANAF, (paginationSize, iaversieinfo, ritdeel) => ({ paginationSize, iaversieinfo, 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.ritdelen$ = this.store.select('ritDelen').pipe(filter(r => r?.length > 0));
|
|
176
|
-
this.kanLinks$ = this.ritdelen$.pipe(map(r => this.kanLinksNavigeren(r)));
|
|
177
|
-
this.kanRechts$ = this.ritdelen$.pipe(map(r => this.kanRechtsNavigeren(r)));
|
|
178
|
-
}
|
|
179
|
-
kanLinksNavigeren(ritDelen) {
|
|
180
|
-
return ritDelen.length > this.paginationSize && !ritDelen[0].isBinnenWindow();
|
|
181
|
-
}
|
|
182
|
-
kanRechtsNavigeren(ritDelen) {
|
|
183
|
-
return ritDelen.length > this.paginationSize && !ritDelen[ritDelen.length - 1].isBinnenWindow();
|
|
184
|
-
}
|
|
185
|
-
navigeerNaarLinks(event) {
|
|
186
|
-
this.store.dispatch(navigeer(event?.ctrlKey ? -1 : -(this.paginationSize - 1), this.paginationSize, this.iaversieinfo));
|
|
187
|
-
}
|
|
188
|
-
navigeerNaarRechts(event) {
|
|
189
|
-
this.store.dispatch(navigeer(event?.ctrlKey ? 1 : this.paginationSize - 1, this.paginationSize, this.iaversieinfo));
|
|
190
|
-
}
|
|
191
|
-
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 }); }
|
|
192
|
-
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" }] }); }
|
|
193
|
-
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImport: i0, type: CarouselControlsComponent, decorators: [{
|
|
195
|
-
type: Component,
|
|
196
|
-
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"] }]
|
|
197
|
-
}], ctorParameters: () => [{ type: i2$1.Store }], propDecorators: { paginationSize: [{
|
|
198
|
-
type: Input
|
|
199
|
-
}], iaversieinfo: [{
|
|
200
|
-
type: Input
|
|
201
|
-
}], sideNavOpen: [{
|
|
202
|
-
type: Input
|
|
203
|
-
}] } });
|
|
204
|
-
|
|
205
127
|
const version = '8.1.3-SNAPSHOT';
|
|
206
128
|
|
|
207
129
|
const SET_EDITABLE = '[mst] SetEditable';
|
|
@@ -291,6 +213,7 @@ const navigeerBuitenRit = createAction(NAVIGEER_BUITEN_RIT, (randPuic) => ({ ran
|
|
|
291
213
|
const focusOpRitdeel = createAction(FOCUS_OP_RITDEEL, (ritdeel, paginationSize, iaVersieInfo) => ({ ritdeel, paginationSize, iaVersieInfo }));
|
|
292
214
|
const focusOpIds = createAction(FOCUS_OP_IDS, (puics) => ({ puics }));
|
|
293
215
|
const bepaalSbInfos = createAction(BEPAAL_SB_INFOS, (rit, ongeplandeActies, iaVersie, ritGewijzigdToegestaan, paginationSize) => ({ rit, ongeplandeActies, iaVersie, ritGewijzigdToegestaan, paginationSize }));
|
|
216
|
+
const SetSelectedRitdeel = createAction(SET_SELECTED_RITDEEL, (id) => ({ id }));
|
|
294
217
|
// do not export return value
|
|
295
218
|
const mstActions = union({
|
|
296
219
|
setEditable,
|
|
@@ -328,9 +251,89 @@ const mstActions = union({
|
|
|
328
251
|
ClearProgress,
|
|
329
252
|
BewegingInvoegen,
|
|
330
253
|
KeurAlleActiesGoed,
|
|
331
|
-
UpdateRit
|
|
254
|
+
UpdateRit,
|
|
255
|
+
setSelectedRitdeel: SetSelectedRitdeel
|
|
332
256
|
});
|
|
333
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
|
|
300
|
+
});
|
|
301
|
+
|
|
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
|
+
|
|
334
337
|
/**
|
|
335
338
|
* https://gist.github.com/jordanluyke/609a4fffb69d1ebafdadd313ee2ee804
|
|
336
339
|
*
|
|
@@ -394,7 +397,7 @@ class ArrayMultimap {
|
|
|
394
397
|
return Array.from(new Set(this._entries.map(entry => entry.key)));
|
|
395
398
|
}
|
|
396
399
|
values() {
|
|
397
|
-
return this._entries
|
|
400
|
+
return Utils.flatMap(this._entries, x => x.value);
|
|
398
401
|
}
|
|
399
402
|
put(key, value) {
|
|
400
403
|
this._entries.push(new MultimapEntry(key, value));
|
|
@@ -500,7 +503,6 @@ class EditorService {
|
|
|
500
503
|
this.signaleringsBeeldManagerService = signaleringsBeeldManagerService;
|
|
501
504
|
this.initReadyPromise();
|
|
502
505
|
}
|
|
503
|
-
// Called from GWT only, can be removed when GWT is gone. any is used because it will be removed with GWT
|
|
504
506
|
setEditor(editor) {
|
|
505
507
|
this.editor = editor;
|
|
506
508
|
this.resolveReadyPromise();
|
|
@@ -508,7 +510,6 @@ class EditorService {
|
|
|
508
510
|
isReady() {
|
|
509
511
|
return this.promise;
|
|
510
512
|
}
|
|
511
|
-
// Called from GWT only, can be removed when GWT is gone
|
|
512
513
|
setSignaleringsBeeldManager(signaleringsBeeldManager) {
|
|
513
514
|
this.signaleringsBeeldManagerService.set(signaleringsBeeldManager);
|
|
514
515
|
}
|
|
@@ -885,12 +886,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
885
886
|
}], ctorParameters: () => [{ type: i2$1.Store }, { type: ViewerControlService }, { type: SignaleringsBeeldManagerService }] });
|
|
886
887
|
|
|
887
888
|
class RpeComponent {
|
|
888
|
-
constructor() {
|
|
889
|
-
this.baseurl = '';
|
|
890
|
-
this.path = '';
|
|
891
|
-
}
|
|
892
889
|
convertToScript() {
|
|
893
|
-
const element = this.script
|
|
890
|
+
const element = this.script.nativeElement;
|
|
894
891
|
const script = document.createElement('script');
|
|
895
892
|
script.type = 'text/javascript';
|
|
896
893
|
if (this.baseurl && this.path) {
|
|
@@ -990,38 +987,6 @@ class MeldingBuilder {
|
|
|
990
987
|
}
|
|
991
988
|
}
|
|
992
989
|
|
|
993
|
-
class Utils {
|
|
994
|
-
static getValidErorrMessage(err) {
|
|
995
|
-
let errorMsg = '';
|
|
996
|
-
if (err.msg) {
|
|
997
|
-
errorMsg += err.msg;
|
|
998
|
-
}
|
|
999
|
-
if (Array.isArray(err.body)) {
|
|
1000
|
-
err.body.forEach((x) => errorMsg += x);
|
|
1001
|
-
}
|
|
1002
|
-
else if (err.body) {
|
|
1003
|
-
if (err.body instanceof ProgressEvent) {
|
|
1004
|
-
errorMsg = 'Kon geen verbinding maken met de server';
|
|
1005
|
-
}
|
|
1006
|
-
else if (err.body.text) {
|
|
1007
|
-
errorMsg += err.body.text;
|
|
1008
|
-
}
|
|
1009
|
-
else {
|
|
1010
|
-
errorMsg += err.body;
|
|
1011
|
-
}
|
|
1012
|
-
}
|
|
1013
|
-
if (err.message) {
|
|
1014
|
-
errorMsg += err.message;
|
|
1015
|
-
}
|
|
1016
|
-
if (typeof err === 'string' || err instanceof String) {
|
|
1017
|
-
errorMsg += err;
|
|
1018
|
-
}
|
|
1019
|
-
if (errorMsg !== '') {
|
|
1020
|
-
return errorMsg;
|
|
1021
|
-
}
|
|
1022
|
-
}
|
|
1023
|
-
}
|
|
1024
|
-
|
|
1025
990
|
class MessageBuilder {
|
|
1026
991
|
static rwpDataNietGevonden(err) {
|
|
1027
992
|
return new Message(Severity.ERROR, 'Error bij ophalen van rijwegplan data: ' + err);
|
|
@@ -2407,35 +2372,38 @@ class LoggingHelper {
|
|
|
2407
2372
|
this.store = store;
|
|
2408
2373
|
}
|
|
2409
2374
|
maakLogDTO(melding, actie) {
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
meldingLevel: melding.meldingLevel,
|
|
2433
|
-
meldingMessage: melding.meldingMessage,
|
|
2434
|
-
actieDto,
|
|
2435
|
-
algemeneRitInfoDto,
|
|
2436
|
-
sbinfoDtos: this.getSbInfoDtos()
|
|
2375
|
+
let iaVersie = '';
|
|
2376
|
+
let algemeneRitInfoDto = null;
|
|
2377
|
+
let actieDto = null;
|
|
2378
|
+
this.store.select('algemeneRitInfoDto').pipe(take(1)).subscribe(dto => {
|
|
2379
|
+
algemeneRitInfoDto = dto;
|
|
2380
|
+
});
|
|
2381
|
+
this.store.select('iaVersie').pipe(take(1)).subscribe(ia => {
|
|
2382
|
+
iaVersie = ia.versie;
|
|
2383
|
+
});
|
|
2384
|
+
if (actie) {
|
|
2385
|
+
actieDto = {
|
|
2386
|
+
pplgNaam: actie.pplgNaam,
|
|
2387
|
+
ritActieTypeOmschrijving: actie.ritActieTypeOmschrijving,
|
|
2388
|
+
ritActieStatus: actie.ritActieStatus,
|
|
2389
|
+
bewegingId: actie.bewegingId,
|
|
2390
|
+
wisselType: actie.wisselType,
|
|
2391
|
+
wisselNaam: actie.wisselNaam,
|
|
2392
|
+
wisselKantCode: actie.wisselKantCode,
|
|
2393
|
+
vanKilometerlint: actie.vanKilometerlint,
|
|
2394
|
+
vanKilometrering: actie.vanKilometrering,
|
|
2395
|
+
totKilometerlint: actie.totKilometerlint,
|
|
2396
|
+
totKilometrering: actie.totKilometrering
|
|
2437
2397
|
};
|
|
2438
|
-
}
|
|
2398
|
+
}
|
|
2399
|
+
return {
|
|
2400
|
+
iaVersie,
|
|
2401
|
+
meldingLevel: melding.meldingLevel,
|
|
2402
|
+
meldingMessage: melding.meldingMessage,
|
|
2403
|
+
actieDto,
|
|
2404
|
+
algemeneRitInfoDto,
|
|
2405
|
+
sbinfoDtos: this.getSbInfoDtos()
|
|
2406
|
+
};
|
|
2439
2407
|
}
|
|
2440
2408
|
getSbInfoDtos() {
|
|
2441
2409
|
const sbInfoDtos = [];
|
|
@@ -2547,7 +2515,6 @@ class ActieHelper {
|
|
|
2547
2515
|
this.messagesService = messagesService;
|
|
2548
2516
|
this.store = store;
|
|
2549
2517
|
this.loggingHelper = loggingHelper;
|
|
2550
|
-
this.debug = false;
|
|
2551
2518
|
this.store.select('debug').subscribe(debug => this.debug = debug);
|
|
2552
2519
|
}
|
|
2553
2520
|
static getActieTopoElements(ritDeel, sbmService) {
|
|
@@ -2581,10 +2548,10 @@ class ActieHelper {
|
|
|
2581
2548
|
}
|
|
2582
2549
|
}
|
|
2583
2550
|
static actieComparator(actie1, actie2) {
|
|
2584
|
-
if (actie1.vanKilometrering
|
|
2551
|
+
if (actie1.vanKilometrering !== actie2.vanKilometrering) {
|
|
2585
2552
|
return actie1.vanKilometrering > actie2.vanKilometrering ? 1 : -1;
|
|
2586
2553
|
}
|
|
2587
|
-
if (actie1.ritActieTypeOmschrijving
|
|
2554
|
+
if (actie1.ritActieTypeOmschrijving !== actie2.ritActieTypeOmschrijving) {
|
|
2588
2555
|
return actie1.ritActieTypeOmschrijving > actie2.ritActieTypeOmschrijving ? 1 : -1;
|
|
2589
2556
|
}
|
|
2590
2557
|
if (actie1.wisselNaam !== actie2.wisselNaam) {
|
|
@@ -2624,9 +2591,9 @@ class ActieHelper {
|
|
|
2624
2591
|
// make sure the elems are sorted in ascending order
|
|
2625
2592
|
static sorteerTopoElementen(topoElems) {
|
|
2626
2593
|
const topoElementen = topoElems.slice();
|
|
2627
|
-
let lint =
|
|
2628
|
-
let first;
|
|
2629
|
-
let second;
|
|
2594
|
+
let lint = null;
|
|
2595
|
+
let first = null;
|
|
2596
|
+
let second = null;
|
|
2630
2597
|
for (const topoElement of topoElementen) {
|
|
2631
2598
|
let kilometreringen = null;
|
|
2632
2599
|
const kms = JsJavaUtil.listToArray(topoElement.getKilometreringen());
|
|
@@ -2638,7 +2605,7 @@ class ActieHelper {
|
|
|
2638
2605
|
lint = kilometreringen[0].getKmLint();
|
|
2639
2606
|
}
|
|
2640
2607
|
else if (kilometreringen && first && !second) {
|
|
2641
|
-
const km = KmRange.getKilometrering(lint
|
|
2608
|
+
const km = KmRange.getKilometrering(lint, kilometreringen);
|
|
2642
2609
|
if (km) {
|
|
2643
2610
|
second = km.getKmWaarde();
|
|
2644
2611
|
}
|
|
@@ -2753,23 +2720,21 @@ class ActieHelper {
|
|
|
2753
2720
|
else {
|
|
2754
2721
|
const puics = [];
|
|
2755
2722
|
kmRanges.forEach(kmRange => {
|
|
2756
|
-
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
puics.push(kmRange.topologyElement.getPuic());
|
|
2766
|
-
}
|
|
2723
|
+
let vanKilometrering = new MstKilometrering(actie.vanKilometerlint, actie.vanKilometrering);
|
|
2724
|
+
let totKilometrering = new MstKilometrering(actie.totKilometerlint, actie.totKilometrering);
|
|
2725
|
+
if (actie.vanKilometrering > actie.totKilometrering) {
|
|
2726
|
+
const temp = { van: vanKilometrering, tot: totKilometrering };
|
|
2727
|
+
vanKilometrering = temp.tot;
|
|
2728
|
+
totKilometrering = temp.van;
|
|
2729
|
+
}
|
|
2730
|
+
if (kmRange.heeftOverlap(vanKilometrering, totKilometrering)) {
|
|
2731
|
+
puics.push(kmRange.topologyElement.getPuic());
|
|
2767
2732
|
}
|
|
2768
2733
|
});
|
|
2769
2734
|
if (puics.length === 0) {
|
|
2770
2735
|
actieZonderElementen.push(actie.id);
|
|
2771
2736
|
const melding = MeldingBuilder.actieHighlightError(actieZonderElementen);
|
|
2772
|
-
this.loggingHelper.maakLogDTO(melding, actie)
|
|
2737
|
+
logMeldingDTOs.push(this.loggingHelper.maakLogDTO(melding, actie));
|
|
2773
2738
|
}
|
|
2774
2739
|
retval.putAll(actie, puics);
|
|
2775
2740
|
}
|
|
@@ -2862,14 +2827,14 @@ class ActieHelper {
|
|
|
2862
2827
|
if (ActieHelper.isKantCodeLinks(kantcode)) {
|
|
2863
2828
|
return wissel.getLeft();
|
|
2864
2829
|
}
|
|
2865
|
-
return
|
|
2830
|
+
return null;
|
|
2866
2831
|
}
|
|
2867
2832
|
bepaalPuicVoorWisselSlijpenActie(actie) {
|
|
2868
2833
|
const storingsSymboolPuic = this.sbmService.getSBWissel(actie.wisselNaam, actie.pplgNaam)?.getStoringSymboolPuic();
|
|
2869
2834
|
if (!storingsSymboolPuic && this.debug) {
|
|
2870
2835
|
const melding = MeldingBuilder.actieHighlightError([actie.id]);
|
|
2871
2836
|
this.messagesService.showMessage(MessageBuilder.actieHighlightError([actie.id]));
|
|
2872
|
-
this.loggingHelper.maakLogDTO(melding, actie)
|
|
2837
|
+
this.mstLogResource.logMessages([this.loggingHelper.maakLogDTO(melding, actie)]);
|
|
2873
2838
|
}
|
|
2874
2839
|
return storingsSymboolPuic ? [storingsSymboolPuic] : [];
|
|
2875
2840
|
}
|
|
@@ -2884,16 +2849,10 @@ class RitdelenLijstComponent {
|
|
|
2884
2849
|
constructor(store, sbmService) {
|
|
2885
2850
|
this.store = store;
|
|
2886
2851
|
this.sbmService = sbmService;
|
|
2887
|
-
this.nietGeplandeActies = [];
|
|
2888
2852
|
this.focusEmitter = new EventEmitter();
|
|
2889
2853
|
this.keurAlleActiesGoed = new EventEmitter();
|
|
2890
|
-
this.ritdeelViewModels = [];
|
|
2891
2854
|
this.selectedRitdeelActies = [];
|
|
2892
2855
|
this.selectedRitdeelOngeplandeActies = [];
|
|
2893
|
-
this.disableActieKnoppenVanRitdeel = true;
|
|
2894
|
-
this.editable = false;
|
|
2895
|
-
this.ongeplandeActiesMap = new ArrayMultimap();
|
|
2896
|
-
this.geplandeActies = new ArrayMultimap();
|
|
2897
2856
|
this.NG_ACTIE_PREFIX = '* ';
|
|
2898
2857
|
this.subscriptions = [];
|
|
2899
2858
|
this.subscriptions.push(store.select('ritDelen').subscribe((ritdelen) => {
|
|
@@ -2904,6 +2863,9 @@ class RitdelenLijstComponent {
|
|
|
2904
2863
|
this.subscriptions.push(store.select('ongeplandeActies').subscribe(acties => this.ongeplandeActiesMap = acties));
|
|
2905
2864
|
this.subscriptions.push(store.select('geplandeActies').subscribe(acties => this.geplandeActies = acties));
|
|
2906
2865
|
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));
|
|
2907
2869
|
this.subscriptions.push(combineLatest([
|
|
2908
2870
|
this.store.select('ritDelen'),
|
|
2909
2871
|
this.store.select('ongeplandeActies')
|
|
@@ -2940,14 +2902,12 @@ class RitdelenLijstComponent {
|
|
|
2940
2902
|
this.store.dispatch(deleteRitdeel(ritdeel));
|
|
2941
2903
|
}
|
|
2942
2904
|
deleteActiesUitRit() {
|
|
2943
|
-
this.selectedRitdeel
|
|
2905
|
+
this.selectedRitdeel.acties.slice().forEach(actie => {
|
|
2944
2906
|
this.deleteActieUitRit(actie);
|
|
2945
2907
|
});
|
|
2946
2908
|
}
|
|
2947
2909
|
deleteActieUitRit(actie) {
|
|
2948
|
-
|
|
2949
|
-
return;
|
|
2950
|
-
const acties = this.selectedRitdeel.acties ?? [];
|
|
2910
|
+
const acties = this.selectedRitdeel.acties;
|
|
2951
2911
|
const idx = acties.indexOf(actie);
|
|
2952
2912
|
if (idx >= 0) {
|
|
2953
2913
|
this.verhuisActieNaarOngepland(actie);
|
|
@@ -2973,7 +2933,7 @@ class RitdelenLijstComponent {
|
|
|
2973
2933
|
}
|
|
2974
2934
|
voegActieToeAanRit(ongeplandeActie) {
|
|
2975
2935
|
const idx = this.selectedRitdeelOngeplandeActies.indexOf(ongeplandeActie);
|
|
2976
|
-
if (idx >= 0
|
|
2936
|
+
if (idx >= 0) {
|
|
2977
2937
|
this.store.dispatch(addRitdeelActie(this.selectedRitdeel, this.selectedRitdeelOngeplandeActies[idx].actie));
|
|
2978
2938
|
this.store.dispatch(AddGeplandeActie(ongeplandeActie.actie, ongeplandeActie.puics));
|
|
2979
2939
|
this.store.dispatch(DeleteOngeplandeActie(ongeplandeActie));
|
|
@@ -3075,13 +3035,13 @@ class RitdelenLijstComponent {
|
|
|
3075
3035
|
return `${prefix}${ActieHelper.getVSTActieOmschrijving(actie)}`;
|
|
3076
3036
|
}
|
|
3077
3037
|
bepaalPrefixVoorActieOmschrijving(actie) {
|
|
3078
|
-
const
|
|
3079
|
-
if (this.selectedRitdeel
|
|
3038
|
+
const prefix = '';
|
|
3039
|
+
if (this.selectedRitdeel.acties.includes(actie)) {
|
|
3080
3040
|
// Afwijkende naam bij niet gevisualiseerde actie in rit
|
|
3081
3041
|
const puics = this.geplandeActies.get(actie);
|
|
3082
|
-
return puics.length > 0 ?
|
|
3042
|
+
return puics.length > 0 ? prefix : this.NG_ACTIE_PREFIX;
|
|
3083
3043
|
}
|
|
3084
|
-
return
|
|
3044
|
+
return prefix;
|
|
3085
3045
|
}
|
|
3086
3046
|
actieVanKmTekst(actie) {
|
|
3087
3047
|
if (ActieHelper.isWisselSlijpenActie(actie)) {
|
|
@@ -3102,7 +3062,6 @@ class RitdelenLijstComponent {
|
|
|
3102
3062
|
return ritdeel.getPplgString();
|
|
3103
3063
|
}
|
|
3104
3064
|
getKantCode(stand) {
|
|
3105
|
-
// @ts-ignore
|
|
3106
3065
|
if (stand === window['domein'].Stand.LINKS) {
|
|
3107
3066
|
return 'L';
|
|
3108
3067
|
}
|
|
@@ -3239,19 +3198,49 @@ class RitdeelViewModel {
|
|
|
3239
3198
|
}
|
|
3240
3199
|
}
|
|
3241
3200
|
|
|
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
|
+
|
|
3242
3235
|
class ViewerControlsComponent {
|
|
3243
3236
|
constructor(store, viewerControlsService, bewegingUtils) {
|
|
3244
3237
|
this.store = store;
|
|
3245
3238
|
this.viewerControlsService = viewerControlsService;
|
|
3246
3239
|
this.bewegingUtils = bewegingUtils;
|
|
3247
3240
|
this.paginationSize = 4;
|
|
3248
|
-
this.iaversieinfo = undefined;
|
|
3249
|
-
this.treinpad = undefined;
|
|
3250
|
-
this.goedgekeurd = new EventEmitter();
|
|
3251
3241
|
this.printing$ = this.viewerControlsService.isPrinting$();
|
|
3252
3242
|
this.valideRit$ = this.viewerControlsService.isValideRit$();
|
|
3253
3243
|
this.subscriptions = new Subscription();
|
|
3254
|
-
this.editable = false;
|
|
3255
3244
|
this.subscriptions.add(this.store.select('editable').subscribe(editable => this.editable = editable));
|
|
3256
3245
|
}
|
|
3257
3246
|
ngOnChanges({ treinpad }) {
|
|
@@ -3264,7 +3253,7 @@ class ViewerControlsComponent {
|
|
|
3264
3253
|
}
|
|
3265
3254
|
goedkeurenClick() {
|
|
3266
3255
|
const ritDelen = this.viewerControlsService.ritdelen;
|
|
3267
|
-
if (ritDelen
|
|
3256
|
+
if (ritDelen) {
|
|
3268
3257
|
delete this.treinpad.aantalRitActies;
|
|
3269
3258
|
this.treinpad.bewegingen = this.bewegingUtils.extractBewegingenUitRitdelen(ritDelen, this.viewerControlsService.origineelTreinPad.bewegingen);
|
|
3270
3259
|
this.goedgekeurd.emit(this.treinpad);
|
|
@@ -3335,7 +3324,7 @@ class ActiePopoverBepaler {
|
|
|
3335
3324
|
ongeplandeActies.entries.forEach(entry => {
|
|
3336
3325
|
const treinNummerActieInfos = puicNaarOngeplandeActieMap.get(entry.key);
|
|
3337
3326
|
if (!treinNummerActieInfos?.map(({ actie }) => actie).includes(entry.value.actie)) {
|
|
3338
|
-
puicNaarOngeplandeActieMap.put(entry.key, { actie: entry.value.actie });
|
|
3327
|
+
puicNaarOngeplandeActieMap.put(entry.key, { treinNummer: undefined, actie: entry.value.actie });
|
|
3339
3328
|
}
|
|
3340
3329
|
});
|
|
3341
3330
|
}
|
|
@@ -3395,15 +3384,12 @@ class SvgVisualisatieComponent {
|
|
|
3395
3384
|
this.actieHelper = actieHelper;
|
|
3396
3385
|
this.sbmService = sbmService;
|
|
3397
3386
|
this.editorService = editorService;
|
|
3398
|
-
this.nietGeplandeActies = [];
|
|
3399
|
-
this.useClickArea = false;
|
|
3400
3387
|
this.svgInfos$ = this.store.select('svgInfos');
|
|
3401
3388
|
this.popoverInfos = [];
|
|
3402
3389
|
this.clickableIds = [];
|
|
3403
3390
|
this.rightClickableIds = [];
|
|
3404
3391
|
this.contextMenuActions = [];
|
|
3405
3392
|
this.contextMenuStyle = { display: 'none' };
|
|
3406
|
-
this.editable = false;
|
|
3407
3393
|
this.puicNaarBeginSeinRitdeel = new Map();
|
|
3408
3394
|
this.puicNaarEindSeinCombinatie = new Map();
|
|
3409
3395
|
this.puicNaarAlternatieveRoute = new Map();
|
|
@@ -3427,7 +3413,7 @@ class SvgVisualisatieComponent {
|
|
|
3427
3413
|
}));
|
|
3428
3414
|
}
|
|
3429
3415
|
ngOnInit() {
|
|
3430
|
-
document.getElementById('contextMenu')
|
|
3416
|
+
document.getElementById('contextMenu').addEventListener('mouseleave', () => this.hideContextMenu());
|
|
3431
3417
|
}
|
|
3432
3418
|
ngOnDestroy() {
|
|
3433
3419
|
this.subscriptions.forEach(s => s.unsubscribe());
|
|
@@ -3454,6 +3440,7 @@ class SvgVisualisatieComponent {
|
|
|
3454
3440
|
this.store.dispatch(navigeerBuitenRit(puic));
|
|
3455
3441
|
}
|
|
3456
3442
|
}
|
|
3443
|
+
this.store.dispatch(SetSelectedRitdeel(undefined));
|
|
3457
3444
|
}
|
|
3458
3445
|
handleImxviewRightClick(evt) {
|
|
3459
3446
|
const fn = () => {
|
|
@@ -3484,7 +3471,7 @@ class SvgVisualisatieComponent {
|
|
|
3484
3471
|
handleNieuweRouteToegevoegd() {
|
|
3485
3472
|
this.store.select('nieuweRoute')
|
|
3486
3473
|
.subscribe((nieuweRoute) => {
|
|
3487
|
-
if (nieuweRoute
|
|
3474
|
+
if (nieuweRoute.isValid()) {
|
|
3488
3475
|
this.store.dispatch(ResetNieuweRoute());
|
|
3489
3476
|
this.store.dispatch(ritdeelInvoegen(nieuweRoute));
|
|
3490
3477
|
}
|
|
@@ -3597,7 +3584,7 @@ class SvgVisualisatieComponent {
|
|
|
3597
3584
|
});
|
|
3598
3585
|
this.viewerControlsService.setValideRit(!gebrokenRit);
|
|
3599
3586
|
this.store.dispatch(SetGeplandeActies(actieOpRitSelectiePuics));
|
|
3600
|
-
const actieOpRitSelectiePuicsArray = Array.from(actieOpRitSelectiePuics.values())
|
|
3587
|
+
const actieOpRitSelectiePuicsArray = Utils.flatMap(Array.from(actieOpRitSelectiePuics.values()), x => x);
|
|
3601
3588
|
this.store.dispatch(SetActieOpRitSelectieIds(actieOpRitSelectiePuicsArray));
|
|
3602
3589
|
ritSelectiePuics = ritSelectiePuics.filter(item => actieOpRitSelectiePuicsArray.indexOf(item) < 0); // make mutually exclusive
|
|
3603
3590
|
this.store.dispatch(SetRitSelectieIds(ritSelectiePuics));
|
|
@@ -3653,9 +3640,6 @@ class MstviewerComponent {
|
|
|
3653
3640
|
this.printBewegingService = printBewegingService;
|
|
3654
3641
|
this.paginationSize = 4;
|
|
3655
3642
|
this.baseurl = 'https://acceptatie.raildesign.nl';
|
|
3656
|
-
this.debug = false;
|
|
3657
|
-
this.viewer = false;
|
|
3658
|
-
this.useClickArea = false;
|
|
3659
3643
|
this.goedgekeurd = new EventEmitter();
|
|
3660
3644
|
this.subscriptions = new Subscription();
|
|
3661
3645
|
this.subscriptions.add(this.store.select('nieuweBewegingen').subscribe(nieuweRit => {
|
|
@@ -3718,14 +3702,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
3718
3702
|
type: Component,
|
|
3719
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 [iaversieinfo]=\"iaversieinfo\"\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"] }]
|
|
3720
3704
|
}], ctorParameters: () => [{ type: i2$1.Store }, { type: ViewerControlService }, { type: DebugService }, { type: PrintBewegingService }], propDecorators: { iaversieinfo: [{
|
|
3721
|
-
type: Input
|
|
3722
|
-
args: [{ required: true }]
|
|
3705
|
+
type: Input
|
|
3723
3706
|
}], treinpad: [{
|
|
3724
|
-
type: Input
|
|
3725
|
-
args: [{ required: true }]
|
|
3707
|
+
type: Input
|
|
3726
3708
|
}], ongeplandeActies: [{
|
|
3727
|
-
type: Input
|
|
3728
|
-
args: [{ required: true }]
|
|
3709
|
+
type: Input
|
|
3729
3710
|
}], paginationSize: [{
|
|
3730
3711
|
type: Input
|
|
3731
3712
|
}], baseurl: [{
|
|
@@ -3799,8 +3780,6 @@ class BaseRestService {
|
|
|
3799
3780
|
this.httpClient = httpClient;
|
|
3800
3781
|
this.store = store;
|
|
3801
3782
|
this.subscriptions = new Subscription();
|
|
3802
|
-
this.baseUrl = '';
|
|
3803
|
-
this.iaVersie = '';
|
|
3804
3783
|
this.subscriptions.add(this.store.select('baseUrl').subscribe(baseUrl => this.baseUrl = baseUrl));
|
|
3805
3784
|
this.subscriptions.add(this.store.select('iaVersie').subscribe(iaVersie => this.iaVersie = iaVersie.versie));
|
|
3806
3785
|
}
|
|
@@ -4057,10 +4036,10 @@ class Ritdeel {
|
|
|
4057
4036
|
getZichtbaarheidBuitenPaginatie() {
|
|
4058
4037
|
return this.zichtbaarBuitenPaginatie;
|
|
4059
4038
|
}
|
|
4060
|
-
bepaalTopologieElementen(
|
|
4061
|
-
const topoElementen =
|
|
4039
|
+
bepaalTopologieElementen(signaleringsBeeldManagerService) {
|
|
4040
|
+
const topoElementen = signaleringsBeeldManagerService.bepaalRouteElementen(this.getRoute());
|
|
4062
4041
|
if (this.heeftVrijebaanInfo()) {
|
|
4063
|
-
const vrijebaanTopoElementen =
|
|
4042
|
+
const vrijebaanTopoElementen = signaleringsBeeldManagerService.bepaalRouteElementen(this.getVrijebaanPrlRoute());
|
|
4064
4043
|
topoElementen.push(...vrijebaanTopoElementen);
|
|
4065
4044
|
}
|
|
4066
4045
|
this.topoElementen = topoElementen;
|
|
@@ -4106,7 +4085,7 @@ class RitLezerService {
|
|
|
4106
4085
|
ritDelen.push(new Ritdeel(dwangInfo, beweging.ritActies, beweging, vrijebaanDwangInfo, vervolgSpoor, []));
|
|
4107
4086
|
}
|
|
4108
4087
|
extractVrijebaanDwangInfo(beweging, rijwegPlan, rijweg) {
|
|
4109
|
-
let vrijebaanDwangInfo =
|
|
4088
|
+
let vrijebaanDwangInfo = null;
|
|
4110
4089
|
let vervolgSpoor;
|
|
4111
4090
|
if (beweging.naarSpoor.endsWith(SPOOR_NAAR_VRIJEBAAN_POSTFIX) ||
|
|
4112
4091
|
beweging.naarSpoor.endsWith(SPOOR_NAAR_VEERWISSEL_VRIJEBAAN_POSTFIX)) {
|
|
@@ -4120,9 +4099,9 @@ class RitLezerService {
|
|
|
4120
4099
|
vrijebaanRijweg = vrijebaanRijwegen[0];
|
|
4121
4100
|
vrijebaanDwang = vrijebaanRijweg.getDwangVoorDwangNummer(0);
|
|
4122
4101
|
vervolgSpoor = vrijebaanRijwegplan.getVervolgSpoor(vrijebaanRijweg);
|
|
4123
|
-
vrijebaanDwangInfo =
|
|
4124
|
-
new RijwegplanRijwegDwangCombinatie(vrijebaanRijwegplan, vrijebaanRijweg, vrijebaanDwang);
|
|
4125
4102
|
}
|
|
4103
|
+
vrijebaanDwangInfo =
|
|
4104
|
+
new RijwegplanRijwegDwangCombinatie(vrijebaanRijwegplan, vrijebaanRijweg, vrijebaanDwang);
|
|
4126
4105
|
}
|
|
4127
4106
|
}
|
|
4128
4107
|
return { vrijebaanDwangInfo, vervolgSpoor };
|
|
@@ -4175,7 +4154,7 @@ class BepaalOngeplandeActiesEffect {
|
|
|
4175
4154
|
this.bepaalOngeplandeActies$ = createEffect(() => this.actions$.pipe(ofType(BepaalOngeplandeActies), withLatestFrom(this.store), map(([action, store]) => {
|
|
4176
4155
|
const puicActieMap = new ArrayMultimap();
|
|
4177
4156
|
const nietGevondenTakken = [];
|
|
4178
|
-
const logMeldingDTOs
|
|
4157
|
+
const logMeldingDTOs = [];
|
|
4179
4158
|
const acties = store.ritDelen.flatMap(rd => rd.acties);
|
|
4180
4159
|
action.ongeplandeActies.forEach(actie => {
|
|
4181
4160
|
const alreadyAdded = acties.filter(a => a.id === actie.id).length > 0;
|
|
@@ -4191,11 +4170,11 @@ class BepaalOngeplandeActiesEffect {
|
|
|
4191
4170
|
if (!spoortak && nietGevondenTakken.indexOf(takId) < 0) {
|
|
4192
4171
|
nietGevondenTakken.push(takId);
|
|
4193
4172
|
const melding = MeldingBuilder.nietGevondenTakkenOngeplandeActies(nietGevondenTakken);
|
|
4194
|
-
logMeldingDTOs
|
|
4173
|
+
logMeldingDTOs.push(this.loggingHelper.maakLogDTO(melding, actie));
|
|
4195
4174
|
}
|
|
4196
4175
|
else if (spoortak) {
|
|
4197
4176
|
const melding = MeldingBuilder.actieHighlightError([actie.id]);
|
|
4198
|
-
logMeldingDTOs
|
|
4177
|
+
logMeldingDTOs.push(this.loggingHelper.maakLogDTO(melding, actie));
|
|
4199
4178
|
this.messagesService.showMessage(MessageBuilder.actieHighlightError([actie.id]));
|
|
4200
4179
|
}
|
|
4201
4180
|
}
|
|
@@ -4204,8 +4183,8 @@ class BepaalOngeplandeActiesEffect {
|
|
|
4204
4183
|
if (nietGevondenTakken.length > 0) {
|
|
4205
4184
|
this.messagesService.showMessage(MessageBuilder.nietGevondenTakkenOngeplandeActies(nietGevondenTakken));
|
|
4206
4185
|
}
|
|
4207
|
-
if (logMeldingDTOs
|
|
4208
|
-
|
|
4186
|
+
if (logMeldingDTOs.length > 0) {
|
|
4187
|
+
this.mstLogResource.logMessages(logMeldingDTOs);
|
|
4209
4188
|
}
|
|
4210
4189
|
this.store.dispatch(SetOngeplandeActies(puicActieMap));
|
|
4211
4190
|
this.store.dispatch(SetOngeplandeActieSelectieIds(Array.from(puicActieMap.keys())));
|
|
@@ -4429,7 +4408,7 @@ class LaadRouteFilesEffect {
|
|
|
4429
4408
|
const promise = this.editorService.laadRouteFiles(actie.iaversieinfo.versie, pplgs);
|
|
4430
4409
|
promise.then(() => {
|
|
4431
4410
|
this.updateRitdelen(actie);
|
|
4432
|
-
},
|
|
4411
|
+
}, err => {
|
|
4433
4412
|
this.messagesService.showMessage(MessageBuilder.rwpDataNietGevonden(Utils.getValidErorrMessage(err)));
|
|
4434
4413
|
});
|
|
4435
4414
|
});
|
|
@@ -4489,14 +4468,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4489
4468
|
}] });
|
|
4490
4469
|
|
|
4491
4470
|
class LaadSignaleringsbeeldenEffect {
|
|
4492
|
-
constructor(actions$, store, signaleringsBeeldManagerService, editorService, sbiResource, connectorService,
|
|
4471
|
+
constructor(actions$, store, signaleringsBeeldManagerService, editorService, sbiResource, connectorService, messagesSerivce) {
|
|
4493
4472
|
this.actions$ = actions$;
|
|
4494
4473
|
this.store = store;
|
|
4495
4474
|
this.signaleringsBeeldManagerService = signaleringsBeeldManagerService;
|
|
4496
4475
|
this.editorService = editorService;
|
|
4497
4476
|
this.sbiResource = sbiResource;
|
|
4498
4477
|
this.connectorService = connectorService;
|
|
4499
|
-
this.
|
|
4478
|
+
this.messagesSerivce = messagesSerivce;
|
|
4500
4479
|
this.SVG_PIXEL_RUIMTE = 30;
|
|
4501
4480
|
this.verwerkRitdelen$ = createEffect(() => this.actions$.pipe(ofType(setRitDelen, navigeer, navigeerVanaf), withLatestFrom(this.store), map(([actie, storeState]) => {
|
|
4502
4481
|
this.store.dispatch(SetOngeplandeActiesBepaald(false));
|
|
@@ -4511,13 +4490,13 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4511
4490
|
}
|
|
4512
4491
|
handleSignaleringsbeeldInfo({ actie, storeState }) {
|
|
4513
4492
|
return this.sbiResource.laadSignaleringsbeeldInfo(this.createSignaleringsbeeldInfoQueryDto(actie.pplgs, storeState.iaVersie)).pipe(take(1), tap((dtos) => this.processResponse({ dtos, storeState, actie })), catchError((err) => {
|
|
4514
|
-
this.
|
|
4493
|
+
this.messagesSerivce.showMessage(MessageBuilder.nietGevondenSBI(err));
|
|
4515
4494
|
return throwError(() => err);
|
|
4516
4495
|
}));
|
|
4517
4496
|
}
|
|
4518
4497
|
processResponse({ dtos, storeState, actie }) {
|
|
4519
4498
|
if (dtos && dtos.filter(dto => dto.metVisualisatie).length > 12) {
|
|
4520
|
-
this.
|
|
4499
|
+
this.messagesSerivce.showMessage(MessageBuilder.meerDan12BladenGevonden(dtos.length));
|
|
4521
4500
|
}
|
|
4522
4501
|
this.store.dispatch(SetSignaleringsbeeldInfoDtos(dtos, storeState.iaVersie, actie.rit, actie.paginationSize, actie.ritGewijzigdToegestaan));
|
|
4523
4502
|
this.store.dispatch(SetVisibleSignaleringsbeeldInfoDtos(dtos));
|
|
@@ -4530,11 +4509,11 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4530
4509
|
return this.sbiResource.laadSignaleringsbeeldInfo(this.createSignaleringsbeeldInfoQueryDto([rand.getPPLG(), otherPplg], storeState.iaVersie)).pipe(map(dtos => ({ dtos, storeState })));
|
|
4531
4510
|
}
|
|
4532
4511
|
loadSignaleringsbeelden({ dtos, storeState }) {
|
|
4533
|
-
return this.editorService.laadSignaleringsbeelden(storeState.iaVersie.versie, dtos).pipe(map(svgDataUrls => ({ svgDataUrls,
|
|
4512
|
+
return this.editorService.laadSignaleringsbeelden(storeState.iaVersie.versie, dtos).pipe(map(svgDataUrls => ({ svgDataUrls, storeState, dtos })));
|
|
4534
4513
|
}
|
|
4535
|
-
processSvgsAndUpdateRitdelen({ svgDataUrls,
|
|
4514
|
+
processSvgsAndUpdateRitdelen({ svgDataUrls, storeState, dtos }) {
|
|
4536
4515
|
this.verwerkSvgs(svgDataUrls);
|
|
4537
|
-
const nieuweRitdelen = this.updateRitdelen(ritDelen, dtos);
|
|
4516
|
+
const nieuweRitdelen = this.updateRitdelen(storeState.ritDelen, dtos);
|
|
4538
4517
|
this.store.dispatch(UpdateVisibleSignaleringsbeeldInfoDtos(dtos));
|
|
4539
4518
|
this.store.dispatch(updateRitDelen(nieuweRitdelen));
|
|
4540
4519
|
}
|
|
@@ -4551,7 +4530,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4551
4530
|
this.verwerkSvgs(svgDataUrls);
|
|
4552
4531
|
this.updateState(ritDelen, visibleDtos, storeState, visibleRitPplgs, loadingDtos, isInit, storeDtos);
|
|
4553
4532
|
}), catchError(err => {
|
|
4554
|
-
this.
|
|
4533
|
+
this.messagesSerivce.showMessage(MessageBuilder.rwpDataNietGevonden(Utils.getValidErorrMessage(err)));
|
|
4555
4534
|
throw err;
|
|
4556
4535
|
})).subscribe();
|
|
4557
4536
|
}
|
|
@@ -4606,8 +4585,8 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4606
4585
|
dtos.filter(d => !visibleDtos.includes(d)).forEach(d => d.metVisualisatie = false);
|
|
4607
4586
|
return visibleDtos;
|
|
4608
4587
|
}
|
|
4609
|
-
distinct(value, index,
|
|
4610
|
-
return
|
|
4588
|
+
distinct(value, index, self) {
|
|
4589
|
+
return self.indexOf(value) === index;
|
|
4611
4590
|
}
|
|
4612
4591
|
addPrevNonVisibleDto(firstIdx, ritdelen, loadingDtos, visibleRitPplgs, allDtos) {
|
|
4613
4592
|
if (firstIdx >= 0) {
|
|
@@ -4696,7 +4675,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4696
4675
|
}
|
|
4697
4676
|
}
|
|
4698
4677
|
}
|
|
4699
|
-
this.
|
|
4678
|
+
this.updateZichtbaarheidAangrezendeRitdelen(min, max, ritdelen, visibleDtos);
|
|
4700
4679
|
return this.updateZichtbaarheidBuitenWindow(ritdelen, visibleDtos);
|
|
4701
4680
|
}
|
|
4702
4681
|
updateZichtbaarheidBuitenWindow(nieuweRitdelen, visibleDtos) {
|
|
@@ -4712,7 +4691,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4712
4691
|
}
|
|
4713
4692
|
return nieuweRitdelen;
|
|
4714
4693
|
}
|
|
4715
|
-
|
|
4694
|
+
updateZichtbaarheidAangrezendeRitdelen(min, max, nieuweRitdelen, visibleDtos) {
|
|
4716
4695
|
let i = min - 1;
|
|
4717
4696
|
while (i >= 0) {
|
|
4718
4697
|
i = this.updateZichtbaarHeid(i, 0, visibleDtos, nieuweRitdelen) - 1;
|
|
@@ -4847,11 +4826,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4847
4826
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: BewegingVerrijkerService }] });
|
|
4848
4827
|
|
|
4849
4828
|
class RitdelenEffect {
|
|
4850
|
-
constructor(actions$, store, sbmService,
|
|
4829
|
+
constructor(actions$, store, sbmService, rijwegPlanEditorService) {
|
|
4851
4830
|
this.actions$ = actions$;
|
|
4852
4831
|
this.store = store;
|
|
4853
4832
|
this.sbmService = sbmService;
|
|
4854
|
-
this.
|
|
4833
|
+
this.rijwegPlanEditorService = rijwegPlanEditorService;
|
|
4855
4834
|
this.updateRitDelen$ = createEffect(() => this.actions$.pipe(ofType(updateRitDelen), withLatestFrom(this.store), map(([actie, _storeState]) => {
|
|
4856
4835
|
const nieuweRitDelen = actie.ritDelen.map(ritDeel => ritDeel.isZichtbaar() ?
|
|
4857
4836
|
ritDeel.copyMetAlternatieveRoutes(this.sbmService.bepaalAlternativeRoutes(ritDeel.getRijweg())) : ritDeel);
|
|
@@ -4869,25 +4848,25 @@ class RitdelenEffect {
|
|
|
4869
4848
|
return setRitdelenAfterUpdate(ritDelen);
|
|
4870
4849
|
})));
|
|
4871
4850
|
this.ritdeelInvoegen$ = createEffect(() => this.actions$.pipe(ofType(ritdeelInvoegen), withLatestFrom(this.store), map(([actie, storeState]) => {
|
|
4872
|
-
const ritDelen = this.ritdeelInvoegenFunc(storeState.ritDelen, actie.nieuweRoute);
|
|
4851
|
+
const ritDelen = this.ritdeelInvoegenFunc(storeState.ritDelen, actie.nieuweRoute, this.rijwegPlanEditorService, this.sbmService);
|
|
4873
4852
|
return setRitdelenAfterUpdate(ritDelen);
|
|
4874
4853
|
})));
|
|
4875
4854
|
}
|
|
4876
|
-
ritdeelInvoegenFunc(ritDelen, nieuweRoute) {
|
|
4855
|
+
ritdeelInvoegenFunc(ritDelen, nieuweRoute, rijwegPlanEditorService, sbmService) {
|
|
4877
4856
|
const origineelRitdeel = nieuweRoute.beginSeinOpRitdeel.ritdeel;
|
|
4878
4857
|
const beginSein = nieuweRoute.beginSeinOpRitdeel.sein;
|
|
4879
|
-
const rijwegplan =
|
|
4858
|
+
const rijwegplan = rijwegPlanEditorService.getRijwegplan(beginSein.getPPLG());
|
|
4880
4859
|
const dwangen = JsJavaUtil.listToArray(rijwegplan.getOnderliggendeDwangenTotEnVanSein(origineelRitdeel.getDwang(), beginSein));
|
|
4881
4860
|
const isSamengesteldeRoute = dwangen[0] && dwangen[1];
|
|
4882
4861
|
let newRitdeel1 = origineelRitdeel;
|
|
4883
4862
|
if (isSamengesteldeRoute) {
|
|
4884
|
-
newRitdeel1 = this.verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, ritDelen);
|
|
4863
|
+
newRitdeel1 = this.verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, sbmService, ritDelen);
|
|
4885
4864
|
}
|
|
4886
|
-
if (nieuweRoute.combinatieVoorEindsein
|
|
4887
|
-
this.extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute);
|
|
4865
|
+
if (nieuweRoute.combinatieVoorEindsein.isVrijeBaanRijweg()) {
|
|
4866
|
+
this.extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute, sbmService);
|
|
4888
4867
|
}
|
|
4889
4868
|
else {
|
|
4890
|
-
this.maakNieuwRitdeel(newRitdeel1, nieuweRoute, ritDelen);
|
|
4869
|
+
this.maakNieuwRitdeel(newRitdeel1, nieuweRoute, sbmService, ritDelen);
|
|
4891
4870
|
}
|
|
4892
4871
|
if (isSamengesteldeRoute) {
|
|
4893
4872
|
ritDelen.splice(ritDelen.indexOf(origineelRitdeel), 1);
|
|
@@ -4902,39 +4881,38 @@ class RitdelenEffect {
|
|
|
4902
4881
|
}
|
|
4903
4882
|
}
|
|
4904
4883
|
}
|
|
4905
|
-
verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, ritDelen) {
|
|
4884
|
+
verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, sbmService, ritDelen) {
|
|
4906
4885
|
// dwangen in 2 nieuwe ritdelen verwerken voor de knip
|
|
4907
4886
|
const nieuweRijweg1 = rijwegplan.getRijwegVoorSeinen(dwangen[0].getRoute().getBeginSein(), dwangen[0].getRoute().getEindSein());
|
|
4908
4887
|
const dwangInfo1 = new RijwegplanRijwegDwangCombinatie(rijwegplan, nieuweRijweg1, dwangen[0]);
|
|
4909
|
-
const newRitdeel1 = new Ritdeel(dwangInfo1, [],
|
|
4888
|
+
const newRitdeel1 = new Ritdeel(dwangInfo1, [], null, null, null, []);
|
|
4910
4889
|
// remove vrijbaan info uit ritdeel
|
|
4911
|
-
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi =
|
|
4912
|
-
newRitdeel1.vervolgSpoor =
|
|
4913
|
-
newRitdeel1.bepaalTopologieElementen(
|
|
4890
|
+
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi = null;
|
|
4891
|
+
newRitdeel1.vervolgSpoor = null;
|
|
4892
|
+
newRitdeel1.bepaalTopologieElementen(sbmService);
|
|
4914
4893
|
this.insertRitdeel(ritDelen, origineelRitdeel, newRitdeel1);
|
|
4915
4894
|
const nieuweRijweg2 = rijwegplan.getRijwegVoorSeinen(dwangen[1].getRoute().getBeginSein(), dwangen[1].getRoute().getEindSein());
|
|
4916
4895
|
const dwangInfo2 = new RijwegplanRijwegDwangCombinatie(rijwegplan, nieuweRijweg2, dwangen[1]);
|
|
4917
|
-
const newRitdeel2 = new Ritdeel(dwangInfo2, [],
|
|
4918
|
-
newRitdeel2.bepaalTopologieElementen(
|
|
4896
|
+
const newRitdeel2 = new Ritdeel(dwangInfo2, [], null, null, null, []);
|
|
4897
|
+
newRitdeel2.bepaalTopologieElementen(sbmService);
|
|
4919
4898
|
this.insertRitdeel(ritDelen, newRitdeel1, newRitdeel2);
|
|
4920
4899
|
return newRitdeel1;
|
|
4921
4900
|
}
|
|
4922
|
-
extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute) {
|
|
4901
|
+
extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute, sbmService) {
|
|
4923
4902
|
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi = nieuweRoute.combinatieVoorEindsein;
|
|
4924
|
-
const vbrwp = nieuweRoute.combinatieVoorEindsein
|
|
4925
|
-
newRitdeel1.vervolgSpoor = nieuweRoute.combinatieVoorEindsein
|
|
4926
|
-
|
|
4927
|
-
newRitdeel1.bepaalTopologieElementen(this.sbmService);
|
|
4903
|
+
const vbrwp = nieuweRoute.combinatieVoorEindsein.rijwegplan;
|
|
4904
|
+
newRitdeel1.vervolgSpoor = vbrwp.getVervolgSpoor(nieuweRoute.combinatieVoorEindsein.rijweg);
|
|
4905
|
+
newRitdeel1.bepaalTopologieElementen(sbmService);
|
|
4928
4906
|
}
|
|
4929
|
-
maakNieuwRitdeel(newRitdeel1, nieuweRoute, ritDelen) {
|
|
4907
|
+
maakNieuwRitdeel(newRitdeel1, nieuweRoute, sbmService, ritDelen) {
|
|
4930
4908
|
let newRitdeel = this.createRitdeel(nieuweRoute);
|
|
4931
|
-
const altRoutes =
|
|
4909
|
+
const altRoutes = sbmService.bepaalAlternativeRoutes(newRitdeel.getRijweg());
|
|
4932
4910
|
newRitdeel = newRitdeel.copyMetAlternatieveRoutes(altRoutes);
|
|
4933
|
-
newRitdeel.bepaalTopologieElementen(
|
|
4911
|
+
newRitdeel.bepaalTopologieElementen(sbmService);
|
|
4934
4912
|
this.insertRitdeel(ritDelen, newRitdeel1, newRitdeel);
|
|
4935
4913
|
}
|
|
4936
4914
|
createRitdeel(nieuweRoute) {
|
|
4937
|
-
return new Ritdeel(nieuweRoute.combinatieVoorEindsein, [],
|
|
4915
|
+
return new Ritdeel(nieuweRoute.combinatieVoorEindsein, [], null, null, null, []);
|
|
4938
4916
|
}
|
|
4939
4917
|
insertRitdeel(ritdelen, naRitdeelPositie, newRitdeel) {
|
|
4940
4918
|
const idx = ritdelen.indexOf(naRitdeelPositie);
|
|
@@ -4985,24 +4963,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4985
4963
|
type: Injectable
|
|
4986
4964
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: SignaleringsBeeldManagerService }, { type: i4.SignaleringsbeeldSvgUtilityService }] });
|
|
4987
4965
|
|
|
4988
|
-
class ProgressIndicator {
|
|
4989
|
-
constructor(lowerText, upperText, iconClass) {
|
|
4990
|
-
this.lowerText = '';
|
|
4991
|
-
this.upperText = '';
|
|
4992
|
-
this.iconClass = '';
|
|
4993
|
-
this.lowerText = lowerText ?? this.lowerText;
|
|
4994
|
-
this.upperText = upperText ?? this.upperText;
|
|
4995
|
-
this.iconClass = iconClass ?? this.iconClass;
|
|
4996
|
-
}
|
|
4997
|
-
}
|
|
4998
|
-
|
|
4999
4966
|
class NieuweRoute {
|
|
5000
4967
|
constructor(beginSeinOpRitdeel, combinatieVoorEindsein) {
|
|
5001
4968
|
this.beginSeinOpRitdeel = beginSeinOpRitdeel;
|
|
5002
4969
|
this.combinatieVoorEindsein = combinatieVoorEindsein;
|
|
5003
4970
|
}
|
|
5004
4971
|
isValid() {
|
|
5005
|
-
return
|
|
4972
|
+
return this.combinatieVoorEindsein !== null;
|
|
5006
4973
|
}
|
|
5007
4974
|
}
|
|
5008
4975
|
|
|
@@ -5068,7 +5035,7 @@ function addRitdeelActieFunc(ritDelen, { ritDeel, actie }) {
|
|
|
5068
5035
|
const onIdsActionHandler = (action) => on(action, (_, { ids }) => ids);
|
|
5069
5036
|
const createIdsReducer = (action) => createReducer([], onIdsActionHandler(action));
|
|
5070
5037
|
const editableReducer = createReducer(true, on(setEditable, (_, { editable }) => editable));
|
|
5071
|
-
const progressIndicatorReducer = createReducer(
|
|
5038
|
+
const progressIndicatorReducer = createReducer(undefined, on(ShowProgress, () => ({ progressIndicator: {} })), on(ClearProgress, () => undefined));
|
|
5072
5039
|
const svgInfoReducer = createReducer([], on(SetSvgInfos, (_, { svgInfos }) => svgInfos));
|
|
5073
5040
|
const debugReducer = createReducer(false, on(SetDebug, (_, { debug }) => debug));
|
|
5074
5041
|
const ritSelectieIdsReducer = createIdsReducer(SetRitSelectieIds);
|
|
@@ -5094,10 +5061,12 @@ const ongeplandeActieReducer = createReducer(new ArrayMultimap(), on(SetOngeplan
|
|
|
5094
5061
|
ongeplandeActie.puics.forEach(puic => ongeplandeActies.delete(puic, ongeplandeActie));
|
|
5095
5062
|
return new ArrayMultimap(ongeplandeActies);
|
|
5096
5063
|
}));
|
|
5097
|
-
const ongeplandeActieSelectieIdsReducer = createReducer([],
|
|
5064
|
+
const ongeplandeActieSelectieIdsReducer = createReducer([],
|
|
5065
|
+
// on(MstActions.SetOngeplandeActieSelectieIds, (_, { ids }) => ids),
|
|
5066
|
+
onIdsActionHandler(SetOngeplandeActieSelectieIds), on(AddOngeplandeActie, (ids, { ongeplandeActie }) => {
|
|
5098
5067
|
ongeplandeActie.puics.filter(puic => !ids.includes(puic)).forEach(puic => ids.push(puic));
|
|
5099
5068
|
return [...ids];
|
|
5100
|
-
}), on(DeleteOngeplandeActieSelectieId, (ids, { id }) => ids.includes(id) ? ids.filter(_id => _id !== id) : ids));
|
|
5069
|
+
}), on(DeleteOngeplandeActieSelectieId, (ids, { id }) => [].concat(ids.includes(id) ? ids.filter(_id => _id !== id) : ids)));
|
|
5101
5070
|
const gebrokenRitSelectieIdsReducer = createIdsReducer(SetGebrokenRitSelectieIds);
|
|
5102
5071
|
const alternatievenSelectieIdsReducer = createIdsReducer(SetAlternatievenSelectieIds);
|
|
5103
5072
|
const beginSeinSelectieIdsReducer = createIdsReducer(SetBeginSeinSelectieIds);
|
|
@@ -5106,15 +5075,16 @@ const alternatievenClickableIdsReducer = createIdsReducer(SetAlternatievenClicka
|
|
|
5106
5075
|
const eindSeinenClickableIdsReducer = createIdsReducer(SetEindSeinenClickableIds);
|
|
5107
5076
|
const connectorClickableIdsReducer = createIdsReducer(SetConnectorenClickableIds);
|
|
5108
5077
|
const beginSeinRightClickableIdsReducer = createIdsReducer(SetBeginSeinRightClickableIds);
|
|
5109
|
-
const nieuweRouteReducer = createReducer(
|
|
5078
|
+
const nieuweRouteReducer = createReducer(new NieuweRoute(null, null), on(SetNieuwRouteBeginSein, (_, { startSeinOpRitdeel }) => new NieuweRoute(startSeinOpRitdeel, null)), on(SetNieuwRouteEindSein, (nieuweRoute, { combinatieVoorEindsein }) => new NieuweRoute(nieuweRoute.beginSeinOpRitdeel, combinatieVoorEindsein)), on(ResetNieuweRoute, () => new NieuweRoute(null, null)));
|
|
5110
5079
|
const signaleringsbeeldInfoDtosReducer = createReducer([], on(SetSignaleringsbeeldInfoDtos, (_, { dtos }) => dtos), on(UpdateSignaleringsbeeldInfoDtos, (_, { dtos }) => [...dtos]));
|
|
5111
5080
|
const visibleSbInfoDtosReducer = createReducer([], on(SetVisibleSignaleringsbeeldInfoDtos, (_, { dtos }) => dtos), on(UpdateVisibleSignaleringsbeeldInfoDtos, (_, { dtos }) => [...dtos]));
|
|
5112
|
-
const iaVersieReducer = createReducer({
|
|
5081
|
+
const iaVersieReducer = createReducer({}, on(SetIaVersie, (_, { iaVersie }) => Object.assign({}, iaVersie, { versie: iaVersie.versie.toUpperCase() })));
|
|
5113
5082
|
const algemeneRitInfoDtoReducer = createReducer({}, on(SetAlgemeneRitInfo, (_, { algemeneRitInfoDto }) => algemeneRitInfoDto));
|
|
5114
5083
|
const ongeplandeActiesBepaaldReducer = createReducer(false, on(SetOngeplandeActiesBepaald, (_, { bepaald }) => bepaald));
|
|
5115
|
-
const nieuweBewegingReducer = createReducer(
|
|
5116
|
-
const baseUrlReducer = createReducer(
|
|
5117
|
-
const focusIdsReducer = createReducer(
|
|
5084
|
+
const nieuweBewegingReducer = createReducer({}, on(UpdateRit, (_, { bewegingen }) => bewegingen));
|
|
5085
|
+
const baseUrlReducer = createReducer(undefined, on(SetBaseUrl, (_, { baseUrl }) => baseUrl));
|
|
5086
|
+
const focusIdsReducer = createReducer({}, on(focusOpIds, (_, { puics }) => puics));
|
|
5087
|
+
const selectedRitdeelIdReducer = createReducer({}, on(SetSelectedRitdeel, (_, { id }) => id));
|
|
5118
5088
|
const storeReducers = {
|
|
5119
5089
|
ritDelen: ritdelenReducer,
|
|
5120
5090
|
ritSelectieIds: ritSelectieIdsReducer,
|
|
@@ -5143,9 +5113,9 @@ const storeReducers = {
|
|
|
5143
5113
|
nieuweBewegingen: nieuweBewegingReducer,
|
|
5144
5114
|
baseUrl: baseUrlReducer,
|
|
5145
5115
|
focusIds: focusIdsReducer,
|
|
5116
|
+
selectedRitdeelId: selectedRitdeelIdReducer
|
|
5146
5117
|
};
|
|
5147
5118
|
|
|
5148
|
-
// @ts-nocheck
|
|
5149
5119
|
class ZoneUtil {
|
|
5150
5120
|
constructor(ngZone) {
|
|
5151
5121
|
this.ngZone = ngZone;
|
|
@@ -5208,7 +5178,6 @@ class MstViewerModule {
|
|
|
5208
5178
|
constructor(service, zoneUtil) {
|
|
5209
5179
|
this.service = service;
|
|
5210
5180
|
// maak de EditorService toegankelijk voor GWT code
|
|
5211
|
-
// @ts-ignore
|
|
5212
5181
|
window['rpe'] = {
|
|
5213
5182
|
EditorService: zoneUtil.proxy(service)
|
|
5214
5183
|
};
|