@loxia/mst-viewer 8.1.3-202511141700 → 8.1.3-202511170721
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/ritdelen-lijst/ritdelen-lijst.component.mjs +11 -17
- package/esm2022/lib/components/svg-visualisatie/svg-visualisatie.component.mjs +6 -7
- package/esm2022/lib/components/viewer-controls/viewer-controls.component.mjs +1 -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/editor.service.mjs +1 -3
- package/esm2022/lib/services/rit-lezer.service.mjs +4 -4
- package/esm2022/lib/state/actions/actions.mjs +4 -2
- 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 +13 -10
- package/esm2022/lib/state/reducer/rit-delen.reducer.mjs +1 -1
- package/esm2022/lib/util/actie-helper.mjs +2 -2
- package/esm2022/lib/util/actie-popover-bepaler.mjs +2 -2
- 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 +186 -201
- 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/svg-visualisatie/svg-visualisatie.component.d.ts +1 -1
- package/lib/model/ritdeel.d.ts +6 -7
- package/lib/state/actions/actions.d.ts +6 -1
- 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 +2 -2
- package/lib/util/utils.d.ts +1 -0
- 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 { filter, map,
|
|
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
|
|
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
|
}
|
|
@@ -986,38 +987,6 @@ class MeldingBuilder {
|
|
|
986
987
|
}
|
|
987
988
|
}
|
|
988
989
|
|
|
989
|
-
class Utils {
|
|
990
|
-
static getValidErorrMessage(err) {
|
|
991
|
-
let errorMsg = '';
|
|
992
|
-
if (err.msg) {
|
|
993
|
-
errorMsg += err.msg;
|
|
994
|
-
}
|
|
995
|
-
if (Array.isArray(err.body)) {
|
|
996
|
-
err.body.forEach((x) => errorMsg += x);
|
|
997
|
-
}
|
|
998
|
-
else if (err.body) {
|
|
999
|
-
if (err.body instanceof ProgressEvent) {
|
|
1000
|
-
errorMsg = 'Kon geen verbinding maken met de server';
|
|
1001
|
-
}
|
|
1002
|
-
else if (err.body.text) {
|
|
1003
|
-
errorMsg += err.body.text;
|
|
1004
|
-
}
|
|
1005
|
-
else {
|
|
1006
|
-
errorMsg += err.body;
|
|
1007
|
-
}
|
|
1008
|
-
}
|
|
1009
|
-
if (err.message) {
|
|
1010
|
-
errorMsg += err.message;
|
|
1011
|
-
}
|
|
1012
|
-
if (typeof err === 'string' || err instanceof String) {
|
|
1013
|
-
errorMsg += err;
|
|
1014
|
-
}
|
|
1015
|
-
if (errorMsg !== '') {
|
|
1016
|
-
return errorMsg;
|
|
1017
|
-
}
|
|
1018
|
-
}
|
|
1019
|
-
}
|
|
1020
|
-
|
|
1021
990
|
class MessageBuilder {
|
|
1022
991
|
static rwpDataNietGevonden(err) {
|
|
1023
992
|
return new Message(Severity.ERROR, 'Error bij ophalen van rijwegplan data: ' + err);
|
|
@@ -2858,7 +2827,7 @@ class ActieHelper {
|
|
|
2858
2827
|
if (ActieHelper.isKantCodeLinks(kantcode)) {
|
|
2859
2828
|
return wissel.getLeft();
|
|
2860
2829
|
}
|
|
2861
|
-
return
|
|
2830
|
+
return null;
|
|
2862
2831
|
}
|
|
2863
2832
|
bepaalPuicVoorWisselSlijpenActie(actie) {
|
|
2864
2833
|
const storingsSymboolPuic = this.sbmService.getSBWissel(actie.wisselNaam, actie.pplgNaam)?.getStoringSymboolPuic();
|
|
@@ -2880,16 +2849,10 @@ class RitdelenLijstComponent {
|
|
|
2880
2849
|
constructor(store, sbmService) {
|
|
2881
2850
|
this.store = store;
|
|
2882
2851
|
this.sbmService = sbmService;
|
|
2883
|
-
this.nietGeplandeActies = [];
|
|
2884
2852
|
this.focusEmitter = new EventEmitter();
|
|
2885
2853
|
this.keurAlleActiesGoed = new EventEmitter();
|
|
2886
|
-
this.ritdeelViewModels = [];
|
|
2887
2854
|
this.selectedRitdeelActies = [];
|
|
2888
2855
|
this.selectedRitdeelOngeplandeActies = [];
|
|
2889
|
-
this.disableActieKnoppenVanRitdeel = true;
|
|
2890
|
-
this.editable = false;
|
|
2891
|
-
this.ongeplandeActiesMap = new ArrayMultimap();
|
|
2892
|
-
this.geplandeActies = new ArrayMultimap();
|
|
2893
2856
|
this.NG_ACTIE_PREFIX = '* ';
|
|
2894
2857
|
this.subscriptions = [];
|
|
2895
2858
|
this.subscriptions.push(store.select('ritDelen').subscribe((ritdelen) => {
|
|
@@ -2900,6 +2863,9 @@ class RitdelenLijstComponent {
|
|
|
2900
2863
|
this.subscriptions.push(store.select('ongeplandeActies').subscribe(acties => this.ongeplandeActiesMap = acties));
|
|
2901
2864
|
this.subscriptions.push(store.select('geplandeActies').subscribe(acties => this.geplandeActies = acties));
|
|
2902
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));
|
|
2903
2869
|
this.subscriptions.push(combineLatest([
|
|
2904
2870
|
this.store.select('ritDelen'),
|
|
2905
2871
|
this.store.select('ongeplandeActies')
|
|
@@ -2936,14 +2902,12 @@ class RitdelenLijstComponent {
|
|
|
2936
2902
|
this.store.dispatch(deleteRitdeel(ritdeel));
|
|
2937
2903
|
}
|
|
2938
2904
|
deleteActiesUitRit() {
|
|
2939
|
-
this.selectedRitdeel
|
|
2905
|
+
this.selectedRitdeel.acties.slice().forEach(actie => {
|
|
2940
2906
|
this.deleteActieUitRit(actie);
|
|
2941
2907
|
});
|
|
2942
2908
|
}
|
|
2943
2909
|
deleteActieUitRit(actie) {
|
|
2944
|
-
|
|
2945
|
-
return;
|
|
2946
|
-
const acties = this.selectedRitdeel.acties ?? [];
|
|
2910
|
+
const acties = this.selectedRitdeel.acties;
|
|
2947
2911
|
const idx = acties.indexOf(actie);
|
|
2948
2912
|
if (idx >= 0) {
|
|
2949
2913
|
this.verhuisActieNaarOngepland(actie);
|
|
@@ -3071,13 +3035,13 @@ class RitdelenLijstComponent {
|
|
|
3071
3035
|
return `${prefix}${ActieHelper.getVSTActieOmschrijving(actie)}`;
|
|
3072
3036
|
}
|
|
3073
3037
|
bepaalPrefixVoorActieOmschrijving(actie) {
|
|
3074
|
-
const
|
|
3075
|
-
if (this.selectedRitdeel
|
|
3038
|
+
const prefix = '';
|
|
3039
|
+
if (this.selectedRitdeel.acties.includes(actie)) {
|
|
3076
3040
|
// Afwijkende naam bij niet gevisualiseerde actie in rit
|
|
3077
3041
|
const puics = this.geplandeActies.get(actie);
|
|
3078
|
-
return puics.length > 0 ?
|
|
3042
|
+
return puics.length > 0 ? prefix : this.NG_ACTIE_PREFIX;
|
|
3079
3043
|
}
|
|
3080
|
-
return
|
|
3044
|
+
return prefix;
|
|
3081
3045
|
}
|
|
3082
3046
|
actieVanKmTekst(actie) {
|
|
3083
3047
|
if (ActieHelper.isWisselSlijpenActie(actie)) {
|
|
@@ -3098,7 +3062,6 @@ class RitdelenLijstComponent {
|
|
|
3098
3062
|
return ritdeel.getPplgString();
|
|
3099
3063
|
}
|
|
3100
3064
|
getKantCode(stand) {
|
|
3101
|
-
// @ts-ignore
|
|
3102
3065
|
if (stand === window['domein'].Stand.LINKS) {
|
|
3103
3066
|
return 'L';
|
|
3104
3067
|
}
|
|
@@ -3235,6 +3198,40 @@ class RitdeelViewModel {
|
|
|
3235
3198
|
}
|
|
3236
3199
|
}
|
|
3237
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
|
+
|
|
3238
3235
|
class ViewerControlsComponent {
|
|
3239
3236
|
constructor(store, viewerControlsService, bewegingUtils) {
|
|
3240
3237
|
this.store = store;
|
|
@@ -3244,7 +3241,6 @@ class ViewerControlsComponent {
|
|
|
3244
3241
|
this.printing$ = this.viewerControlsService.isPrinting$();
|
|
3245
3242
|
this.valideRit$ = this.viewerControlsService.isValideRit$();
|
|
3246
3243
|
this.subscriptions = new Subscription();
|
|
3247
|
-
this.editable = false;
|
|
3248
3244
|
this.subscriptions.add(this.store.select('editable').subscribe(editable => this.editable = editable));
|
|
3249
3245
|
}
|
|
3250
3246
|
ngOnChanges({ treinpad }) {
|
|
@@ -3328,7 +3324,7 @@ class ActiePopoverBepaler {
|
|
|
3328
3324
|
ongeplandeActies.entries.forEach(entry => {
|
|
3329
3325
|
const treinNummerActieInfos = puicNaarOngeplandeActieMap.get(entry.key);
|
|
3330
3326
|
if (!treinNummerActieInfos?.map(({ actie }) => actie).includes(entry.value.actie)) {
|
|
3331
|
-
puicNaarOngeplandeActieMap.put(entry.key, { actie: entry.value.actie });
|
|
3327
|
+
puicNaarOngeplandeActieMap.put(entry.key, { treinNummer: undefined, actie: entry.value.actie });
|
|
3332
3328
|
}
|
|
3333
3329
|
});
|
|
3334
3330
|
}
|
|
@@ -3388,15 +3384,12 @@ class SvgVisualisatieComponent {
|
|
|
3388
3384
|
this.actieHelper = actieHelper;
|
|
3389
3385
|
this.sbmService = sbmService;
|
|
3390
3386
|
this.editorService = editorService;
|
|
3391
|
-
this.nietGeplandeActies = [];
|
|
3392
|
-
this.useClickArea = false;
|
|
3393
3387
|
this.svgInfos$ = this.store.select('svgInfos');
|
|
3394
3388
|
this.popoverInfos = [];
|
|
3395
3389
|
this.clickableIds = [];
|
|
3396
3390
|
this.rightClickableIds = [];
|
|
3397
3391
|
this.contextMenuActions = [];
|
|
3398
3392
|
this.contextMenuStyle = { display: 'none' };
|
|
3399
|
-
this.editable = false;
|
|
3400
3393
|
this.puicNaarBeginSeinRitdeel = new Map();
|
|
3401
3394
|
this.puicNaarEindSeinCombinatie = new Map();
|
|
3402
3395
|
this.puicNaarAlternatieveRoute = new Map();
|
|
@@ -3420,7 +3413,7 @@ class SvgVisualisatieComponent {
|
|
|
3420
3413
|
}));
|
|
3421
3414
|
}
|
|
3422
3415
|
ngOnInit() {
|
|
3423
|
-
document.getElementById('contextMenu')
|
|
3416
|
+
document.getElementById('contextMenu').addEventListener('mouseleave', () => this.hideContextMenu());
|
|
3424
3417
|
}
|
|
3425
3418
|
ngOnDestroy() {
|
|
3426
3419
|
this.subscriptions.forEach(s => s.unsubscribe());
|
|
@@ -3447,6 +3440,7 @@ class SvgVisualisatieComponent {
|
|
|
3447
3440
|
this.store.dispatch(navigeerBuitenRit(puic));
|
|
3448
3441
|
}
|
|
3449
3442
|
}
|
|
3443
|
+
this.store.dispatch(SetSelectedRitdeel(undefined));
|
|
3450
3444
|
}
|
|
3451
3445
|
handleImxviewRightClick(evt) {
|
|
3452
3446
|
const fn = () => {
|
|
@@ -3590,7 +3584,7 @@ class SvgVisualisatieComponent {
|
|
|
3590
3584
|
});
|
|
3591
3585
|
this.viewerControlsService.setValideRit(!gebrokenRit);
|
|
3592
3586
|
this.store.dispatch(SetGeplandeActies(actieOpRitSelectiePuics));
|
|
3593
|
-
const actieOpRitSelectiePuicsArray = Array.from(actieOpRitSelectiePuics.values())
|
|
3587
|
+
const actieOpRitSelectiePuicsArray = Utils.flatMap(Array.from(actieOpRitSelectiePuics.values()), x => x);
|
|
3594
3588
|
this.store.dispatch(SetActieOpRitSelectieIds(actieOpRitSelectiePuicsArray));
|
|
3595
3589
|
ritSelectiePuics = ritSelectiePuics.filter(item => actieOpRitSelectiePuicsArray.indexOf(item) < 0); // make mutually exclusive
|
|
3596
3590
|
this.store.dispatch(SetRitSelectieIds(ritSelectiePuics));
|
|
@@ -4042,10 +4036,10 @@ class Ritdeel {
|
|
|
4042
4036
|
getZichtbaarheidBuitenPaginatie() {
|
|
4043
4037
|
return this.zichtbaarBuitenPaginatie;
|
|
4044
4038
|
}
|
|
4045
|
-
bepaalTopologieElementen(
|
|
4046
|
-
const topoElementen =
|
|
4039
|
+
bepaalTopologieElementen(signaleringsBeeldManagerService) {
|
|
4040
|
+
const topoElementen = signaleringsBeeldManagerService.bepaalRouteElementen(this.getRoute());
|
|
4047
4041
|
if (this.heeftVrijebaanInfo()) {
|
|
4048
|
-
const vrijebaanTopoElementen =
|
|
4042
|
+
const vrijebaanTopoElementen = signaleringsBeeldManagerService.bepaalRouteElementen(this.getVrijebaanPrlRoute());
|
|
4049
4043
|
topoElementen.push(...vrijebaanTopoElementen);
|
|
4050
4044
|
}
|
|
4051
4045
|
this.topoElementen = topoElementen;
|
|
@@ -4091,7 +4085,7 @@ class RitLezerService {
|
|
|
4091
4085
|
ritDelen.push(new Ritdeel(dwangInfo, beweging.ritActies, beweging, vrijebaanDwangInfo, vervolgSpoor, []));
|
|
4092
4086
|
}
|
|
4093
4087
|
extractVrijebaanDwangInfo(beweging, rijwegPlan, rijweg) {
|
|
4094
|
-
let vrijebaanDwangInfo =
|
|
4088
|
+
let vrijebaanDwangInfo = null;
|
|
4095
4089
|
let vervolgSpoor;
|
|
4096
4090
|
if (beweging.naarSpoor.endsWith(SPOOR_NAAR_VRIJEBAAN_POSTFIX) ||
|
|
4097
4091
|
beweging.naarSpoor.endsWith(SPOOR_NAAR_VEERWISSEL_VRIJEBAAN_POSTFIX)) {
|
|
@@ -4105,9 +4099,9 @@ class RitLezerService {
|
|
|
4105
4099
|
vrijebaanRijweg = vrijebaanRijwegen[0];
|
|
4106
4100
|
vrijebaanDwang = vrijebaanRijweg.getDwangVoorDwangNummer(0);
|
|
4107
4101
|
vervolgSpoor = vrijebaanRijwegplan.getVervolgSpoor(vrijebaanRijweg);
|
|
4108
|
-
vrijebaanDwangInfo =
|
|
4109
|
-
new RijwegplanRijwegDwangCombinatie(vrijebaanRijwegplan, vrijebaanRijweg, vrijebaanDwang);
|
|
4110
4102
|
}
|
|
4103
|
+
vrijebaanDwangInfo =
|
|
4104
|
+
new RijwegplanRijwegDwangCombinatie(vrijebaanRijwegplan, vrijebaanRijweg, vrijebaanDwang);
|
|
4111
4105
|
}
|
|
4112
4106
|
}
|
|
4113
4107
|
return { vrijebaanDwangInfo, vervolgSpoor };
|
|
@@ -4414,7 +4408,7 @@ class LaadRouteFilesEffect {
|
|
|
4414
4408
|
const promise = this.editorService.laadRouteFiles(actie.iaversieinfo.versie, pplgs);
|
|
4415
4409
|
promise.then(() => {
|
|
4416
4410
|
this.updateRitdelen(actie);
|
|
4417
|
-
},
|
|
4411
|
+
}, err => {
|
|
4418
4412
|
this.messagesService.showMessage(MessageBuilder.rwpDataNietGevonden(Utils.getValidErorrMessage(err)));
|
|
4419
4413
|
});
|
|
4420
4414
|
});
|
|
@@ -4474,14 +4468,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4474
4468
|
}] });
|
|
4475
4469
|
|
|
4476
4470
|
class LaadSignaleringsbeeldenEffect {
|
|
4477
|
-
constructor(actions$, store, signaleringsBeeldManagerService, editorService, sbiResource, connectorService,
|
|
4471
|
+
constructor(actions$, store, signaleringsBeeldManagerService, editorService, sbiResource, connectorService, messagesSerivce) {
|
|
4478
4472
|
this.actions$ = actions$;
|
|
4479
4473
|
this.store = store;
|
|
4480
4474
|
this.signaleringsBeeldManagerService = signaleringsBeeldManagerService;
|
|
4481
4475
|
this.editorService = editorService;
|
|
4482
4476
|
this.sbiResource = sbiResource;
|
|
4483
4477
|
this.connectorService = connectorService;
|
|
4484
|
-
this.
|
|
4478
|
+
this.messagesSerivce = messagesSerivce;
|
|
4485
4479
|
this.SVG_PIXEL_RUIMTE = 30;
|
|
4486
4480
|
this.verwerkRitdelen$ = createEffect(() => this.actions$.pipe(ofType(setRitDelen, navigeer, navigeerVanaf), withLatestFrom(this.store), map(([actie, storeState]) => {
|
|
4487
4481
|
this.store.dispatch(SetOngeplandeActiesBepaald(false));
|
|
@@ -4496,13 +4490,13 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4496
4490
|
}
|
|
4497
4491
|
handleSignaleringsbeeldInfo({ actie, storeState }) {
|
|
4498
4492
|
return this.sbiResource.laadSignaleringsbeeldInfo(this.createSignaleringsbeeldInfoQueryDto(actie.pplgs, storeState.iaVersie)).pipe(take(1), tap((dtos) => this.processResponse({ dtos, storeState, actie })), catchError((err) => {
|
|
4499
|
-
this.
|
|
4493
|
+
this.messagesSerivce.showMessage(MessageBuilder.nietGevondenSBI(err));
|
|
4500
4494
|
return throwError(() => err);
|
|
4501
4495
|
}));
|
|
4502
4496
|
}
|
|
4503
4497
|
processResponse({ dtos, storeState, actie }) {
|
|
4504
4498
|
if (dtos && dtos.filter(dto => dto.metVisualisatie).length > 12) {
|
|
4505
|
-
this.
|
|
4499
|
+
this.messagesSerivce.showMessage(MessageBuilder.meerDan12BladenGevonden(dtos.length));
|
|
4506
4500
|
}
|
|
4507
4501
|
this.store.dispatch(SetSignaleringsbeeldInfoDtos(dtos, storeState.iaVersie, actie.rit, actie.paginationSize, actie.ritGewijzigdToegestaan));
|
|
4508
4502
|
this.store.dispatch(SetVisibleSignaleringsbeeldInfoDtos(dtos));
|
|
@@ -4515,11 +4509,11 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4515
4509
|
return this.sbiResource.laadSignaleringsbeeldInfo(this.createSignaleringsbeeldInfoQueryDto([rand.getPPLG(), otherPplg], storeState.iaVersie)).pipe(map(dtos => ({ dtos, storeState })));
|
|
4516
4510
|
}
|
|
4517
4511
|
loadSignaleringsbeelden({ dtos, storeState }) {
|
|
4518
|
-
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 })));
|
|
4519
4513
|
}
|
|
4520
|
-
processSvgsAndUpdateRitdelen({ svgDataUrls,
|
|
4514
|
+
processSvgsAndUpdateRitdelen({ svgDataUrls, storeState, dtos }) {
|
|
4521
4515
|
this.verwerkSvgs(svgDataUrls);
|
|
4522
|
-
const nieuweRitdelen = this.updateRitdelen(ritDelen, dtos);
|
|
4516
|
+
const nieuweRitdelen = this.updateRitdelen(storeState.ritDelen, dtos);
|
|
4523
4517
|
this.store.dispatch(UpdateVisibleSignaleringsbeeldInfoDtos(dtos));
|
|
4524
4518
|
this.store.dispatch(updateRitDelen(nieuweRitdelen));
|
|
4525
4519
|
}
|
|
@@ -4536,7 +4530,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4536
4530
|
this.verwerkSvgs(svgDataUrls);
|
|
4537
4531
|
this.updateState(ritDelen, visibleDtos, storeState, visibleRitPplgs, loadingDtos, isInit, storeDtos);
|
|
4538
4532
|
}), catchError(err => {
|
|
4539
|
-
this.
|
|
4533
|
+
this.messagesSerivce.showMessage(MessageBuilder.rwpDataNietGevonden(Utils.getValidErorrMessage(err)));
|
|
4540
4534
|
throw err;
|
|
4541
4535
|
})).subscribe();
|
|
4542
4536
|
}
|
|
@@ -4591,8 +4585,8 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4591
4585
|
dtos.filter(d => !visibleDtos.includes(d)).forEach(d => d.metVisualisatie = false);
|
|
4592
4586
|
return visibleDtos;
|
|
4593
4587
|
}
|
|
4594
|
-
distinct(value, index,
|
|
4595
|
-
return
|
|
4588
|
+
distinct(value, index, self) {
|
|
4589
|
+
return self.indexOf(value) === index;
|
|
4596
4590
|
}
|
|
4597
4591
|
addPrevNonVisibleDto(firstIdx, ritdelen, loadingDtos, visibleRitPplgs, allDtos) {
|
|
4598
4592
|
if (firstIdx >= 0) {
|
|
@@ -4681,7 +4675,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4681
4675
|
}
|
|
4682
4676
|
}
|
|
4683
4677
|
}
|
|
4684
|
-
this.
|
|
4678
|
+
this.updateZichtbaarheidAangrezendeRitdelen(min, max, ritdelen, visibleDtos);
|
|
4685
4679
|
return this.updateZichtbaarheidBuitenWindow(ritdelen, visibleDtos);
|
|
4686
4680
|
}
|
|
4687
4681
|
updateZichtbaarheidBuitenWindow(nieuweRitdelen, visibleDtos) {
|
|
@@ -4697,7 +4691,7 @@ class LaadSignaleringsbeeldenEffect {
|
|
|
4697
4691
|
}
|
|
4698
4692
|
return nieuweRitdelen;
|
|
4699
4693
|
}
|
|
4700
|
-
|
|
4694
|
+
updateZichtbaarheidAangrezendeRitdelen(min, max, nieuweRitdelen, visibleDtos) {
|
|
4701
4695
|
let i = min - 1;
|
|
4702
4696
|
while (i >= 0) {
|
|
4703
4697
|
i = this.updateZichtbaarHeid(i, 0, visibleDtos, nieuweRitdelen) - 1;
|
|
@@ -4832,11 +4826,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4832
4826
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: BewegingVerrijkerService }] });
|
|
4833
4827
|
|
|
4834
4828
|
class RitdelenEffect {
|
|
4835
|
-
constructor(actions$, store, sbmService,
|
|
4829
|
+
constructor(actions$, store, sbmService, rijwegPlanEditorService) {
|
|
4836
4830
|
this.actions$ = actions$;
|
|
4837
4831
|
this.store = store;
|
|
4838
4832
|
this.sbmService = sbmService;
|
|
4839
|
-
this.
|
|
4833
|
+
this.rijwegPlanEditorService = rijwegPlanEditorService;
|
|
4840
4834
|
this.updateRitDelen$ = createEffect(() => this.actions$.pipe(ofType(updateRitDelen), withLatestFrom(this.store), map(([actie, _storeState]) => {
|
|
4841
4835
|
const nieuweRitDelen = actie.ritDelen.map(ritDeel => ritDeel.isZichtbaar() ?
|
|
4842
4836
|
ritDeel.copyMetAlternatieveRoutes(this.sbmService.bepaalAlternativeRoutes(ritDeel.getRijweg())) : ritDeel);
|
|
@@ -4854,25 +4848,25 @@ class RitdelenEffect {
|
|
|
4854
4848
|
return setRitdelenAfterUpdate(ritDelen);
|
|
4855
4849
|
})));
|
|
4856
4850
|
this.ritdeelInvoegen$ = createEffect(() => this.actions$.pipe(ofType(ritdeelInvoegen), withLatestFrom(this.store), map(([actie, storeState]) => {
|
|
4857
|
-
const ritDelen = this.ritdeelInvoegenFunc(storeState.ritDelen, actie.nieuweRoute);
|
|
4851
|
+
const ritDelen = this.ritdeelInvoegenFunc(storeState.ritDelen, actie.nieuweRoute, this.rijwegPlanEditorService, this.sbmService);
|
|
4858
4852
|
return setRitdelenAfterUpdate(ritDelen);
|
|
4859
4853
|
})));
|
|
4860
4854
|
}
|
|
4861
|
-
ritdeelInvoegenFunc(ritDelen, nieuweRoute) {
|
|
4855
|
+
ritdeelInvoegenFunc(ritDelen, nieuweRoute, rijwegPlanEditorService, sbmService) {
|
|
4862
4856
|
const origineelRitdeel = nieuweRoute.beginSeinOpRitdeel.ritdeel;
|
|
4863
4857
|
const beginSein = nieuweRoute.beginSeinOpRitdeel.sein;
|
|
4864
|
-
const rijwegplan =
|
|
4858
|
+
const rijwegplan = rijwegPlanEditorService.getRijwegplan(beginSein.getPPLG());
|
|
4865
4859
|
const dwangen = JsJavaUtil.listToArray(rijwegplan.getOnderliggendeDwangenTotEnVanSein(origineelRitdeel.getDwang(), beginSein));
|
|
4866
4860
|
const isSamengesteldeRoute = dwangen[0] && dwangen[1];
|
|
4867
4861
|
let newRitdeel1 = origineelRitdeel;
|
|
4868
4862
|
if (isSamengesteldeRoute) {
|
|
4869
|
-
newRitdeel1 = this.verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, ritDelen);
|
|
4863
|
+
newRitdeel1 = this.verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, sbmService, ritDelen);
|
|
4870
4864
|
}
|
|
4871
4865
|
if (nieuweRoute.combinatieVoorEindsein.isVrijeBaanRijweg()) {
|
|
4872
|
-
this.extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute);
|
|
4866
|
+
this.extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute, sbmService);
|
|
4873
4867
|
}
|
|
4874
4868
|
else {
|
|
4875
|
-
this.maakNieuwRitdeel(newRitdeel1, nieuweRoute, ritDelen);
|
|
4869
|
+
this.maakNieuwRitdeel(newRitdeel1, nieuweRoute, sbmService, ritDelen);
|
|
4876
4870
|
}
|
|
4877
4871
|
if (isSamengesteldeRoute) {
|
|
4878
4872
|
ritDelen.splice(ritDelen.indexOf(origineelRitdeel), 1);
|
|
@@ -4887,38 +4881,38 @@ class RitdelenEffect {
|
|
|
4887
4881
|
}
|
|
4888
4882
|
}
|
|
4889
4883
|
}
|
|
4890
|
-
verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, ritDelen) {
|
|
4884
|
+
verwerkSamengesteldeRoute(origineelRitdeel, rijwegplan, dwangen, sbmService, ritDelen) {
|
|
4891
4885
|
// dwangen in 2 nieuwe ritdelen verwerken voor de knip
|
|
4892
4886
|
const nieuweRijweg1 = rijwegplan.getRijwegVoorSeinen(dwangen[0].getRoute().getBeginSein(), dwangen[0].getRoute().getEindSein());
|
|
4893
4887
|
const dwangInfo1 = new RijwegplanRijwegDwangCombinatie(rijwegplan, nieuweRijweg1, dwangen[0]);
|
|
4894
|
-
const newRitdeel1 = new Ritdeel(dwangInfo1, [],
|
|
4888
|
+
const newRitdeel1 = new Ritdeel(dwangInfo1, [], null, null, null, []);
|
|
4895
4889
|
// remove vrijbaan info uit ritdeel
|
|
4896
|
-
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi =
|
|
4897
|
-
newRitdeel1.vervolgSpoor =
|
|
4898
|
-
newRitdeel1.bepaalTopologieElementen(
|
|
4890
|
+
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi = null;
|
|
4891
|
+
newRitdeel1.vervolgSpoor = null;
|
|
4892
|
+
newRitdeel1.bepaalTopologieElementen(sbmService);
|
|
4899
4893
|
this.insertRitdeel(ritDelen, origineelRitdeel, newRitdeel1);
|
|
4900
4894
|
const nieuweRijweg2 = rijwegplan.getRijwegVoorSeinen(dwangen[1].getRoute().getBeginSein(), dwangen[1].getRoute().getEindSein());
|
|
4901
4895
|
const dwangInfo2 = new RijwegplanRijwegDwangCombinatie(rijwegplan, nieuweRijweg2, dwangen[1]);
|
|
4902
|
-
const newRitdeel2 = new Ritdeel(dwangInfo2, [],
|
|
4903
|
-
newRitdeel2.bepaalTopologieElementen(
|
|
4896
|
+
const newRitdeel2 = new Ritdeel(dwangInfo2, [], null, null, null, []);
|
|
4897
|
+
newRitdeel2.bepaalTopologieElementen(sbmService);
|
|
4904
4898
|
this.insertRitdeel(ritDelen, newRitdeel1, newRitdeel2);
|
|
4905
4899
|
return newRitdeel1;
|
|
4906
4900
|
}
|
|
4907
|
-
extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute) {
|
|
4901
|
+
extendRitdeelMetVrijebaanInfo(newRitdeel1, nieuweRoute, sbmService) {
|
|
4908
4902
|
newRitdeel1.vrijebaanRijwegplanRijwegDwangCombi = nieuweRoute.combinatieVoorEindsein;
|
|
4909
4903
|
const vbrwp = nieuweRoute.combinatieVoorEindsein.rijwegplan;
|
|
4910
4904
|
newRitdeel1.vervolgSpoor = vbrwp.getVervolgSpoor(nieuweRoute.combinatieVoorEindsein.rijweg);
|
|
4911
|
-
newRitdeel1.bepaalTopologieElementen(
|
|
4905
|
+
newRitdeel1.bepaalTopologieElementen(sbmService);
|
|
4912
4906
|
}
|
|
4913
|
-
maakNieuwRitdeel(newRitdeel1, nieuweRoute, ritDelen) {
|
|
4907
|
+
maakNieuwRitdeel(newRitdeel1, nieuweRoute, sbmService, ritDelen) {
|
|
4914
4908
|
let newRitdeel = this.createRitdeel(nieuweRoute);
|
|
4915
|
-
const altRoutes =
|
|
4909
|
+
const altRoutes = sbmService.bepaalAlternativeRoutes(newRitdeel.getRijweg());
|
|
4916
4910
|
newRitdeel = newRitdeel.copyMetAlternatieveRoutes(altRoutes);
|
|
4917
|
-
newRitdeel.bepaalTopologieElementen(
|
|
4911
|
+
newRitdeel.bepaalTopologieElementen(sbmService);
|
|
4918
4912
|
this.insertRitdeel(ritDelen, newRitdeel1, newRitdeel);
|
|
4919
4913
|
}
|
|
4920
4914
|
createRitdeel(nieuweRoute) {
|
|
4921
|
-
return new Ritdeel(nieuweRoute.combinatieVoorEindsein, [],
|
|
4915
|
+
return new Ritdeel(nieuweRoute.combinatieVoorEindsein, [], null, null, null, []);
|
|
4922
4916
|
}
|
|
4923
4917
|
insertRitdeel(ritdelen, naRitdeelPositie, newRitdeel) {
|
|
4924
4918
|
const idx = ritdelen.indexOf(naRitdeelPositie);
|
|
@@ -4969,17 +4963,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.7", ngImpor
|
|
|
4969
4963
|
type: Injectable
|
|
4970
4964
|
}], ctorParameters: () => [{ type: i1$2.Actions }, { type: i2$1.Store }, { type: SignaleringsBeeldManagerService }, { type: i4.SignaleringsbeeldSvgUtilityService }] });
|
|
4971
4965
|
|
|
4972
|
-
class ProgressIndicator {
|
|
4973
|
-
constructor(lowerText, upperText, iconClass) {
|
|
4974
|
-
this.lowerText = '';
|
|
4975
|
-
this.upperText = '';
|
|
4976
|
-
this.iconClass = '';
|
|
4977
|
-
this.lowerText = lowerText ?? this.lowerText;
|
|
4978
|
-
this.upperText = upperText ?? this.upperText;
|
|
4979
|
-
this.iconClass = iconClass ?? this.iconClass;
|
|
4980
|
-
}
|
|
4981
|
-
}
|
|
4982
|
-
|
|
4983
4966
|
class NieuweRoute {
|
|
4984
4967
|
constructor(beginSeinOpRitdeel, combinatieVoorEindsein) {
|
|
4985
4968
|
this.beginSeinOpRitdeel = beginSeinOpRitdeel;
|
|
@@ -5052,7 +5035,7 @@ function addRitdeelActieFunc(ritDelen, { ritDeel, actie }) {
|
|
|
5052
5035
|
const onIdsActionHandler = (action) => on(action, (_, { ids }) => ids);
|
|
5053
5036
|
const createIdsReducer = (action) => createReducer([], onIdsActionHandler(action));
|
|
5054
5037
|
const editableReducer = createReducer(true, on(setEditable, (_, { editable }) => editable));
|
|
5055
|
-
const progressIndicatorReducer = createReducer(
|
|
5038
|
+
const progressIndicatorReducer = createReducer(undefined, on(ShowProgress, () => ({ progressIndicator: {} })), on(ClearProgress, () => undefined));
|
|
5056
5039
|
const svgInfoReducer = createReducer([], on(SetSvgInfos, (_, { svgInfos }) => svgInfos));
|
|
5057
5040
|
const debugReducer = createReducer(false, on(SetDebug, (_, { debug }) => debug));
|
|
5058
5041
|
const ritSelectieIdsReducer = createIdsReducer(SetRitSelectieIds);
|
|
@@ -5078,10 +5061,12 @@ const ongeplandeActieReducer = createReducer(new ArrayMultimap(), on(SetOngeplan
|
|
|
5078
5061
|
ongeplandeActie.puics.forEach(puic => ongeplandeActies.delete(puic, ongeplandeActie));
|
|
5079
5062
|
return new ArrayMultimap(ongeplandeActies);
|
|
5080
5063
|
}));
|
|
5081
|
-
const ongeplandeActieSelectieIdsReducer = createReducer([],
|
|
5064
|
+
const ongeplandeActieSelectieIdsReducer = createReducer([],
|
|
5065
|
+
// on(MstActions.SetOngeplandeActieSelectieIds, (_, { ids }) => ids),
|
|
5066
|
+
onIdsActionHandler(SetOngeplandeActieSelectieIds), on(AddOngeplandeActie, (ids, { ongeplandeActie }) => {
|
|
5082
5067
|
ongeplandeActie.puics.filter(puic => !ids.includes(puic)).forEach(puic => ids.push(puic));
|
|
5083
5068
|
return [...ids];
|
|
5084
|
-
}), 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)));
|
|
5085
5070
|
const gebrokenRitSelectieIdsReducer = createIdsReducer(SetGebrokenRitSelectieIds);
|
|
5086
5071
|
const alternatievenSelectieIdsReducer = createIdsReducer(SetAlternatievenSelectieIds);
|
|
5087
5072
|
const beginSeinSelectieIdsReducer = createIdsReducer(SetBeginSeinSelectieIds);
|
|
@@ -5090,15 +5075,16 @@ const alternatievenClickableIdsReducer = createIdsReducer(SetAlternatievenClicka
|
|
|
5090
5075
|
const eindSeinenClickableIdsReducer = createIdsReducer(SetEindSeinenClickableIds);
|
|
5091
5076
|
const connectorClickableIdsReducer = createIdsReducer(SetConnectorenClickableIds);
|
|
5092
5077
|
const beginSeinRightClickableIdsReducer = createIdsReducer(SetBeginSeinRightClickableIds);
|
|
5093
|
-
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)));
|
|
5094
5079
|
const signaleringsbeeldInfoDtosReducer = createReducer([], on(SetSignaleringsbeeldInfoDtos, (_, { dtos }) => dtos), on(UpdateSignaleringsbeeldInfoDtos, (_, { dtos }) => [...dtos]));
|
|
5095
5080
|
const visibleSbInfoDtosReducer = createReducer([], on(SetVisibleSignaleringsbeeldInfoDtos, (_, { dtos }) => dtos), on(UpdateVisibleSignaleringsbeeldInfoDtos, (_, { dtos }) => [...dtos]));
|
|
5096
|
-
const iaVersieReducer = createReducer({
|
|
5081
|
+
const iaVersieReducer = createReducer({}, on(SetIaVersie, (_, { iaVersie }) => Object.assign({}, iaVersie, { versie: iaVersie.versie.toUpperCase() })));
|
|
5097
5082
|
const algemeneRitInfoDtoReducer = createReducer({}, on(SetAlgemeneRitInfo, (_, { algemeneRitInfoDto }) => algemeneRitInfoDto));
|
|
5098
5083
|
const ongeplandeActiesBepaaldReducer = createReducer(false, on(SetOngeplandeActiesBepaald, (_, { bepaald }) => bepaald));
|
|
5099
|
-
const nieuweBewegingReducer = createReducer(
|
|
5100
|
-
const baseUrlReducer = createReducer(
|
|
5101
|
-
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));
|
|
5102
5088
|
const storeReducers = {
|
|
5103
5089
|
ritDelen: ritdelenReducer,
|
|
5104
5090
|
ritSelectieIds: ritSelectieIdsReducer,
|
|
@@ -5127,9 +5113,9 @@ const storeReducers = {
|
|
|
5127
5113
|
nieuweBewegingen: nieuweBewegingReducer,
|
|
5128
5114
|
baseUrl: baseUrlReducer,
|
|
5129
5115
|
focusIds: focusIdsReducer,
|
|
5116
|
+
selectedRitdeelId: selectedRitdeelIdReducer
|
|
5130
5117
|
};
|
|
5131
5118
|
|
|
5132
|
-
// @ts-nocheck
|
|
5133
5119
|
class ZoneUtil {
|
|
5134
5120
|
constructor(ngZone) {
|
|
5135
5121
|
this.ngZone = ngZone;
|
|
@@ -5192,7 +5178,6 @@ class MstViewerModule {
|
|
|
5192
5178
|
constructor(service, zoneUtil) {
|
|
5193
5179
|
this.service = service;
|
|
5194
5180
|
// maak de EditorService toegankelijk voor GWT code
|
|
5195
|
-
// @ts-ignore
|
|
5196
5181
|
window['rpe'] = {
|
|
5197
5182
|
EditorService: zoneUtil.proxy(service)
|
|
5198
5183
|
};
|