@loxia/mst-viewer 8.1.3-202511171301 → 8.1.3-202511171614
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 +7 -4
- 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 +8 -7
- package/esm2022/lib/components/viewer-controls/viewer-controls.component.mjs +7 -3
- package/esm2022/lib/model/ritdeel.mjs +4 -4
- package/esm2022/lib/mst-viewer.module.mjs +6 -5
- package/esm2022/lib/resources/signaleringsbeeldinfo.resource.mjs +2 -1
- package/esm2022/lib/services/base-rest.service.mjs +3 -1
- package/esm2022/lib/services/editor.service.mjs +3 -1
- package/esm2022/lib/services/rit-lezer.service.mjs +4 -4
- package/esm2022/lib/state/actions/actions.mjs +2 -4
- package/esm2022/lib/state/effect/bepaal-ongeplande-acties.effect.mjs +1 -1
- 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 +22 -22
- package/esm2022/lib/state/mst-editor-state.mjs +10 -13
- package/esm2022/lib/state/reducer/rit-delen.reducer.mjs +1 -1
- package/esm2022/lib/util/actie-helper.mjs +20 -17
- package/esm2022/lib/util/actie-popover-bepaler.mjs +2 -2
- package/esm2022/lib/util/multi-map.mjs +2 -3
- package/esm2022/lib/util/utils.mjs +2 -5
- package/esm2022/lib/util/zone-util.mjs +2 -1
- package/fesm2022/loxia-mst-viewer.mjs +232 -205
- 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/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/ritdeel.d.ts +7 -6
- package/lib/state/actions/actions.d.ts +1 -6
- package/lib/state/effect/delete-ongeplande-actie.effect.d.ts +1 -1
- package/lib/state/effect/laad-route-files.effect.d.ts +2 -1
- package/lib/state/effect/laad-signaleringsbeelden.effect.d.ts +9 -9
- package/lib/state/effect/ritdelen.effect.d.ts +7 -6
- package/lib/state/mst-editor-state.d.ts +20 -83
- package/lib/util/actie-helper.d.ts +4 -4
- package/lib/util/utils.d.ts +0 -1
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ 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
14
|
import { BehaviorSubject, from, Subscription, combineLatest, of, throwError } from 'rxjs';
|
|
15
|
-
import {
|
|
15
|
+
import { filter, map, take, 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.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,84 @@ 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
|
+
|
|
127
205
|
const version = '8.1.3-SNAPSHOT';
|
|
128
206
|
|
|
129
207
|
const SET_EDITABLE = '[mst] SetEditable';
|
|
@@ -213,7 +291,6 @@ 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 SetSelectedRitdeel = createAction(SET_SELECTED_RITDEEL, (id) => ({ id }));
|
|
217
294
|
// do not export return value
|
|
218
295
|
const mstActions = union({
|
|
219
296
|
setEditable,
|
|
@@ -251,89 +328,9 @@ const mstActions = union({
|
|
|
251
328
|
ClearProgress,
|
|
252
329
|
BewegingInvoegen,
|
|
253
330
|
KeurAlleActiesGoed,
|
|
254
|
-
UpdateRit
|
|
255
|
-
setSelectedRitdeel: SetSelectedRitdeel
|
|
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
|
|
331
|
+
UpdateRit
|
|
300
332
|
});
|
|
301
333
|
|
|
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
334
|
/**
|
|
338
335
|
* https://gist.github.com/jordanluyke/609a4fffb69d1ebafdadd313ee2ee804
|
|
339
336
|
*
|
|
@@ -397,7 +394,7 @@ class ArrayMultimap {
|
|
|
397
394
|
return Array.from(new Set(this._entries.map(entry => entry.key)));
|
|
398
395
|
}
|
|
399
396
|
values() {
|
|
400
|
-
return
|
|
397
|
+
return this._entries.reduce((acc, x) => acc.concat(x.value), []);
|
|
401
398
|
}
|
|
402
399
|
put(key, value) {
|
|
403
400
|
this._entries.push(new MultimapEntry(key, value));
|
|
@@ -503,6 +500,7 @@ class EditorService {
|
|
|
503
500
|
this.signaleringsBeeldManagerService = signaleringsBeeldManagerService;
|
|
504
501
|
this.initReadyPromise();
|
|
505
502
|
}
|
|
503
|
+
// Called from GWT only, can be removed when GWT is gone
|
|
506
504
|
setEditor(editor) {
|
|
507
505
|
this.editor = editor;
|
|
508
506
|
this.resolveReadyPromise();
|
|
@@ -510,6 +508,7 @@ class EditorService {
|
|
|
510
508
|
isReady() {
|
|
511
509
|
return this.promise;
|
|
512
510
|
}
|
|
511
|
+
// Called from GWT only, can be removed when GWT is gone
|
|
513
512
|
setSignaleringsBeeldManager(signaleringsBeeldManager) {
|
|
514
513
|
this.signaleringsBeeldManagerService.set(signaleringsBeeldManager);
|
|
515
514
|
}
|
|
@@ -886,8 +885,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
886
885
|
}], ctorParameters: () => [{ type: i2$1.Store }, { type: ViewerControlService }, { type: SignaleringsBeeldManagerService }] });
|
|
887
886
|
|
|
888
887
|
class RpeComponent {
|
|
888
|
+
constructor() {
|
|
889
|
+
this.baseurl = '';
|
|
890
|
+
this.path = '';
|
|
891
|
+
}
|
|
889
892
|
convertToScript() {
|
|
890
|
-
const element = this.script
|
|
893
|
+
const element = this.script?.nativeElement;
|
|
891
894
|
const script = document.createElement('script');
|
|
892
895
|
script.type = 'text/javascript';
|
|
893
896
|
if (this.baseurl && this.path) {
|
|
@@ -987,6 +990,38 @@ class MeldingBuilder {
|
|
|
987
990
|
}
|
|
988
991
|
}
|
|
989
992
|
|
|
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
|
+
|
|
990
1025
|
class MessageBuilder {
|
|
991
1026
|
static rwpDataNietGevonden(err) {
|
|
992
1027
|
return new Message(Severity.ERROR, 'Error bij ophalen van rijwegplan data: ' + err);
|
|
@@ -2515,6 +2550,7 @@ class ActieHelper {
|
|
|
2515
2550
|
this.messagesService = messagesService;
|
|
2516
2551
|
this.store = store;
|
|
2517
2552
|
this.loggingHelper = loggingHelper;
|
|
2553
|
+
this.debug = false;
|
|
2518
2554
|
this.store.select('debug').subscribe(debug => this.debug = debug);
|
|
2519
2555
|
}
|
|
2520
2556
|
static getActieTopoElements(ritDeel, sbmService) {
|
|
@@ -2548,10 +2584,10 @@ class ActieHelper {
|
|
|
2548
2584
|
}
|
|
2549
2585
|
}
|
|
2550
2586
|
static actieComparator(actie1, actie2) {
|
|
2551
|
-
if (actie1.vanKilometrering !== actie2.vanKilometrering) {
|
|
2587
|
+
if (actie1.vanKilometrering && actie2.vanKilometrering && actie1.vanKilometrering !== actie2.vanKilometrering) {
|
|
2552
2588
|
return actie1.vanKilometrering > actie2.vanKilometrering ? 1 : -1;
|
|
2553
2589
|
}
|
|
2554
|
-
if (actie1.ritActieTypeOmschrijving !== actie2.ritActieTypeOmschrijving) {
|
|
2590
|
+
if (actie1.ritActieTypeOmschrijving && actie2.ritActieTypeOmschrijving && actie1.ritActieTypeOmschrijving !== actie2.ritActieTypeOmschrijving) {
|
|
2555
2591
|
return actie1.ritActieTypeOmschrijving > actie2.ritActieTypeOmschrijving ? 1 : -1;
|
|
2556
2592
|
}
|
|
2557
2593
|
if (actie1.wisselNaam !== actie2.wisselNaam) {
|
|
@@ -2591,9 +2627,9 @@ class ActieHelper {
|
|
|
2591
2627
|
// make sure the elems are sorted in ascending order
|
|
2592
2628
|
static sorteerTopoElementen(topoElems) {
|
|
2593
2629
|
const topoElementen = topoElems.slice();
|
|
2594
|
-
let lint =
|
|
2595
|
-
let first
|
|
2596
|
-
let second
|
|
2630
|
+
let lint = undefined;
|
|
2631
|
+
let first;
|
|
2632
|
+
let second;
|
|
2597
2633
|
for (const topoElement of topoElementen) {
|
|
2598
2634
|
let kilometreringen = null;
|
|
2599
2635
|
const kms = JsJavaUtil.listToArray(topoElement.getKilometreringen());
|
|
@@ -2605,7 +2641,7 @@ class ActieHelper {
|
|
|
2605
2641
|
lint = kilometreringen[0].getKmLint();
|
|
2606
2642
|
}
|
|
2607
2643
|
else if (kilometreringen && first && !second) {
|
|
2608
|
-
const km = KmRange.getKilometrering(lint, kilometreringen);
|
|
2644
|
+
const km = KmRange.getKilometrering(lint ?? '', kilometreringen);
|
|
2609
2645
|
if (km) {
|
|
2610
2646
|
second = km.getKmWaarde();
|
|
2611
2647
|
}
|
|
@@ -2720,15 +2756,17 @@ class ActieHelper {
|
|
|
2720
2756
|
else {
|
|
2721
2757
|
const puics = [];
|
|
2722
2758
|
kmRanges.forEach(kmRange => {
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2759
|
+
if (actie.vanKilometrering && actie.vanKilometerlint && actie.totKilometrering && actie.totKilometerlint) {
|
|
2760
|
+
let vanKilometrering = new MstKilometrering(actie.vanKilometerlint, actie.vanKilometrering);
|
|
2761
|
+
let totKilometrering = new MstKilometrering(actie.totKilometerlint, actie.totKilometrering);
|
|
2762
|
+
if (actie.vanKilometrering > actie.totKilometrering) {
|
|
2763
|
+
const temp = { van: vanKilometrering, tot: totKilometrering };
|
|
2764
|
+
vanKilometrering = temp.tot;
|
|
2765
|
+
totKilometrering = temp.van;
|
|
2766
|
+
}
|
|
2767
|
+
if (kmRange.heeftOverlap(vanKilometrering, totKilometrering)) {
|
|
2768
|
+
puics.push(kmRange.topologyElement.getPuic());
|
|
2769
|
+
}
|
|
2732
2770
|
}
|
|
2733
2771
|
});
|
|
2734
2772
|
if (puics.length === 0) {
|
|
@@ -2827,7 +2865,7 @@ class ActieHelper {
|
|
|
2827
2865
|
if (ActieHelper.isKantCodeLinks(kantcode)) {
|
|
2828
2866
|
return wissel.getLeft();
|
|
2829
2867
|
}
|
|
2830
|
-
return
|
|
2868
|
+
return undefined;
|
|
2831
2869
|
}
|
|
2832
2870
|
bepaalPuicVoorWisselSlijpenActie(actie) {
|
|
2833
2871
|
const storingsSymboolPuic = this.sbmService.getSBWissel(actie.wisselNaam, actie.pplgNaam)?.getStoringSymboolPuic();
|
|
@@ -2849,10 +2887,16 @@ class RitdelenLijstComponent {
|
|
|
2849
2887
|
constructor(store, sbmService) {
|
|
2850
2888
|
this.store = store;
|
|
2851
2889
|
this.sbmService = sbmService;
|
|
2890
|
+
this.nietGeplandeActies = [];
|
|
2852
2891
|
this.focusEmitter = new EventEmitter();
|
|
2853
2892
|
this.keurAlleActiesGoed = new EventEmitter();
|
|
2893
|
+
this.ritdeelViewModels = [];
|
|
2854
2894
|
this.selectedRitdeelActies = [];
|
|
2855
2895
|
this.selectedRitdeelOngeplandeActies = [];
|
|
2896
|
+
this.disableActieKnoppenVanRitdeel = true;
|
|
2897
|
+
this.editable = false;
|
|
2898
|
+
this.ongeplandeActiesMap = new ArrayMultimap();
|
|
2899
|
+
this.geplandeActies = new ArrayMultimap();
|
|
2856
2900
|
this.NG_ACTIE_PREFIX = '* ';
|
|
2857
2901
|
this.subscriptions = [];
|
|
2858
2902
|
this.subscriptions.push(store.select('ritDelen').subscribe((ritdelen) => {
|
|
@@ -2863,9 +2907,6 @@ class RitdelenLijstComponent {
|
|
|
2863
2907
|
this.subscriptions.push(store.select('ongeplandeActies').subscribe(acties => this.ongeplandeActiesMap = acties));
|
|
2864
2908
|
this.subscriptions.push(store.select('geplandeActies').subscribe(acties => this.geplandeActies = acties));
|
|
2865
2909
|
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
2910
|
this.subscriptions.push(combineLatest([
|
|
2870
2911
|
this.store.select('ritDelen'),
|
|
2871
2912
|
this.store.select('ongeplandeActies')
|
|
@@ -2902,12 +2943,14 @@ class RitdelenLijstComponent {
|
|
|
2902
2943
|
this.store.dispatch(deleteRitdeel(ritdeel));
|
|
2903
2944
|
}
|
|
2904
2945
|
deleteActiesUitRit() {
|
|
2905
|
-
this.selectedRitdeel
|
|
2946
|
+
this.selectedRitdeel?.acties.slice().forEach(actie => {
|
|
2906
2947
|
this.deleteActieUitRit(actie);
|
|
2907
2948
|
});
|
|
2908
2949
|
}
|
|
2909
2950
|
deleteActieUitRit(actie) {
|
|
2910
|
-
|
|
2951
|
+
if (!this.selectedRitdeel)
|
|
2952
|
+
return;
|
|
2953
|
+
const acties = this.selectedRitdeel.acties ?? [];
|
|
2911
2954
|
const idx = acties.indexOf(actie);
|
|
2912
2955
|
if (idx >= 0) {
|
|
2913
2956
|
this.verhuisActieNaarOngepland(actie);
|
|
@@ -2933,7 +2976,7 @@ class RitdelenLijstComponent {
|
|
|
2933
2976
|
}
|
|
2934
2977
|
voegActieToeAanRit(ongeplandeActie) {
|
|
2935
2978
|
const idx = this.selectedRitdeelOngeplandeActies.indexOf(ongeplandeActie);
|
|
2936
|
-
if (idx >= 0) {
|
|
2979
|
+
if (idx >= 0 && this.selectedRitdeel) {
|
|
2937
2980
|
this.store.dispatch(addRitdeelActie(this.selectedRitdeel, this.selectedRitdeelOngeplandeActies[idx].actie));
|
|
2938
2981
|
this.store.dispatch(AddGeplandeActie(ongeplandeActie.actie, ongeplandeActie.puics));
|
|
2939
2982
|
this.store.dispatch(DeleteOngeplandeActie(ongeplandeActie));
|
|
@@ -3035,13 +3078,13 @@ class RitdelenLijstComponent {
|
|
|
3035
3078
|
return `${prefix}${ActieHelper.getVSTActieOmschrijving(actie)}`;
|
|
3036
3079
|
}
|
|
3037
3080
|
bepaalPrefixVoorActieOmschrijving(actie) {
|
|
3038
|
-
const
|
|
3039
|
-
if (this.selectedRitdeel
|
|
3081
|
+
const noPrefix = '';
|
|
3082
|
+
if (this.selectedRitdeel?.acties.includes(actie)) {
|
|
3040
3083
|
// Afwijkende naam bij niet gevisualiseerde actie in rit
|
|
3041
3084
|
const puics = this.geplandeActies.get(actie);
|
|
3042
|
-
return puics.length > 0 ?
|
|
3085
|
+
return puics.length > 0 ? noPrefix : this.NG_ACTIE_PREFIX;
|
|
3043
3086
|
}
|
|
3044
|
-
return
|
|
3087
|
+
return noPrefix;
|
|
3045
3088
|
}
|
|
3046
3089
|
actieVanKmTekst(actie) {
|
|
3047
3090
|
if (ActieHelper.isWisselSlijpenActie(actie)) {
|
|
@@ -3062,6 +3105,7 @@ class RitdelenLijstComponent {
|
|
|
3062
3105
|
return ritdeel.getPplgString();
|
|
3063
3106
|
}
|
|
3064
3107
|
getKantCode(stand) {
|
|
3108
|
+
// @ts-ignore
|
|
3065
3109
|
if (stand === window['domein'].Stand.LINKS) {
|
|
3066
3110
|
return 'L';
|
|
3067
3111
|
}
|
|
@@ -3198,49 +3242,19 @@ class RitdeelViewModel {
|
|
|
3198
3242
|
}
|
|
3199
3243
|
}
|
|
3200
3244
|
|
|
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
3245
|
class ViewerControlsComponent {
|
|
3236
3246
|
constructor(store, viewerControlsService, bewegingUtils) {
|
|
3237
3247
|
this.store = store;
|
|
3238
3248
|
this.viewerControlsService = viewerControlsService;
|
|
3239
3249
|
this.bewegingUtils = bewegingUtils;
|
|
3240
3250
|
this.paginationSize = 4;
|
|
3251
|
+
this.iaversieinfo = undefined;
|
|
3252
|
+
this.treinpad = undefined;
|
|
3253
|
+
this.goedgekeurd = new EventEmitter();
|
|
3241
3254
|
this.printing$ = this.viewerControlsService.isPrinting$();
|
|
3242
3255
|
this.valideRit$ = this.viewerControlsService.isValideRit$();
|
|
3243
3256
|
this.subscriptions = new Subscription();
|
|
3257
|
+
this.editable = false;
|
|
3244
3258
|
this.subscriptions.add(this.store.select('editable').subscribe(editable => this.editable = editable));
|
|
3245
3259
|
}
|
|
3246
3260
|
ngOnChanges({ treinpad }) {
|
|
@@ -3253,7 +3267,7 @@ class ViewerControlsComponent {
|
|
|
3253
3267
|
}
|
|
3254
3268
|
goedkeurenClick() {
|
|
3255
3269
|
const ritDelen = this.viewerControlsService.ritdelen;
|
|
3256
|
-
if (ritDelen) {
|
|
3270
|
+
if (ritDelen && this.treinpad) {
|
|
3257
3271
|
delete this.treinpad.aantalRitActies;
|
|
3258
3272
|
this.treinpad.bewegingen = this.bewegingUtils.extractBewegingenUitRitdelen(ritDelen, this.viewerControlsService.origineelTreinPad.bewegingen);
|
|
3259
3273
|
this.goedgekeurd.emit(this.treinpad);
|
|
@@ -3324,7 +3338,7 @@ class ActiePopoverBepaler {
|
|
|
3324
3338
|
ongeplandeActies.entries.forEach(entry => {
|
|
3325
3339
|
const treinNummerActieInfos = puicNaarOngeplandeActieMap.get(entry.key);
|
|
3326
3340
|
if (!treinNummerActieInfos?.map(({ actie }) => actie).includes(entry.value.actie)) {
|
|
3327
|
-
puicNaarOngeplandeActieMap.put(entry.key, {
|
|
3341
|
+
puicNaarOngeplandeActieMap.put(entry.key, { actie: entry.value.actie });
|
|
3328
3342
|
}
|
|
3329
3343
|
});
|
|
3330
3344
|
}
|
|
@@ -3384,12 +3398,15 @@ class SvgVisualisatieComponent {
|
|
|
3384
3398
|
this.actieHelper = actieHelper;
|
|
3385
3399
|
this.sbmService = sbmService;
|
|
3386
3400
|
this.editorService = editorService;
|
|
3401
|
+
this.nietGeplandeActies = [];
|
|
3402
|
+
this.useClickArea = false;
|
|
3387
3403
|
this.svgInfos$ = this.store.select('svgInfos');
|
|
3388
3404
|
this.popoverInfos = [];
|
|
3389
3405
|
this.clickableIds = [];
|
|
3390
3406
|
this.rightClickableIds = [];
|
|
3391
3407
|
this.contextMenuActions = [];
|
|
3392
3408
|
this.contextMenuStyle = { display: 'none' };
|
|
3409
|
+
this.editable = false;
|
|
3393
3410
|
this.puicNaarBeginSeinRitdeel = new Map();
|
|
3394
3411
|
this.puicNaarEindSeinCombinatie = new Map();
|
|
3395
3412
|
this.puicNaarAlternatieveRoute = new Map();
|
|
@@ -3413,7 +3430,7 @@ class SvgVisualisatieComponent {
|
|
|
3413
3430
|
}));
|
|
3414
3431
|
}
|
|
3415
3432
|
ngOnInit() {
|
|
3416
|
-
document.getElementById('contextMenu')
|
|
3433
|
+
document.getElementById('contextMenu')?.addEventListener('mouseleave', () => this.hideContextMenu());
|
|
3417
3434
|
}
|
|
3418
3435
|
ngOnDestroy() {
|
|
3419
3436
|
this.subscriptions.forEach(s => s.unsubscribe());
|
|
@@ -3440,7 +3457,6 @@ class SvgVisualisatieComponent {
|
|
|
3440
3457
|
this.store.dispatch(navigeerBuitenRit(puic));
|
|
3441
3458
|
}
|
|
3442
3459
|
}
|
|
3443
|
-
this.store.dispatch(SetSelectedRitdeel(undefined));
|
|
3444
3460
|
}
|
|
3445
3461
|
handleImxviewRightClick(evt) {
|
|
3446
3462
|
const fn = () => {
|
|
@@ -3471,7 +3487,7 @@ class SvgVisualisatieComponent {
|
|
|
3471
3487
|
handleNieuweRouteToegevoegd() {
|
|
3472
3488
|
this.store.select('nieuweRoute')
|
|
3473
3489
|
.subscribe((nieuweRoute) => {
|
|
3474
|
-
if (nieuweRoute.isValid()) {
|
|
3490
|
+
if (nieuweRoute && nieuweRoute.isValid()) {
|
|
3475
3491
|
this.store.dispatch(ResetNieuweRoute());
|
|
3476
3492
|
this.store.dispatch(ritdeelInvoegen(nieuweRoute));
|
|
3477
3493
|
}
|
|
@@ -3584,7 +3600,7 @@ class SvgVisualisatieComponent {
|
|
|
3584
3600
|
});
|
|
3585
3601
|
this.viewerControlsService.setValideRit(!gebrokenRit);
|
|
3586
3602
|
this.store.dispatch(SetGeplandeActies(actieOpRitSelectiePuics));
|
|
3587
|
-
const actieOpRitSelectiePuicsArray =
|
|
3603
|
+
const actieOpRitSelectiePuicsArray = Array.from(actieOpRitSelectiePuics.values()).reduce((acc, val) => acc.concat(val), []);
|
|
3588
3604
|
this.store.dispatch(SetActieOpRitSelectieIds(actieOpRitSelectiePuicsArray));
|
|
3589
3605
|
ritSelectiePuics = ritSelectiePuics.filter(item => actieOpRitSelectiePuicsArray.indexOf(item) < 0); // make mutually exclusive
|
|
3590
3606
|
this.store.dispatch(SetRitSelectieIds(ritSelectiePuics));
|
|
@@ -3780,6 +3796,8 @@ class BaseRestService {
|
|
|
3780
3796
|
this.httpClient = httpClient;
|
|
3781
3797
|
this.store = store;
|
|
3782
3798
|
this.subscriptions = new Subscription();
|
|
3799
|
+
this.baseUrl = '';
|
|
3800
|
+
this.iaVersie = '';
|
|
3783
3801
|
this.subscriptions.add(this.store.select('baseUrl').subscribe(baseUrl => this.baseUrl = baseUrl));
|
|
3784
3802
|
this.subscriptions.add(this.store.select('iaVersie').subscribe(iaVersie => this.iaVersie = iaVersie.versie));
|
|
3785
3803
|
}
|
|
@@ -4036,10 +4054,10 @@ class Ritdeel {
|
|
|
4036
4054
|
getZichtbaarheidBuitenPaginatie() {
|
|
4037
4055
|
return this.zichtbaarBuitenPaginatie;
|
|
4038
4056
|
}
|
|
4039
|
-
bepaalTopologieElementen(
|
|
4040
|
-
const topoElementen =
|
|
4057
|
+
bepaalTopologieElementen(sbmService) {
|
|
4058
|
+
const topoElementen = sbmService.bepaalRouteElementen(this.getRoute());
|
|
4041
4059
|
if (this.heeftVrijebaanInfo()) {
|
|
4042
|
-
const vrijebaanTopoElementen =
|
|
4060
|
+
const vrijebaanTopoElementen = sbmService.bepaalRouteElementen(this.getVrijebaanPrlRoute());
|
|
4043
4061
|
topoElementen.push(...vrijebaanTopoElementen);
|
|
4044
4062
|
}
|
|
4045
4063
|
this.topoElementen = topoElementen;
|
|
@@ -4085,7 +4103,7 @@ class RitLezerService {
|
|
|
4085
4103
|
ritDelen.push(new Ritdeel(dwangInfo, beweging.ritActies, beweging, vrijebaanDwangInfo, vervolgSpoor, []));
|
|
4086
4104
|
}
|
|
4087
4105
|
extractVrijebaanDwangInfo(beweging, rijwegPlan, rijweg) {
|
|
4088
|
-
let vrijebaanDwangInfo =
|
|
4106
|
+
let vrijebaanDwangInfo = undefined;
|
|
4089
4107
|
let vervolgSpoor;
|
|
4090
4108
|
if (beweging.naarSpoor.endsWith(SPOOR_NAAR_VRIJEBAAN_POSTFIX) ||
|
|
4091
4109
|
beweging.naarSpoor.endsWith(SPOOR_NAAR_VEERWISSEL_VRIJEBAAN_POSTFIX)) {
|
|
@@ -4099,9 +4117,9 @@ class RitLezerService {
|
|
|
4099
4117
|
vrijebaanRijweg = vrijebaanRijwegen[0];
|
|
4100
4118
|
vrijebaanDwang = vrijebaanRijweg.getDwangVoorDwangNummer(0);
|
|
4101
4119
|
vervolgSpoor = vrijebaanRijwegplan.getVervolgSpoor(vrijebaanRijweg);
|
|
4120
|
+
vrijebaanDwangInfo =
|
|
4121
|
+
new RijwegplanRijwegDwangCombinatie(vrijebaanRijwegplan, vrijebaanRijweg, vrijebaanDwang);
|
|
4102
4122
|
}
|
|
4103
|
-
vrijebaanDwangInfo =
|
|
4104
|
-
new RijwegplanRijwegDwangCombinatie(vrijebaanRijwegplan, vrijebaanRijweg, vrijebaanDwang);
|
|
4105
4123
|
}
|
|
4106
4124
|
}
|
|
4107
4125
|
return { vrijebaanDwangInfo, vervolgSpoor };
|
|
@@ -4408,7 +4426,7 @@ class LaadRouteFilesEffect {
|
|
|
4408
4426
|
const promise = this.editorService.laadRouteFiles(actie.iaversieinfo.versie, pplgs);
|
|
4409
4427
|
promise.then(() => {
|
|
4410
4428
|
this.updateRitdelen(actie);
|
|
4411
|
-
}, err => {
|
|
4429
|
+
}, (err) => {
|
|
4412
4430
|
this.messagesService.showMessage(MessageBuilder.rwpDataNietGevonden(Utils.getValidErorrMessage(err)));
|
|
4413
4431
|
});
|
|
4414
4432
|
});
|
|
@@ -4468,14 +4486,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4468
4486
|
}] });
|
|
4469
4487
|
|
|
4470
4488
|
class LaadSignaleringsbeeldenEffect {
|
|
4471
|
-
constructor(actions$, store, signaleringsBeeldManagerService, editorService, sbiResource, connectorService,
|
|
4489
|
+
constructor(actions$, store, signaleringsBeeldManagerService, editorService, sbiResource, connectorService, messagesService) {
|
|
4472
4490
|
this.actions$ = actions$;
|
|
4473
4491
|
this.store = store;
|
|
4474
4492
|
this.signaleringsBeeldManagerService = signaleringsBeeldManagerService;
|
|
4475
4493
|
this.editorService = editorService;
|
|
4476
4494
|
this.sbiResource = sbiResource;
|
|
4477
4495
|
this.connectorService = connectorService;
|
|
4478
|
-
this.
|
|
4496
|
+
this.messagesService = messagesService;
|
|
4479
4497
|
this.SVG_PIXEL_RUIMTE = 30;
|
|
4480
4498
|
this.verwerkRitdelen$ = createEffect(() => this.actions$.pipe(ofType(setRitDelen, navigeer, navigeerVanaf), withLatestFrom(this.store), map(([actie, storeState]) => {
|
|
4481
4499
|
this.store.dispatch(SetOngeplandeActiesBepaald(false));
|
|
@@ -4490,13 +4508,13 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4490
4508
|
}
|
|
4491
4509
|
handleSignaleringsbeeldInfo({ actie, storeState }) {
|
|
4492
4510
|
return this.sbiResource.laadSignaleringsbeeldInfo(this.createSignaleringsbeeldInfoQueryDto(actie.pplgs, storeState.iaVersie)).pipe(take(1), tap((dtos) => this.processResponse({ dtos, storeState, actie })), catchError((err) => {
|
|
4493
|
-
this.
|
|
4511
|
+
this.messagesService.showMessage(MessageBuilder.nietGevondenSBI(err));
|
|
4494
4512
|
return throwError(() => err);
|
|
4495
4513
|
}));
|
|
4496
4514
|
}
|
|
4497
4515
|
processResponse({ dtos, storeState, actie }) {
|
|
4498
4516
|
if (dtos && dtos.filter(dto => dto.metVisualisatie).length > 12) {
|
|
4499
|
-
this.
|
|
4517
|
+
this.messagesService.showMessage(MessageBuilder.meerDan12BladenGevonden(dtos.length));
|
|
4500
4518
|
}
|
|
4501
4519
|
this.store.dispatch(SetSignaleringsbeeldInfoDtos(dtos, storeState.iaVersie, actie.rit, actie.paginationSize, actie.ritGewijzigdToegestaan));
|
|
4502
4520
|
this.store.dispatch(SetVisibleSignaleringsbeeldInfoDtos(dtos));
|
|
@@ -4509,11 +4527,11 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4509
4527
|
return this.sbiResource.laadSignaleringsbeeldInfo(this.createSignaleringsbeeldInfoQueryDto([rand.getPPLG(), otherPplg], storeState.iaVersie)).pipe(map(dtos => ({ dtos, storeState })));
|
|
4510
4528
|
}
|
|
4511
4529
|
loadSignaleringsbeelden({ dtos, storeState }) {
|
|
4512
|
-
return this.editorService.laadSignaleringsbeelden(storeState.iaVersie.versie, dtos).pipe(map(svgDataUrls => ({ svgDataUrls, storeState, dtos })));
|
|
4530
|
+
return this.editorService.laadSignaleringsbeelden(storeState.iaVersie.versie, dtos).pipe(map(svgDataUrls => ({ svgDataUrls, ritDelen: storeState.ritDelen, dtos })));
|
|
4513
4531
|
}
|
|
4514
|
-
processSvgsAndUpdateRitdelen({ svgDataUrls,
|
|
4532
|
+
processSvgsAndUpdateRitdelen({ svgDataUrls, ritDelen, dtos }) {
|
|
4515
4533
|
this.verwerkSvgs(svgDataUrls);
|
|
4516
|
-
const nieuweRitdelen = this.updateRitdelen(
|
|
4534
|
+
const nieuweRitdelen = this.updateRitdelen(ritDelen, dtos);
|
|
4517
4535
|
this.store.dispatch(UpdateVisibleSignaleringsbeeldInfoDtos(dtos));
|
|
4518
4536
|
this.store.dispatch(updateRitDelen(nieuweRitdelen));
|
|
4519
4537
|
}
|
|
@@ -4530,7 +4548,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4530
4548
|
this.verwerkSvgs(svgDataUrls);
|
|
4531
4549
|
this.updateState(ritDelen, visibleDtos, storeState, visibleRitPplgs, loadingDtos, isInit, storeDtos);
|
|
4532
4550
|
}), catchError(err => {
|
|
4533
|
-
this.
|
|
4551
|
+
this.messagesService.showMessage(MessageBuilder.rwpDataNietGevonden(Utils.getValidErorrMessage(err)));
|
|
4534
4552
|
throw err;
|
|
4535
4553
|
})).subscribe();
|
|
4536
4554
|
}
|
|
@@ -4585,8 +4603,8 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4585
4603
|
dtos.filter(d => !visibleDtos.includes(d)).forEach(d => d.metVisualisatie = false);
|
|
4586
4604
|
return visibleDtos;
|
|
4587
4605
|
}
|
|
4588
|
-
distinct(value, index,
|
|
4589
|
-
return
|
|
4606
|
+
distinct(value, index, values) {
|
|
4607
|
+
return values.indexOf(value) === index;
|
|
4590
4608
|
}
|
|
4591
4609
|
addPrevNonVisibleDto(firstIdx, ritdelen, loadingDtos, visibleRitPplgs, allDtos) {
|
|
4592
4610
|
if (firstIdx >= 0) {
|
|
@@ -4675,7 +4693,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4675
4693
|
}
|
|
4676
4694
|
}
|
|
4677
4695
|
}
|
|
4678
|
-
this.
|
|
4696
|
+
this.updateZichtbaarheidAangrenzendeRitdelen(min, max, ritdelen, visibleDtos);
|
|
4679
4697
|
return this.updateZichtbaarheidBuitenWindow(ritdelen, visibleDtos);
|
|
4680
4698
|
}
|
|
4681
4699
|
updateZichtbaarheidBuitenWindow(nieuweRitdelen, visibleDtos) {
|
|
@@ -4691,7 +4709,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4691
4709
|
}
|
|
4692
4710
|
return nieuweRitdelen;
|
|
4693
4711
|
}
|
|
4694
|
-
|
|
4712
|
+
updateZichtbaarheidAangrenzendeRitdelen(min, max, nieuweRitdelen, visibleDtos) {
|
|
4695
4713
|
let i = min - 1;
|
|
4696
4714
|
while (i >= 0) {
|
|
4697
4715
|
i = this.updateZichtbaarHeid(i, 0, visibleDtos, nieuweRitdelen) - 1;
|
|
@@ -4826,11 +4844,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4826
4844
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: BewegingVerrijkerService }] });
|
|
4827
4845
|
|
|
4828
4846
|
class RitdelenEffect {
|
|
4829
|
-
constructor(actions$, store, sbmService,
|
|
4847
|
+
constructor(actions$, store, sbmService, editorService) {
|
|
4830
4848
|
this.actions$ = actions$;
|
|
4831
4849
|
this.store = store;
|
|
4832
4850
|
this.sbmService = sbmService;
|
|
4833
|
-
this.
|
|
4851
|
+
this.editorService = editorService;
|
|
4834
4852
|
this.updateRitDelen$ = createEffect(() => this.actions$.pipe(ofType(updateRitDelen), withLatestFrom(this.store), map(([actie, _storeState]) => {
|
|
4835
4853
|
const nieuweRitDelen = actie.ritDelen.map(ritDeel => ritDeel.isZichtbaar() ?
|
|
4836
4854
|
ritDeel.copyMetAlternatieveRoutes(this.sbmService.bepaalAlternativeRoutes(ritDeel.getRijweg())) : ritDeel);
|
|
@@ -4848,25 +4866,25 @@ class RitdelenEffect {
|
|
|
4848
4866
|
return setRitdelenAfterUpdate(ritDelen);
|
|
4849
4867
|
})));
|
|
4850
4868
|
this.ritdeelInvoegen$ = createEffect(() => this.actions$.pipe(ofType(ritdeelInvoegen), withLatestFrom(this.store), map(([actie, storeState]) => {
|
|
4851
|
-
const ritDelen = this.ritdeelInvoegenFunc(storeState.ritDelen, actie.nieuweRoute
|
|
4869
|
+
const ritDelen = this.ritdeelInvoegenFunc(storeState.ritDelen, actie.nieuweRoute);
|
|
4852
4870
|
return setRitdelenAfterUpdate(ritDelen);
|
|
4853
4871
|
})));
|
|
4854
4872
|
}
|
|
4855
|
-
ritdeelInvoegenFunc(ritDelen, nieuweRoute
|
|
4873
|
+
ritdeelInvoegenFunc(ritDelen, nieuweRoute) {
|
|
4856
4874
|
const origineelRitdeel = nieuweRoute.beginSeinOpRitdeel.ritdeel;
|
|
4857
4875
|
const beginSein = nieuweRoute.beginSeinOpRitdeel.sein;
|
|
4858
|
-
const rijwegplan =
|
|
4876
|
+
const rijwegplan = this.editorService.getRijwegplan(beginSein.getPPLG());
|
|
4859
4877
|
const dwangen = JsJavaUtil.listToArray(rijwegplan.getOnderliggendeDwangenTotEnVanSein(origineelRitdeel.getDwang(), beginSein));
|
|
4860
4878
|
const isSamengesteldeRoute = dwangen[0] && dwangen[1];
|
|
4861
4879
|
let newRitdeel1 = origineelRitdeel;
|
|
4862
4880
|
if (isSamengesteldeRoute) {
|
|
4863
|
-
newRitdeel1 = this.verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen,
|
|
4881
|
+
newRitdeel1 = this.verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, ritDelen);
|
|
4864
4882
|
}
|
|
4865
4883
|
if (nieuweRoute.combinatieVoorEindsein.isVrijeBaanRijweg()) {
|
|
4866
|
-
this.extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute
|
|
4884
|
+
this.extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute);
|
|
4867
4885
|
}
|
|
4868
4886
|
else {
|
|
4869
|
-
this.maakNieuwRitdeel(newRitdeel1, nieuweRoute,
|
|
4887
|
+
this.maakNieuwRitdeel(newRitdeel1, nieuweRoute, ritDelen);
|
|
4870
4888
|
}
|
|
4871
4889
|
if (isSamengesteldeRoute) {
|
|
4872
4890
|
ritDelen.splice(ritDelen.indexOf(origineelRitdeel), 1);
|
|
@@ -4881,38 +4899,38 @@ class RitdelenEffect {
|
|
|
4881
4899
|
}
|
|
4882
4900
|
}
|
|
4883
4901
|
}
|
|
4884
|
-
verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen,
|
|
4902
|
+
verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, ritDelen) {
|
|
4885
4903
|
// dwangen in 2 nieuwe ritdelen verwerken voor de knip
|
|
4886
4904
|
const nieuweRijweg1 = rijwegplan.getRijwegVoorSeinen(dwangen[0].getRoute().getBeginSein(), dwangen[0].getRoute().getEindSein());
|
|
4887
4905
|
const dwangInfo1 = new RijwegplanRijwegDwangCombinatie(rijwegplan, nieuweRijweg1, dwangen[0]);
|
|
4888
|
-
const newRitdeel1 = new Ritdeel(dwangInfo1, [],
|
|
4906
|
+
const newRitdeel1 = new Ritdeel(dwangInfo1, [], undefined, undefined, undefined, []);
|
|
4889
4907
|
// remove vrijbaan info uit ritdeel
|
|
4890
|
-
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi =
|
|
4891
|
-
newRitdeel1.vervolgSpoor =
|
|
4892
|
-
newRitdeel1.bepaalTopologieElementen(sbmService);
|
|
4908
|
+
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi = undefined;
|
|
4909
|
+
newRitdeel1.vervolgSpoor = undefined;
|
|
4910
|
+
newRitdeel1.bepaalTopologieElementen(this.sbmService);
|
|
4893
4911
|
this.insertRitdeel(ritDelen, origineelRitdeel, newRitdeel1);
|
|
4894
4912
|
const nieuweRijweg2 = rijwegplan.getRijwegVoorSeinen(dwangen[1].getRoute().getBeginSein(), dwangen[1].getRoute().getEindSein());
|
|
4895
4913
|
const dwangInfo2 = new RijwegplanRijwegDwangCombinatie(rijwegplan, nieuweRijweg2, dwangen[1]);
|
|
4896
|
-
const newRitdeel2 = new Ritdeel(dwangInfo2, [],
|
|
4897
|
-
newRitdeel2.bepaalTopologieElementen(sbmService);
|
|
4914
|
+
const newRitdeel2 = new Ritdeel(dwangInfo2, [], undefined, undefined, undefined, []);
|
|
4915
|
+
newRitdeel2.bepaalTopologieElementen(this.sbmService);
|
|
4898
4916
|
this.insertRitdeel(ritDelen, newRitdeel1, newRitdeel2);
|
|
4899
4917
|
return newRitdeel1;
|
|
4900
4918
|
}
|
|
4901
|
-
extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute
|
|
4919
|
+
extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute) {
|
|
4902
4920
|
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi = nieuweRoute.combinatieVoorEindsein;
|
|
4903
4921
|
const vbrwp = nieuweRoute.combinatieVoorEindsein.rijwegplan;
|
|
4904
4922
|
newRitdeel1.vervolgSpoor = vbrwp.getVervolgSpoor(nieuweRoute.combinatieVoorEindsein.rijweg);
|
|
4905
|
-
newRitdeel1.bepaalTopologieElementen(sbmService);
|
|
4923
|
+
newRitdeel1.bepaalTopologieElementen(this.sbmService);
|
|
4906
4924
|
}
|
|
4907
|
-
maakNieuwRitdeel(newRitdeel1, nieuweRoute,
|
|
4925
|
+
maakNieuwRitdeel(newRitdeel1, nieuweRoute, ritDelen) {
|
|
4908
4926
|
let newRitdeel = this.createRitdeel(nieuweRoute);
|
|
4909
|
-
const altRoutes = sbmService.bepaalAlternativeRoutes(newRitdeel.getRijweg());
|
|
4927
|
+
const altRoutes = this.sbmService.bepaalAlternativeRoutes(newRitdeel.getRijweg());
|
|
4910
4928
|
newRitdeel = newRitdeel.copyMetAlternatieveRoutes(altRoutes);
|
|
4911
|
-
newRitdeel.bepaalTopologieElementen(sbmService);
|
|
4929
|
+
newRitdeel.bepaalTopologieElementen(this.sbmService);
|
|
4912
4930
|
this.insertRitdeel(ritDelen, newRitdeel1, newRitdeel);
|
|
4913
4931
|
}
|
|
4914
4932
|
createRitdeel(nieuweRoute) {
|
|
4915
|
-
return new Ritdeel(nieuweRoute.combinatieVoorEindsein, [],
|
|
4933
|
+
return new Ritdeel(nieuweRoute.combinatieVoorEindsein, [], undefined, undefined, undefined, []);
|
|
4916
4934
|
}
|
|
4917
4935
|
insertRitdeel(ritdelen, naRitdeelPositie, newRitdeel) {
|
|
4918
4936
|
const idx = ritdelen.indexOf(naRitdeelPositie);
|
|
@@ -4963,6 +4981,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4963
4981
|
type: Injectable
|
|
4964
4982
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: SignaleringsBeeldManagerService }, { type: i4.SignaleringsbeeldSvgUtilityService }] });
|
|
4965
4983
|
|
|
4984
|
+
class ProgressIndicator {
|
|
4985
|
+
constructor(lowerText, upperText, iconClass) {
|
|
4986
|
+
this.lowerText = '';
|
|
4987
|
+
this.upperText = '';
|
|
4988
|
+
this.iconClass = '';
|
|
4989
|
+
this.lowerText = lowerText ?? this.lowerText;
|
|
4990
|
+
this.upperText = upperText ?? this.upperText;
|
|
4991
|
+
this.iconClass = iconClass ?? this.iconClass;
|
|
4992
|
+
}
|
|
4993
|
+
}
|
|
4994
|
+
|
|
4966
4995
|
class NieuweRoute {
|
|
4967
4996
|
constructor(beginSeinOpRitdeel, combinatieVoorEindsein) {
|
|
4968
4997
|
this.beginSeinOpRitdeel = beginSeinOpRitdeel;
|
|
@@ -5035,7 +5064,7 @@ function addRitdeelActieFunc(ritDelen, { ritDeel, actie }) {
|
|
|
5035
5064
|
const onIdsActionHandler = (action) => on(action, (_, { ids }) => ids);
|
|
5036
5065
|
const createIdsReducer = (action) => createReducer([], onIdsActionHandler(action));
|
|
5037
5066
|
const editableReducer = createReducer(true, on(setEditable, (_, { editable }) => editable));
|
|
5038
|
-
const progressIndicatorReducer = createReducer(
|
|
5067
|
+
const progressIndicatorReducer = createReducer({}, on(ShowProgress, () => ({ progressIndicator: new ProgressIndicator() })), on(ClearProgress, () => ({})));
|
|
5039
5068
|
const svgInfoReducer = createReducer([], on(SetSvgInfos, (_, { svgInfos }) => svgInfos));
|
|
5040
5069
|
const debugReducer = createReducer(false, on(SetDebug, (_, { debug }) => debug));
|
|
5041
5070
|
const ritSelectieIdsReducer = createIdsReducer(SetRitSelectieIds);
|
|
@@ -5061,12 +5090,10 @@ const ongeplandeActieReducer = createReducer(new ArrayMultimap(), on(SetOngeplan
|
|
|
5061
5090
|
ongeplandeActie.puics.forEach(puic => ongeplandeActies.delete(puic, ongeplandeActie));
|
|
5062
5091
|
return new ArrayMultimap(ongeplandeActies);
|
|
5063
5092
|
}));
|
|
5064
|
-
const ongeplandeActieSelectieIdsReducer = createReducer([],
|
|
5065
|
-
// on(MstActions.SetOngeplandeActieSelectieIds, (_, { ids }) => ids),
|
|
5066
|
-
onIdsActionHandler(SetOngeplandeActieSelectieIds), on(AddOngeplandeActie, (ids, { ongeplandeActie }) => {
|
|
5093
|
+
const ongeplandeActieSelectieIdsReducer = createReducer([], onIdsActionHandler(SetOngeplandeActieSelectieIds), on(AddOngeplandeActie, (ids, { ongeplandeActie }) => {
|
|
5067
5094
|
ongeplandeActie.puics.filter(puic => !ids.includes(puic)).forEach(puic => ids.push(puic));
|
|
5068
5095
|
return [...ids];
|
|
5069
|
-
}), on(DeleteOngeplandeActieSelectieId, (ids, { id }) =>
|
|
5096
|
+
}), on(DeleteOngeplandeActieSelectieId, (ids, { id }) => ids.includes(id) ? ids.filter(_id => _id !== id) : ids));
|
|
5070
5097
|
const gebrokenRitSelectieIdsReducer = createIdsReducer(SetGebrokenRitSelectieIds);
|
|
5071
5098
|
const alternatievenSelectieIdsReducer = createIdsReducer(SetAlternatievenSelectieIds);
|
|
5072
5099
|
const beginSeinSelectieIdsReducer = createIdsReducer(SetBeginSeinSelectieIds);
|
|
@@ -5075,16 +5102,15 @@ const alternatievenClickableIdsReducer = createIdsReducer(SetAlternatievenClicka
|
|
|
5075
5102
|
const eindSeinenClickableIdsReducer = createIdsReducer(SetEindSeinenClickableIds);
|
|
5076
5103
|
const connectorClickableIdsReducer = createIdsReducer(SetConnectorenClickableIds);
|
|
5077
5104
|
const beginSeinRightClickableIdsReducer = createIdsReducer(SetBeginSeinRightClickableIds);
|
|
5078
|
-
const nieuweRouteReducer = createReducer(
|
|
5105
|
+
const nieuweRouteReducer = createReducer(undefined, on(SetNieuwRouteBeginSein, (_, { startSeinOpRitdeel }) => new NieuweRoute(startSeinOpRitdeel, null)), on(SetNieuwRouteEindSein, (nieuweRoute, { combinatieVoorEindsein }) => new NieuweRoute(nieuweRoute.beginSeinOpRitdeel, combinatieVoorEindsein)), on(ResetNieuweRoute, () => undefined));
|
|
5079
5106
|
const signaleringsbeeldInfoDtosReducer = createReducer([], on(SetSignaleringsbeeldInfoDtos, (_, { dtos }) => dtos), on(UpdateSignaleringsbeeldInfoDtos, (_, { dtos }) => [...dtos]));
|
|
5080
5107
|
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() })));
|
|
5108
|
+
const iaVersieReducer = createReducer({ versie: 'unknown', ingangsDatum: new Date() }, on(SetIaVersie, (_, { iaVersie }) => Object.assign({}, iaVersie, { versie: iaVersie.versie.toUpperCase() })));
|
|
5082
5109
|
const algemeneRitInfoDtoReducer = createReducer({}, on(SetAlgemeneRitInfo, (_, { algemeneRitInfoDto }) => algemeneRitInfoDto));
|
|
5083
5110
|
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));
|
|
5111
|
+
const nieuweBewegingReducer = createReducer([], on(UpdateRit, (_, { bewegingen }) => bewegingen));
|
|
5112
|
+
const baseUrlReducer = createReducer('', on(SetBaseUrl, (_, { baseUrl }) => baseUrl));
|
|
5113
|
+
const focusIdsReducer = createReducer([], on(focusOpIds, (_, { puics }) => puics));
|
|
5088
5114
|
const storeReducers = {
|
|
5089
5115
|
ritDelen: ritdelenReducer,
|
|
5090
5116
|
ritSelectieIds: ritSelectieIdsReducer,
|
|
@@ -5113,9 +5139,9 @@ const storeReducers = {
|
|
|
5113
5139
|
nieuweBewegingen: nieuweBewegingReducer,
|
|
5114
5140
|
baseUrl: baseUrlReducer,
|
|
5115
5141
|
focusIds: focusIdsReducer,
|
|
5116
|
-
selectedRitdeelId: selectedRitdeelIdReducer
|
|
5117
5142
|
};
|
|
5118
5143
|
|
|
5144
|
+
// @ts-nocheck
|
|
5119
5145
|
class ZoneUtil {
|
|
5120
5146
|
constructor(ngZone) {
|
|
5121
5147
|
this.ngZone = ngZone;
|
|
@@ -5178,6 +5204,7 @@ class MstViewerModule {
|
|
|
5178
5204
|
constructor(service, zoneUtil) {
|
|
5179
5205
|
this.service = service;
|
|
5180
5206
|
// maak de EditorService toegankelijk voor GWT code
|
|
5207
|
+
// @ts-ignore
|
|
5181
5208
|
window['rpe'] = {
|
|
5182
5209
|
EditorService: zoneUtil.proxy(service)
|
|
5183
5210
|
};
|