phoenix-ui-components 2.14.1 → 2.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/README.md +2 -2
- package/dist/components/file-explorer/file-explorer.component.d.ts +9 -3
- package/dist/components/loader/loader.component.d.ts +1 -1
- package/dist/components/phoenix-menu/config/config-slider/config-slider.component.d.ts +1 -1
- package/dist/components/phoenix-menu/phoenix-menu-item/phoenix-menu-item.component.d.ts +1 -1
- package/dist/components/phoenix-menu/phoenix-menu.component.d.ts +1 -1
- package/dist/components/phoenix-ui.module.d.ts +62 -59
- package/dist/components/ui-menu/animate-camera/animate-camera.component.d.ts +1 -1
- package/dist/components/ui-menu/collections-info/collections-info-overlay/collections-info-overlay.component.d.ts +3 -1
- package/dist/components/ui-menu/cycle-events/cycle-events.component.d.ts +7 -2
- package/dist/components/ui-menu/event-data-explorer/event-data-explorer-dialog/event-data-explorer-dialog.component.d.ts +7 -8
- package/dist/components/ui-menu/event-data-explorer/event-data-explorer.component.d.ts +1 -1
- package/dist/components/ui-menu/experiment-info/experiment-info.component.d.ts +1 -1
- package/dist/components/ui-menu/geometry-browser/geometry-browser-overlay/geometry-browser-overlay.component.d.ts +22 -0
- package/dist/components/ui-menu/geometry-browser/geometry-browser.component.d.ts +15 -0
- package/dist/components/ui-menu/index.d.ts +3 -0
- package/dist/components/ui-menu/info-panel/info-panel-overlay/info-panel-overlay.component.d.ts +1 -1
- package/dist/components/ui-menu/io-options/io-options-dialog/io-options-dialog.component.d.ts +1 -1
- package/dist/components/ui-menu/io-options/io-options.component.d.ts +1 -1
- package/dist/components/ui-menu/make-picture/make-picture.component.d.ts +3 -0
- package/dist/components/ui-menu/menu-toggle/menu-toggle.component.d.ts +1 -1
- package/dist/components/ui-menu/object-selection/object-selection-overlay/object-selection-overlay.component.d.ts +1 -1
- package/dist/components/ui-menu/overlay/overlay.component.d.ts +1 -1
- package/dist/components/ui-menu/overlay-view/overlay-view-window/overlay-view-window.component.d.ts +1 -1
- package/dist/components/ui-menu/tree-menu/tree-menu-item/tree-menu-item.component.d.ts +1 -1
- package/dist/components/ui-menu/ui-menu.component.d.ts +1 -1
- package/dist/components/ui-menu/view-options/cartesian-grid-config/cartesian-grid-config.component.d.ts +51 -0
- package/dist/components/ui-menu/view-options/view-options.component.d.ts +21 -4
- package/dist/esm2022/components/embed-menu/embed-menu.component.mjs +22 -0
- package/dist/esm2022/components/embed-menu/experiment-link/experiment-link.component.mjs +27 -0
- package/dist/esm2022/components/file-explorer/file-explorer.component.mjs +109 -0
- package/dist/esm2022/components/loader/loader.component.mjs +71 -0
- package/dist/esm2022/components/nav/nav.component.mjs +19 -0
- package/dist/esm2022/components/phoenix-menu/config/config-slider/config-slider.component.mjs +81 -0
- package/dist/esm2022/components/phoenix-menu/phoenix-menu-item/phoenix-menu-item.component.mjs +304 -0
- package/dist/esm2022/components/phoenix-menu/phoenix-menu.component.mjs +23 -0
- package/dist/esm2022/components/phoenix-ui.module.mjs +254 -0
- package/dist/esm2022/components/ring-loader/ring-loader.component.mjs +16 -0
- package/dist/esm2022/components/ui-menu/animate-camera/animate-camera.component.mjs +120 -0
- package/dist/esm2022/components/ui-menu/animate-event/animate-event.component.mjs +33 -0
- package/dist/esm2022/components/ui-menu/ar-toggle/ar-toggle.component.mjs +83 -0
- package/dist/esm2022/components/ui-menu/auto-rotate/auto-rotate.component.mjs +29 -0
- package/dist/esm2022/components/ui-menu/collections-info/collections-info-overlay/collections-info-overlay.component.mjs +273 -0
- package/dist/esm2022/components/ui-menu/collections-info/collections-info.component.mjs +44 -0
- package/dist/esm2022/components/ui-menu/cycle-events/cycle-events.component.mjs +90 -0
- package/dist/esm2022/components/ui-menu/dark-theme/dark-theme.component.mjs +32 -0
- package/dist/esm2022/components/ui-menu/event-data-explorer/event-data-explorer-dialog/event-data-explorer-dialog.component.mjs +128 -0
- package/dist/esm2022/components/ui-menu/event-data-explorer/event-data-explorer.component.mjs +35 -0
- package/dist/esm2022/components/ui-menu/event-selector/event-selector.component.mjs +54 -0
- package/dist/esm2022/components/ui-menu/experiment-info/experiment-info.component.mjs +100 -0
- package/dist/esm2022/components/ui-menu/geometry-browser/geometry-browser-overlay/geometry-browser-overlay.component.mjs +172 -0
- package/dist/esm2022/components/ui-menu/geometry-browser/geometry-browser.component.mjs +44 -0
- package/dist/esm2022/components/ui-menu/index.mjs +40 -0
- package/dist/esm2022/components/ui-menu/info-panel/info-panel-overlay/info-panel-overlay.component.mjs +69 -0
- package/dist/esm2022/components/ui-menu/info-panel/info-panel.component.mjs +59 -0
- package/dist/esm2022/components/ui-menu/io-options/io-options-dialog/io-options-dialog.component.mjs +294 -0
- package/dist/esm2022/components/ui-menu/io-options/io-options.component.mjs +36 -0
- package/dist/esm2022/components/ui-menu/main-view-toggle/main-view-toggle.component.mjs +32 -0
- package/dist/esm2022/components/ui-menu/make-picture/make-picture.component.mjs +109 -0
- package/dist/esm2022/components/ui-menu/menu-toggle/menu-toggle.component.mjs +40 -0
- package/dist/esm2022/components/ui-menu/object-clipping/object-clipping.component.mjs +72 -0
- package/dist/esm2022/components/ui-menu/object-selection/object-selection-overlay/object-selection-overlay.component.mjs +59 -0
- package/dist/esm2022/components/ui-menu/object-selection/object-selection.component.mjs +46 -0
- package/dist/esm2022/components/ui-menu/overlay/overlay.component.mjs +197 -0
- package/dist/esm2022/components/ui-menu/overlay-view/overlay-view-window/overlay-view-window.component.mjs +83 -0
- package/dist/esm2022/components/ui-menu/overlay-view/overlay-view.component.mjs +41 -0
- package/dist/esm2022/components/ui-menu/performance-toggle/performance-toggle.component.mjs +29 -0
- package/dist/esm2022/components/ui-menu/share-link/share-link-dialog/share-link-dialog.component.mjs +165 -0
- package/dist/esm2022/components/ui-menu/share-link/share-link.component.mjs +28 -0
- package/dist/esm2022/components/ui-menu/ss-mode/ss-mode.component.mjs +46 -0
- package/dist/esm2022/components/ui-menu/tree-menu/tree-menu-item/tree-menu-item.component.mjs +94 -0
- package/dist/esm2022/components/ui-menu/tree-menu/tree-menu.component.mjs +78 -0
- package/dist/esm2022/components/ui-menu/ui-menu-wrapper/ui-menu-wrapper.component.mjs +34 -0
- package/dist/esm2022/components/ui-menu/ui-menu.component.mjs +54 -0
- package/dist/esm2022/components/ui-menu/view-options/cartesian-grid-config/cartesian-grid-config.component.mjs +247 -0
- package/dist/esm2022/components/ui-menu/view-options/view-options.component.mjs +170 -0
- package/dist/esm2022/components/ui-menu/vr-toggle/vr-toggle.component.mjs +52 -0
- package/dist/esm2022/components/ui-menu/zoom-controls/zoom-controls.component.mjs +79 -0
- package/dist/esm2022/services/error-message-service.mjs +30 -0
- package/dist/{esm2020 → esm2022}/services/event-display.service.mjs +5 -5
- package/dist/esm2022/services/extras/attribute.pipe.mjs +33 -0
- package/dist/{esm2020 → esm2022}/services/extras/event-data-import.mjs +5 -1
- package/dist/esm2022/services/file-loader.service.mjs +86 -0
- package/dist/esm2022/services/global-error-handler.mjs +30 -0
- package/dist/fesm2022/phoenix-ui-components.mjs +4302 -0
- package/dist/fesm2022/phoenix-ui-components.mjs.map +1 -0
- package/dist/services/file-loader.service.d.ts +17 -0
- package/package.json +27 -16
- package/dist/esm2020/components/embed-menu/embed-menu.component.mjs +0 -21
- package/dist/esm2020/components/embed-menu/experiment-link/experiment-link.component.mjs +0 -25
- package/dist/esm2020/components/file-explorer/file-explorer.component.mjs +0 -97
- package/dist/esm2020/components/loader/loader.component.mjs +0 -68
- package/dist/esm2020/components/nav/nav.component.mjs +0 -18
- package/dist/esm2020/components/phoenix-menu/config/config-slider/config-slider.component.mjs +0 -82
- package/dist/esm2020/components/phoenix-menu/phoenix-menu-item/phoenix-menu-item.component.mjs +0 -309
- package/dist/esm2020/components/phoenix-menu/phoenix-menu.component.mjs +0 -21
- package/dist/esm2020/components/phoenix-ui.module.mjs +0 -254
- package/dist/esm2020/components/ring-loader/ring-loader.component.mjs +0 -15
- package/dist/esm2020/components/ui-menu/animate-camera/animate-camera.component.mjs +0 -117
- package/dist/esm2020/components/ui-menu/animate-event/animate-event.component.mjs +0 -31
- package/dist/esm2020/components/ui-menu/ar-toggle/ar-toggle.component.mjs +0 -81
- package/dist/esm2020/components/ui-menu/auto-rotate/auto-rotate.component.mjs +0 -27
- package/dist/esm2020/components/ui-menu/collections-info/collections-info-overlay/collections-info-overlay.component.mjs +0 -261
- package/dist/esm2020/components/ui-menu/collections-info/collections-info.component.mjs +0 -38
- package/dist/esm2020/components/ui-menu/cycle-events/cycle-events.component.mjs +0 -42
- package/dist/esm2020/components/ui-menu/dark-theme/dark-theme.component.mjs +0 -30
- package/dist/esm2020/components/ui-menu/event-data-explorer/event-data-explorer-dialog/event-data-explorer-dialog.component.mjs +0 -176
- package/dist/esm2020/components/ui-menu/event-data-explorer/event-data-explorer.component.mjs +0 -32
- package/dist/esm2020/components/ui-menu/event-selector/event-selector.component.mjs +0 -50
- package/dist/esm2020/components/ui-menu/experiment-info/experiment-info.component.mjs +0 -96
- package/dist/esm2020/components/ui-menu/index.mjs +0 -37
- package/dist/esm2020/components/ui-menu/info-panel/info-panel-overlay/info-panel-overlay.component.mjs +0 -66
- package/dist/esm2020/components/ui-menu/info-panel/info-panel.component.mjs +0 -55
- package/dist/esm2020/components/ui-menu/io-options/io-options-dialog/io-options-dialog.component.mjs +0 -290
- package/dist/esm2020/components/ui-menu/io-options/io-options.component.mjs +0 -34
- package/dist/esm2020/components/ui-menu/main-view-toggle/main-view-toggle.component.mjs +0 -30
- package/dist/esm2020/components/ui-menu/make-picture/make-picture.component.mjs +0 -88
- package/dist/esm2020/components/ui-menu/menu-toggle/menu-toggle.component.mjs +0 -38
- package/dist/esm2020/components/ui-menu/object-clipping/object-clipping.component.mjs +0 -67
- package/dist/esm2020/components/ui-menu/object-selection/object-selection-overlay/object-selection-overlay.component.mjs +0 -55
- package/dist/esm2020/components/ui-menu/object-selection/object-selection.component.mjs +0 -42
- package/dist/esm2020/components/ui-menu/overlay/overlay.component.mjs +0 -189
- package/dist/esm2020/components/ui-menu/overlay-view/overlay-view-window/overlay-view-window.component.mjs +0 -79
- package/dist/esm2020/components/ui-menu/overlay-view/overlay-view.component.mjs +0 -38
- package/dist/esm2020/components/ui-menu/performance-toggle/performance-toggle.component.mjs +0 -27
- package/dist/esm2020/components/ui-menu/share-link/share-link-dialog/share-link-dialog.component.mjs +0 -158
- package/dist/esm2020/components/ui-menu/share-link/share-link.component.mjs +0 -26
- package/dist/esm2020/components/ui-menu/ss-mode/ss-mode.component.mjs +0 -47
- package/dist/esm2020/components/ui-menu/tree-menu/tree-menu-item/tree-menu-item.component.mjs +0 -90
- package/dist/esm2020/components/ui-menu/tree-menu/tree-menu.component.mjs +0 -78
- package/dist/esm2020/components/ui-menu/ui-menu-wrapper/ui-menu-wrapper.component.mjs +0 -35
- package/dist/esm2020/components/ui-menu/ui-menu.component.mjs +0 -54
- package/dist/esm2020/components/ui-menu/view-options/view-options.component.mjs +0 -81
- package/dist/esm2020/components/ui-menu/vr-toggle/vr-toggle.component.mjs +0 -50
- package/dist/esm2020/components/ui-menu/zoom-controls/zoom-controls.component.mjs +0 -73
- package/dist/esm2020/services/error-message-service.mjs +0 -32
- package/dist/esm2020/services/extras/attribute.pipe.mjs +0 -33
- package/dist/esm2020/services/global-error-handler.mjs +0 -29
- package/dist/fesm2015/phoenix-ui-components.mjs +0 -3994
- package/dist/fesm2015/phoenix-ui-components.mjs.map +0 -1
- package/dist/fesm2020/phoenix-ui-components.mjs +0 -3552
- package/dist/fesm2020/phoenix-ui-components.mjs.map +0 -1
- /package/dist/{esm2020 → esm2022}/components/phoenix-menu/index.mjs +0 -0
- /package/dist/{esm2020 → esm2022}/phoenix-ui-components.mjs +0 -0
- /package/dist/{esm2020 → esm2022}/public_api.mjs +0 -0
- /package/dist/{esm2020 → esm2022}/services/index.mjs +0 -0
|
@@ -0,0 +1,4302 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { Component, EventEmitter, Input, Output, ViewEncapsulation, ViewChild, Injectable, Pipe, ViewChildren, Inject, ErrorHandler, NgModule } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/router';
|
|
4
|
+
import { RouterModule } from '@angular/router';
|
|
5
|
+
import * as i2 from '@angular/common';
|
|
6
|
+
import { CommonModule } from '@angular/common';
|
|
7
|
+
import * as i2$1 from '@angular/material/slider';
|
|
8
|
+
import { MatSliderModule } from '@angular/material/slider';
|
|
9
|
+
import * as i3 from '@angular/material/button';
|
|
10
|
+
import { MatButtonModule } from '@angular/material/button';
|
|
11
|
+
import * as i4 from '@angular/forms';
|
|
12
|
+
import { FormsModule } from '@angular/forms';
|
|
13
|
+
import * as i4$1 from '@angular/material/slide-toggle';
|
|
14
|
+
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
15
|
+
import * as i5 from '@angular/material/checkbox';
|
|
16
|
+
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
17
|
+
import { EventDisplay, SceneManager, PrettySymbols, Edm4hepJsonLoader, JiveXMLLoader, CMSLoader, readZipFile, VRManager, XRSessionType, ARManager, phoenixURLOptions, ActiveVariable } from 'phoenix-event-display';
|
|
18
|
+
import * as i3$2 from '@angular/material/menu';
|
|
19
|
+
import { MatMenuTrigger, MatMenuModule } from '@angular/material/menu';
|
|
20
|
+
import * as i3$1 from '@angular/material/tooltip';
|
|
21
|
+
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
22
|
+
import { ComponentPortal } from '@angular/cdk/portal';
|
|
23
|
+
import { ResizeSensor } from 'css-element-queries';
|
|
24
|
+
import * as i2$2 from '@angular/cdk/drag-drop';
|
|
25
|
+
import { DragDropModule } from '@angular/cdk/drag-drop';
|
|
26
|
+
import * as i1$1 from '@angular/cdk/overlay';
|
|
27
|
+
import { OverlayModule } from '@angular/cdk/overlay';
|
|
28
|
+
import packageJson from 'phoenix-event-display/package.json';
|
|
29
|
+
import * as i1$2 from '@angular/material/dialog';
|
|
30
|
+
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
|
|
31
|
+
import * as i4$2 from '@angular/material/icon';
|
|
32
|
+
import { MatIconModule } from '@angular/material/icon';
|
|
33
|
+
import { Vector3 } from 'three';
|
|
34
|
+
import * as i5$1 from '@angular/material/radio';
|
|
35
|
+
import { MatRadioModule } from '@angular/material/radio';
|
|
36
|
+
import QRCode from 'qrcode';
|
|
37
|
+
import * as i2$3 from '@angular/cdk/tree';
|
|
38
|
+
import { NestedTreeControl, CdkTreeModule } from '@angular/cdk/tree';
|
|
39
|
+
import { MatTreeNestedDataSource } from '@angular/material/tree';
|
|
40
|
+
import JSZip from 'jszip';
|
|
41
|
+
import * as i6 from '@angular/material/tabs';
|
|
42
|
+
import { MatTabsModule } from '@angular/material/tabs';
|
|
43
|
+
|
|
44
|
+
class NavComponent {
|
|
45
|
+
constructor() { }
|
|
46
|
+
ngOnInit() { }
|
|
47
|
+
static ɵfac = function NavComponent_Factory(t) { return new (t || NavComponent)(); };
|
|
48
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NavComponent, selectors: [["app-nav"]], decls: 2, vars: 0, consts: [["id", "mainLogo", "routerLink", "/", 1, "main-logo", "fixed-top", "p-2", "mx-auto", "mt-2"], ["src", "assets/images/logo-text.svg"]], template: function NavComponent_Template(rf, ctx) { if (rf & 1) {
|
|
49
|
+
i0.ɵɵelementStart(0, "a", 0);
|
|
50
|
+
i0.ɵɵelement(1, "img", 1);
|
|
51
|
+
i0.ɵɵelementEnd();
|
|
52
|
+
} }, dependencies: [i1.RouterLink], styles: [".main-logo[_ngcontent-%COMP%]{width:140px;z-index:9999}.main-logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{transition:all .5s}.main-logo[_ngcontent-%COMP%]:hover img[_ngcontent-%COMP%]{filter:drop-shadow(0px 0px 10px var(--phoenix-text-color));transition:all .5s}"] });
|
|
53
|
+
}
|
|
54
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavComponent, [{
|
|
55
|
+
type: Component,
|
|
56
|
+
args: [{ selector: 'app-nav', template: "<a id=\"mainLogo\" class=\"main-logo fixed-top p-2 mx-auto mt-2\" routerLink=\"/\">\n <img src=\"assets/images/logo-text.svg\" />\n</a>\n", styles: [".main-logo{width:140px;z-index:9999}.main-logo img{transition:all .5s}.main-logo:hover img{filter:drop-shadow(0px 0px 10px var(--phoenix-text-color));transition:all .5s}\n"] }]
|
|
57
|
+
}], () => [], null); })();
|
|
58
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NavComponent, { className: "NavComponent", filePath: "components/nav/nav.component.ts", lineNumber: 8 }); })();
|
|
59
|
+
|
|
60
|
+
function ConfigSliderComponent_input_3_Template(rf, ctx) { if (rf & 1) {
|
|
61
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
62
|
+
i0.ɵɵelementStart(0, "input", 4);
|
|
63
|
+
i0.ɵɵlistener("input", function ConfigSliderComponent_input_3_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onValueChange($event.target.value)); });
|
|
64
|
+
i0.ɵɵelementEnd();
|
|
65
|
+
} if (rf & 2) {
|
|
66
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
67
|
+
i0.ɵɵproperty("value", ctx_r1.value);
|
|
68
|
+
} }
|
|
69
|
+
class ConfigSliderComponent {
|
|
70
|
+
value = 0;
|
|
71
|
+
min = 0;
|
|
72
|
+
oldMin = 0;
|
|
73
|
+
max = 100;
|
|
74
|
+
oldMax = 0;
|
|
75
|
+
step = 1;
|
|
76
|
+
allowCustomValue = false;
|
|
77
|
+
onChange = new EventEmitter();
|
|
78
|
+
onValueChange(value) {
|
|
79
|
+
value && this.onChange.emit(value);
|
|
80
|
+
}
|
|
81
|
+
toggleMinCut(change) {
|
|
82
|
+
const value = change.checked;
|
|
83
|
+
if (value) {
|
|
84
|
+
this.min = this.oldMin;
|
|
85
|
+
}
|
|
86
|
+
else {
|
|
87
|
+
this.oldMin = this.min;
|
|
88
|
+
this.min = Number.MIN_SAFE_INTEGER;
|
|
89
|
+
}
|
|
90
|
+
// We should probably disable the min input too, and change text to be infinity symbol or something?
|
|
91
|
+
}
|
|
92
|
+
toggleMaxCut(change) {
|
|
93
|
+
const value = change.checked;
|
|
94
|
+
if (value) {
|
|
95
|
+
this.max = this.oldMax;
|
|
96
|
+
}
|
|
97
|
+
else {
|
|
98
|
+
this.oldMax = this.max;
|
|
99
|
+
this.max = Number.MAX_SAFE_INTEGER;
|
|
100
|
+
}
|
|
101
|
+
// We should probably disable the min input too, and change text to be infinity symbol or something?
|
|
102
|
+
}
|
|
103
|
+
static ɵfac = function ConfigSliderComponent_Factory(t) { return new (t || ConfigSliderComponent)(); };
|
|
104
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConfigSliderComponent, selectors: [["app-config-slider"]], inputs: { value: "value", min: "min", max: "max", step: "step", allowCustomValue: "allowCustomValue" }, outputs: { onChange: "onChange" }, decls: 4, vars: 5, consts: [[1, "d-flex", "flex-row", "align-items-center"], ["thumbLabel", "", 1, "mx-2", 3, "min", "max", "step"], ["matSliderThumb", "", 3, "valueChange", "value"], ["class", "config-slider-input", "type", "number", 3, "value", "input", 4, "ngIf"], ["type", "number", 1, "config-slider-input", 3, "input", "value"]], template: function ConfigSliderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
105
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "mat-slider", 1)(2, "input", 2);
|
|
106
|
+
i0.ɵɵlistener("valueChange", function ConfigSliderComponent_Template_input_valueChange_2_listener($event) { return ctx.onValueChange($event); });
|
|
107
|
+
i0.ɵɵelementEnd()();
|
|
108
|
+
i0.ɵɵtemplate(3, ConfigSliderComponent_input_3_Template, 1, 1, "input", 3);
|
|
109
|
+
i0.ɵɵelementEnd();
|
|
110
|
+
} if (rf & 2) {
|
|
111
|
+
i0.ɵɵadvance();
|
|
112
|
+
i0.ɵɵproperty("min", ctx.min)("max", ctx.max)("step", ctx.step);
|
|
113
|
+
i0.ɵɵadvance();
|
|
114
|
+
i0.ɵɵproperty("value", ctx.value);
|
|
115
|
+
i0.ɵɵadvance();
|
|
116
|
+
i0.ɵɵproperty("ngIf", ctx.allowCustomValue);
|
|
117
|
+
} }, dependencies: [i2.NgIf, i2$1.MatSlider, i2$1.MatSliderThumb], styles: [".config-slider-input[_ngcontent-%COMP%]{background:transparent;color:var(--phoenix-text-color);border:none;border-bottom:1px solid var(--phoenix-text-color);width:25%;-moz-appearance:textfield}input[_ngcontent-%COMP%]::-webkit-outer-spin-button, input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none}"] });
|
|
118
|
+
}
|
|
119
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConfigSliderComponent, [{
|
|
120
|
+
type: Component,
|
|
121
|
+
args: [{ selector: 'app-config-slider', template: "<div class=\"d-flex flex-row align-items-center\">\n <mat-slider class=\"mx-2\" [min]=\"min\" [max]=\"max\" [step]=\"step\" thumbLabel>\n <input\n matSliderThumb\n [value]=\"value\"\n (valueChange)=\"onValueChange($event)\"\n />\n </mat-slider>\n <input\n *ngIf=\"allowCustomValue\"\n class=\"config-slider-input\"\n type=\"number\"\n [value]=\"value\"\n (input)=\"onValueChange($event.target.value)\"\n />\n</div>\n", styles: [".config-slider-input{background:transparent;color:var(--phoenix-text-color);border:none;border-bottom:1px solid var(--phoenix-text-color);width:25%;-moz-appearance:textfield}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none}\n"] }]
|
|
122
|
+
}], null, { value: [{
|
|
123
|
+
type: Input
|
|
124
|
+
}], min: [{
|
|
125
|
+
type: Input
|
|
126
|
+
}], max: [{
|
|
127
|
+
type: Input
|
|
128
|
+
}], step: [{
|
|
129
|
+
type: Input
|
|
130
|
+
}], allowCustomValue: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], onChange: [{
|
|
133
|
+
type: Output
|
|
134
|
+
}] }); })();
|
|
135
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ConfigSliderComponent, { className: "ConfigSliderComponent", filePath: "components/phoenix-menu/config/config-slider/config-slider.component.ts", lineNumber: 9 }); })();
|
|
136
|
+
|
|
137
|
+
const _c0$b = ["phoenixMenuItem"];
|
|
138
|
+
const _c1$4 = a0 => ({ "top.px": a0 });
|
|
139
|
+
const _c2$1 = a0 => ({ "font-weight-bold w-100": a0 });
|
|
140
|
+
const _c3$1 = a0 => ({ "p-0": a0 });
|
|
141
|
+
const _c4$1 = a0 => ({ expanded: a0 });
|
|
142
|
+
function PhoenixMenuItemComponent_ng_container_3_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
143
|
+
i0.ɵɵelementContainer(0);
|
|
144
|
+
} }
|
|
145
|
+
function PhoenixMenuItemComponent_ng_container_3_Template(rf, ctx) { if (rf & 1) {
|
|
146
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
147
|
+
i0.ɵɵelementContainerStart(0);
|
|
148
|
+
i0.ɵɵelementStart(1, "mat-slide-toggle", 9);
|
|
149
|
+
i0.ɵɵlistener("change", function PhoenixMenuItemComponent_ng_container_3_Template_mat_slide_toggle_change_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.currentNode.toggleSelfAndDescendants($event.checked)); });
|
|
150
|
+
i0.ɵɵtemplate(2, PhoenixMenuItemComponent_ng_container_3_ng_container_2_Template, 1, 0, "ng-container", 10);
|
|
151
|
+
i0.ɵɵelementEnd();
|
|
152
|
+
i0.ɵɵelementContainerEnd();
|
|
153
|
+
} if (rf & 2) {
|
|
154
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
155
|
+
const nodeName_r3 = i0.ɵɵreference(5);
|
|
156
|
+
i0.ɵɵadvance();
|
|
157
|
+
i0.ɵɵproperty("checked", ctx_r1.currentNode.toggleState);
|
|
158
|
+
i0.ɵɵadvance();
|
|
159
|
+
i0.ɵɵproperty("ngTemplateOutlet", nodeName_r3);
|
|
160
|
+
} }
|
|
161
|
+
function PhoenixMenuItemComponent_ng_template_4_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
162
|
+
i0.ɵɵelementStart(0, "span", 14);
|
|
163
|
+
i0.ɵɵnamespaceSVG();
|
|
164
|
+
i0.ɵɵelementStart(1, "svg");
|
|
165
|
+
i0.ɵɵelement(2, "use");
|
|
166
|
+
i0.ɵɵelementEnd()();
|
|
167
|
+
} if (rf & 2) {
|
|
168
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
169
|
+
i0.ɵɵadvance(2);
|
|
170
|
+
i0.ɵɵattributeInterpolate2("href", "assets/icons/", ctx_r1.currentNode.icon, ".svg#", ctx_r1.currentNode.icon, "");
|
|
171
|
+
} }
|
|
172
|
+
function PhoenixMenuItemComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
|
|
173
|
+
i0.ɵɵelementStart(0, "span", 11);
|
|
174
|
+
i0.ɵɵtemplate(1, PhoenixMenuItemComponent_ng_template_4_span_1_Template, 3, 3, "span", 12);
|
|
175
|
+
i0.ɵɵelementStart(2, "span", 13);
|
|
176
|
+
i0.ɵɵtext(3);
|
|
177
|
+
i0.ɵɵelementEnd()();
|
|
178
|
+
} if (rf & 2) {
|
|
179
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
180
|
+
i0.ɵɵadvance();
|
|
181
|
+
i0.ɵɵproperty("ngIf", ctx_r1.currentNode.icon);
|
|
182
|
+
i0.ɵɵadvance();
|
|
183
|
+
i0.ɵɵproperty("title", ctx_r1.currentNode.name);
|
|
184
|
+
i0.ɵɵadvance();
|
|
185
|
+
i0.ɵɵtextInterpolate(ctx_r1.currentNode.name);
|
|
186
|
+
} }
|
|
187
|
+
function PhoenixMenuItemComponent_div_7_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
188
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
189
|
+
i0.ɵɵelementStart(0, "div", 20);
|
|
190
|
+
i0.ɵɵlistener("click", function PhoenixMenuItemComponent_div_7_div_4_Template_div_click_0_listener() { i0.ɵɵrestoreView(_r5); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.currentNode.configActive = false); });
|
|
191
|
+
i0.ɵɵelementEnd();
|
|
192
|
+
} }
|
|
193
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_label_1_Template(rf, ctx) { if (rf & 1) {
|
|
194
|
+
i0.ɵɵelementStart(0, "label", 26);
|
|
195
|
+
i0.ɵɵtext(1);
|
|
196
|
+
i0.ɵɵelementEnd();
|
|
197
|
+
} if (rf & 2) {
|
|
198
|
+
const config_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
199
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c2$1, config_r6.type === "label"));
|
|
200
|
+
i0.ɵɵadvance();
|
|
201
|
+
i0.ɵɵtextInterpolate1(" ", config_r6.label, " ");
|
|
202
|
+
} }
|
|
203
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_mat_checkbox_1_Template(rf, ctx) { if (rf & 1) {
|
|
204
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
205
|
+
i0.ɵɵelementStart(0, "mat-checkbox", 9);
|
|
206
|
+
i0.ɵɵlistener("change", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_mat_checkbox_1_Template_mat_checkbox_change_0_listener($event) { i0.ɵɵrestoreView(_r7); const config_r6 = i0.ɵɵnextContext(3).$implicit; config_r6.onChange($event.checked); return i0.ɵɵresetView(config_r6.isChecked = $event.checked); });
|
|
207
|
+
i0.ɵɵelementEnd();
|
|
208
|
+
} if (rf & 2) {
|
|
209
|
+
const config_r6 = i0.ɵɵnextContext(3).$implicit;
|
|
210
|
+
i0.ɵɵproperty("checked", config_r6.isChecked);
|
|
211
|
+
} }
|
|
212
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_app_config_slider_2_Template(rf, ctx) { if (rf & 1) {
|
|
213
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
214
|
+
i0.ɵɵelementStart(0, "app-config-slider", 34);
|
|
215
|
+
i0.ɵɵlistener("onChange", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_app_config_slider_2_Template_app_config_slider_onChange_0_listener($event) { i0.ɵɵrestoreView(_r8); const config_r6 = i0.ɵɵnextContext(3).$implicit; config_r6.onChange($event); return i0.ɵɵresetView(config_r6.value = $event); });
|
|
216
|
+
i0.ɵɵelementEnd();
|
|
217
|
+
} if (rf & 2) {
|
|
218
|
+
const config_r6 = i0.ɵɵnextContext(3).$implicit;
|
|
219
|
+
i0.ɵɵproperty("value", config_r6.value)("min", config_r6.min)("max", config_r6.max)("step", config_r6.step)("allowCustomValue", config_r6.allowCustomValue);
|
|
220
|
+
} }
|
|
221
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_button_3_Template(rf, ctx) { if (rf & 1) {
|
|
222
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
223
|
+
i0.ɵɵelementStart(0, "button", 35);
|
|
224
|
+
i0.ɵɵlistener("click", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_button_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r9); const config_r6 = i0.ɵɵnextContext(3).$implicit; return i0.ɵɵresetView(config_r6.onClick()); });
|
|
225
|
+
i0.ɵɵtext(1);
|
|
226
|
+
i0.ɵɵelementEnd();
|
|
227
|
+
} if (rf & 2) {
|
|
228
|
+
const config_r6 = i0.ɵɵnextContext(3).$implicit;
|
|
229
|
+
i0.ɵɵadvance();
|
|
230
|
+
i0.ɵɵtextInterpolate1(" ", config_r6.label, " ");
|
|
231
|
+
} }
|
|
232
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_input_4_Template(rf, ctx) { if (rf & 1) {
|
|
233
|
+
const _r10 = i0.ɵɵgetCurrentView();
|
|
234
|
+
i0.ɵɵelementStart(0, "input", 36);
|
|
235
|
+
i0.ɵɵlistener("input", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_input_4_Template_input_input_0_listener($event) { i0.ɵɵrestoreView(_r10); const config_r6 = i0.ɵɵnextContext(3).$implicit; config_r6.onChange($event.target.value); return i0.ɵɵresetView(config_r6.color = $event.target.value); });
|
|
236
|
+
i0.ɵɵelementEnd();
|
|
237
|
+
} if (rf & 2) {
|
|
238
|
+
const config_r6 = i0.ɵɵnextContext(3).$implicit;
|
|
239
|
+
i0.ɵɵproperty("value", config_r6.color);
|
|
240
|
+
} }
|
|
241
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
242
|
+
const _r11 = i0.ɵɵgetCurrentView();
|
|
243
|
+
i0.ɵɵelementStart(0, "div", 37)(1, "div", 38)(2, "mat-checkbox", 9);
|
|
244
|
+
i0.ɵɵlistener("change", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_div_5_Template_mat_checkbox_change_2_listener($event) { i0.ɵɵrestoreView(_r11); const config_r6 = i0.ɵɵnextContext(3).$implicit; return i0.ɵɵresetView(config_r6.setEnableMin($event.checked)); });
|
|
245
|
+
i0.ɵɵelementEnd();
|
|
246
|
+
i0.ɵɵelementStart(3, "mat-checkbox", 9);
|
|
247
|
+
i0.ɵɵlistener("change", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_div_5_Template_mat_checkbox_change_3_listener($event) { i0.ɵɵrestoreView(_r11); const config_r6 = i0.ɵɵnextContext(3).$implicit; return i0.ɵɵresetView(config_r6.setEnableMax($event.checked)); });
|
|
248
|
+
i0.ɵɵelementEnd()();
|
|
249
|
+
i0.ɵɵelementStart(4, "div", 38)(5, "input", 39);
|
|
250
|
+
i0.ɵɵlistener("input", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_div_5_Template_input_input_5_listener($event) { i0.ɵɵrestoreView(_r11); const config_r6 = i0.ɵɵnextContext(3).$implicit; config_r6.value = $event.target.value; return i0.ɵɵresetView(config_r6.onChange(config_r6)); });
|
|
251
|
+
i0.ɵɵelementEnd();
|
|
252
|
+
i0.ɵɵelementStart(6, "input", 40);
|
|
253
|
+
i0.ɵɵlistener("input", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_div_5_Template_input_input_6_listener($event) { i0.ɵɵrestoreView(_r11); const config_r6 = i0.ɵɵnextContext(3).$implicit; config_r6.highValue = $event.target.value; return i0.ɵɵresetView(config_r6.onChange(config_r6)); });
|
|
254
|
+
i0.ɵɵelementEnd()()();
|
|
255
|
+
} if (rf & 2) {
|
|
256
|
+
const config_r6 = i0.ɵɵnextContext(3).$implicit;
|
|
257
|
+
i0.ɵɵadvance(2);
|
|
258
|
+
i0.ɵɵproperty("checked", config_r6.enableMin);
|
|
259
|
+
i0.ɵɵadvance();
|
|
260
|
+
i0.ɵɵproperty("checked", config_r6.enableMax);
|
|
261
|
+
i0.ɵɵadvance(2);
|
|
262
|
+
i0.ɵɵproperty("value", config_r6.value);
|
|
263
|
+
i0.ɵɵadvance();
|
|
264
|
+
i0.ɵɵproperty("value", config_r6.highValue);
|
|
265
|
+
} }
|
|
266
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_select_6_option_1_Template(rf, ctx) { if (rf & 1) {
|
|
267
|
+
i0.ɵɵelementStart(0, "option", 43);
|
|
268
|
+
i0.ɵɵtext(1);
|
|
269
|
+
i0.ɵɵelementEnd();
|
|
270
|
+
} if (rf & 2) {
|
|
271
|
+
const singleOption_r13 = ctx.$implicit;
|
|
272
|
+
i0.ɵɵproperty("value", singleOption_r13);
|
|
273
|
+
i0.ɵɵadvance();
|
|
274
|
+
i0.ɵɵtextInterpolate1(" ", singleOption_r13, " ");
|
|
275
|
+
} }
|
|
276
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_select_6_Template(rf, ctx) { if (rf & 1) {
|
|
277
|
+
const _r12 = i0.ɵɵgetCurrentView();
|
|
278
|
+
i0.ɵɵelementStart(0, "select", 41);
|
|
279
|
+
i0.ɵɵlistener("change", function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_select_6_Template_select_change_0_listener($event) { i0.ɵɵrestoreView(_r12); const config_r6 = i0.ɵɵnextContext(3).$implicit; return i0.ɵɵresetView(config_r6.onChange($event.target.value)); });
|
|
280
|
+
i0.ɵɵtemplate(1, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_select_6_option_1_Template, 2, 2, "option", 42);
|
|
281
|
+
i0.ɵɵelementEnd();
|
|
282
|
+
} if (rf & 2) {
|
|
283
|
+
const config_r6 = i0.ɵɵnextContext(3).$implicit;
|
|
284
|
+
i0.ɵɵadvance();
|
|
285
|
+
i0.ɵɵproperty("ngForOf", config_r6.options);
|
|
286
|
+
} }
|
|
287
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
288
|
+
i0.ɵɵelementStart(0, "div", 27);
|
|
289
|
+
i0.ɵɵtemplate(1, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_mat_checkbox_1_Template, 1, 1, "mat-checkbox", 28)(2, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_app_config_slider_2_Template, 1, 5, "app-config-slider", 29)(3, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_button_3_Template, 2, 1, "button", 30)(4, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_input_4_Template, 1, 1, "input", 31)(5, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_div_5_Template, 7, 4, "div", 32)(6, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_select_6_Template, 2, 1, "select", 33);
|
|
290
|
+
i0.ɵɵelementEnd();
|
|
291
|
+
} if (rf & 2) {
|
|
292
|
+
const config_r6 = i0.ɵɵnextContext(2).$implicit;
|
|
293
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c3$1, config_r6.type === "button"));
|
|
294
|
+
i0.ɵɵadvance();
|
|
295
|
+
i0.ɵɵproperty("ngSwitchCase", "checkbox");
|
|
296
|
+
i0.ɵɵadvance();
|
|
297
|
+
i0.ɵɵproperty("ngSwitchCase", "slider");
|
|
298
|
+
i0.ɵɵadvance();
|
|
299
|
+
i0.ɵɵproperty("ngSwitchCase", "button");
|
|
300
|
+
i0.ɵɵadvance();
|
|
301
|
+
i0.ɵɵproperty("ngSwitchCase", "color");
|
|
302
|
+
i0.ɵɵadvance();
|
|
303
|
+
i0.ɵɵproperty("ngSwitchCase", "rangeSlider");
|
|
304
|
+
i0.ɵɵadvance();
|
|
305
|
+
i0.ɵɵproperty("ngSwitchCase", "select");
|
|
306
|
+
} }
|
|
307
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
308
|
+
i0.ɵɵelementStart(0, "div", 23);
|
|
309
|
+
i0.ɵɵtemplate(1, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_label_1_Template, 2, 4, "label", 24)(2, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_div_2_Template, 7, 9, "div", 25);
|
|
310
|
+
i0.ɵɵelementEnd();
|
|
311
|
+
} if (rf & 2) {
|
|
312
|
+
const config_r6 = i0.ɵɵnextContext().$implicit;
|
|
313
|
+
i0.ɵɵadvance();
|
|
314
|
+
i0.ɵɵproperty("ngIf", config_r6.type !== "button");
|
|
315
|
+
i0.ɵɵadvance();
|
|
316
|
+
i0.ɵɵproperty("ngIf", config_r6.type !== "label");
|
|
317
|
+
} }
|
|
318
|
+
function PhoenixMenuItemComponent_div_7_ng_container_6_Template(rf, ctx) { if (rf & 1) {
|
|
319
|
+
i0.ɵɵelementContainerStart(0, 21);
|
|
320
|
+
i0.ɵɵtemplate(1, PhoenixMenuItemComponent_div_7_ng_container_6_div_1_Template, 3, 2, "div", 22);
|
|
321
|
+
i0.ɵɵelementContainerEnd();
|
|
322
|
+
} if (rf & 2) {
|
|
323
|
+
const config_r6 = ctx.$implicit;
|
|
324
|
+
i0.ɵɵproperty("ngSwitch", config_r6.type);
|
|
325
|
+
i0.ɵɵadvance();
|
|
326
|
+
i0.ɵɵproperty("ngIf", !config_r6.hidden);
|
|
327
|
+
} }
|
|
328
|
+
function PhoenixMenuItemComponent_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
329
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
330
|
+
i0.ɵɵelementStart(0, "div")(1, "button", 15);
|
|
331
|
+
i0.ɵɵlistener("click", function PhoenixMenuItemComponent_div_7_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(); ctx_r1.calculateConfigTop(); return i0.ɵɵresetView(ctx_r1.currentNode.configActive = !ctx_r1.currentNode.configActive); });
|
|
332
|
+
i0.ɵɵnamespaceSVG();
|
|
333
|
+
i0.ɵɵelementStart(2, "svg");
|
|
334
|
+
i0.ɵɵelement(3, "use", 16);
|
|
335
|
+
i0.ɵɵelementEnd()();
|
|
336
|
+
i0.ɵɵtemplate(4, PhoenixMenuItemComponent_div_7_div_4_Template, 1, 0, "div", 17);
|
|
337
|
+
i0.ɵɵnamespaceHTML();
|
|
338
|
+
i0.ɵɵelementStart(5, "div", 18);
|
|
339
|
+
i0.ɵɵtemplate(6, PhoenixMenuItemComponent_div_7_ng_container_6_Template, 2, 2, "ng-container", 19);
|
|
340
|
+
i0.ɵɵelementEnd()();
|
|
341
|
+
} if (rf & 2) {
|
|
342
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
343
|
+
i0.ɵɵadvance(4);
|
|
344
|
+
i0.ɵɵproperty("ngIf", ctx_r1.currentNode.configActive);
|
|
345
|
+
i0.ɵɵadvance();
|
|
346
|
+
i0.ɵɵproperty("hidden", !ctx_r1.currentNode.configActive)("ngStyle", i0.ɵɵpureFunction1(4, _c1$4, ctx_r1.configTop));
|
|
347
|
+
i0.ɵɵadvance();
|
|
348
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.castConfigsToAny(ctx_r1.currentNode.configs));
|
|
349
|
+
} }
|
|
350
|
+
function PhoenixMenuItemComponent_button_8_Template(rf, ctx) { if (rf & 1) {
|
|
351
|
+
const _r14 = i0.ɵɵgetCurrentView();
|
|
352
|
+
i0.ɵɵelementStart(0, "button", 44);
|
|
353
|
+
i0.ɵɵlistener("click", function PhoenixMenuItemComponent_button_8_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r14); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.currentNode.childrenActive = !ctx_r1.currentNode.childrenActive); });
|
|
354
|
+
i0.ɵɵnamespaceSVG();
|
|
355
|
+
i0.ɵɵelementStart(1, "svg");
|
|
356
|
+
i0.ɵɵelement(2, "use", 45);
|
|
357
|
+
i0.ɵɵelementEnd()();
|
|
358
|
+
} if (rf & 2) {
|
|
359
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
360
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(1, _c4$1, ctx_r1.currentNode.childrenActive));
|
|
361
|
+
} }
|
|
362
|
+
function PhoenixMenuItemComponent_div_9_app_phoenix_menu_item_1_Template(rf, ctx) { if (rf & 1) {
|
|
363
|
+
i0.ɵɵelement(0, "app-phoenix-menu-item", 48);
|
|
364
|
+
} if (rf & 2) {
|
|
365
|
+
const childNode_r15 = ctx.$implicit;
|
|
366
|
+
i0.ɵɵproperty("currentNode", childNode_r15);
|
|
367
|
+
} }
|
|
368
|
+
function PhoenixMenuItemComponent_div_9_Template(rf, ctx) { if (rf & 1) {
|
|
369
|
+
i0.ɵɵelementStart(0, "div", 46);
|
|
370
|
+
i0.ɵɵtemplate(1, PhoenixMenuItemComponent_div_9_app_phoenix_menu_item_1_Template, 1, 1, "app-phoenix-menu-item", 47);
|
|
371
|
+
i0.ɵɵelementEnd();
|
|
372
|
+
} if (rf & 2) {
|
|
373
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
374
|
+
i0.ɵɵadvance();
|
|
375
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.currentNode.children);
|
|
376
|
+
} }
|
|
377
|
+
class PhoenixMenuItemComponent {
|
|
378
|
+
cdr;
|
|
379
|
+
currentNode;
|
|
380
|
+
phoenixMenuItem;
|
|
381
|
+
configTop;
|
|
382
|
+
constructor(cdr) {
|
|
383
|
+
this.cdr = cdr;
|
|
384
|
+
}
|
|
385
|
+
calculateConfigTop() {
|
|
386
|
+
if (this.phoenixMenuItem) {
|
|
387
|
+
this.configTop =
|
|
388
|
+
this.phoenixMenuItem.nativeElement.getBoundingClientRect().top;
|
|
389
|
+
this.cdr.detectChanges();
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
// Casting to `any` as a workaround to bypass strict template checks.
|
|
393
|
+
castConfigsToAny(configs) {
|
|
394
|
+
return configs;
|
|
395
|
+
}
|
|
396
|
+
static ɵfac = function PhoenixMenuItemComponent_Factory(t) { return new (t || PhoenixMenuItemComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
397
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoenixMenuItemComponent, selectors: [["app-phoenix-menu-item"]], viewQuery: function PhoenixMenuItemComponent_Query(rf, ctx) { if (rf & 1) {
|
|
398
|
+
i0.ɵɵviewQuery(_c0$b, 5);
|
|
399
|
+
} if (rf & 2) {
|
|
400
|
+
let _t;
|
|
401
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.phoenixMenuItem = _t.first);
|
|
402
|
+
} }, inputs: { currentNode: "currentNode" }, decls: 10, vars: 5, consts: [["phoenixMenuItem", ""], ["nodeName", ""], [1, "phoenix-menu-item"], [1, "phoenix-menu-item-left", "align-items-center"], [4, "ngIf", "ngIfElse"], [1, "phoenix-menu-item-right"], [4, "ngIf"], ["class", "icon-wrapper icon-button btn-blank item-expand", "data-testid", "dropdown", 3, "ngClass", "click", 4, "ngIf"], ["class", "phoenix-menu-children", 4, "ngIf"], [3, "change", "checked"], [4, "ngTemplateOutlet"], [1, "d-flex", "w-100", "align-items-center"], ["class", "icon-wrapper item-icon", 4, "ngIf"], [1, "item-name", 3, "title"], [1, "icon-wrapper", "item-icon"], [1, "icon-wrapper", "icon-button", "btn-blank", "item-settings", 3, "click"], ["href", "assets/icons/gear.svg#gear"], ["class", "item-config-backdrop", 3, "click", 4, "ngIf"], [1, "item-config", 3, "hidden", "ngStyle"], [3, "ngSwitch", 4, "ngFor", "ngForOf"], [1, "item-config-backdrop", 3, "click"], [3, "ngSwitch"], ["class", "item-config-single", 4, "ngIf"], [1, "item-config-single"], ["class", "item-config-label", "for", "item-config-field", 3, "ngClass", 4, "ngIf"], ["class", "item-config-data", 3, "ngClass", 4, "ngIf"], ["for", "item-config-field", 1, "item-config-label", 3, "ngClass"], [1, "item-config-data", 3, "ngClass"], [3, "checked", "change", 4, "ngSwitchCase"], [3, "value", "min", "max", "step", "allowCustomValue", "onChange", 4, "ngSwitchCase"], ["class", "w-100", "mat-button", "", "mat-stroked-button", "", 3, "click", 4, "ngSwitchCase"], ["id", "item-config-field", "type", "color", 3, "value", "input", 4, "ngSwitchCase"], ["class", "range-slider", 4, "ngSwitchCase"], ["id", "item-config-field", "class", "w-100", 3, "change", 4, "ngSwitchCase"], [3, "onChange", "value", "min", "max", "step", "allowCustomValue"], ["mat-button", "", "mat-stroked-button", "", 1, "w-100", 3, "click"], ["id", "item-config-field", "type", "color", 3, "input", "value"], [1, "range-slider"], [1, "range-slider-inputs", "d-flex", "justify-content-between"], ["type", "number", "placeholder", "Min", "step", "config.step", 1, "form-control", "form-control-sm", 3, "input", "value"], ["type", "number", "placeholder", "Max", "step", "config.step", 1, "form-control", "form-control-sm", 3, "input", "value"], ["id", "item-config-field", 1, "w-100", 3, "change"], [3, "value", 4, "ngFor", "ngForOf"], [3, "value"], ["data-testid", "dropdown", 1, "icon-wrapper", "icon-button", "btn-blank", "item-expand", 3, "click", "ngClass"], ["href", "assets/icons/expand.svg#expand"], [1, "phoenix-menu-children"], [3, "currentNode", 4, "ngFor", "ngForOf"], [3, "currentNode"]], template: function PhoenixMenuItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
403
|
+
i0.ɵɵelementStart(0, "div", 2, 0)(2, "div", 3);
|
|
404
|
+
i0.ɵɵtemplate(3, PhoenixMenuItemComponent_ng_container_3_Template, 3, 2, "ng-container", 4)(4, PhoenixMenuItemComponent_ng_template_4_Template, 4, 3, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
405
|
+
i0.ɵɵelementEnd();
|
|
406
|
+
i0.ɵɵelementStart(6, "div", 5);
|
|
407
|
+
i0.ɵɵtemplate(7, PhoenixMenuItemComponent_div_7_Template, 7, 6, "div", 6)(8, PhoenixMenuItemComponent_button_8_Template, 3, 3, "button", 7);
|
|
408
|
+
i0.ɵɵelementEnd()();
|
|
409
|
+
i0.ɵɵtemplate(9, PhoenixMenuItemComponent_div_9_Template, 2, 1, "div", 8);
|
|
410
|
+
} if (rf & 2) {
|
|
411
|
+
const nodeName_r3 = i0.ɵɵreference(5);
|
|
412
|
+
i0.ɵɵadvance(3);
|
|
413
|
+
i0.ɵɵproperty("ngIf", ctx.currentNode.onToggle)("ngIfElse", nodeName_r3);
|
|
414
|
+
i0.ɵɵadvance(4);
|
|
415
|
+
i0.ɵɵproperty("ngIf", ctx.currentNode.configs.length > 0);
|
|
416
|
+
i0.ɵɵadvance();
|
|
417
|
+
i0.ɵɵproperty("ngIf", ctx.currentNode.children.length > 0);
|
|
418
|
+
i0.ɵɵadvance();
|
|
419
|
+
i0.ɵɵproperty("ngIf", ctx.currentNode.childrenActive);
|
|
420
|
+
} }, dependencies: [i2.NgClass, i2.NgForOf, i2.NgIf, i2.NgTemplateOutlet, i2.NgStyle, i2.NgSwitch, i2.NgSwitchCase, i3.MatButton, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, i4$1.MatSlideToggle, i5.MatCheckbox, PhoenixMenuItemComponent, ConfigSliderComponent], styles: [".phoenix-menu-item{width:100%;padding:.6rem;background:var(--phoenix-background-color-secondary);color:var(--phoenix-text-color);font-size:.8rem;transition:all .5s;display:flex;justify-content:space-between;align-items:center}.phoenix-menu-item-left{display:flex;justify-content:flex-start;min-width:0;padding-right:.5rem;overflow:hidden}.phoenix-menu-item-left .item-name{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.phoenix-menu-item-left .item-icon{margin-right:.2rem}.phoenix-menu-item-right{display:flex;justify-content:flex-end}.phoenix-menu-item-right .item-expand.expanded{transform:scaleY(-1)}.phoenix-menu-item-right .item-settings{margin-right:.2rem}.phoenix-menu-item-right .item-config-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:110}.phoenix-menu-item-right .item-config{position:absolute;margin-top:-5rem;right:100%;width:14rem;padding:.5rem;background:var(--phoenix-background-color-secondary);color:var(--phoenix-text-color-secondary);box-shadow:var(--phoenix-box-shadow);display:flex;flex-direction:column;z-index:120}.phoenix-menu-item-right .item-config>*{margin-bottom:.4rem}.phoenix-menu-item-right .item-config>*:last-child{margin-bottom:0}.phoenix-menu-item-right .item-config .item-config-single{display:flex;flex-direction:row}.phoenix-menu-item-right .item-config .item-config-single .item-config-label{width:30%}.phoenix-menu-item-right .item-config .item-config-single .item-config-data{flex-grow:1;padding-left:.5rem}.phoenix-menu-item .icon-wrapper{display:inline-block;width:1.3rem;height:1.3rem;padding:.23rem;transition:all .4s}.phoenix-menu-item .icon-wrapper.icon-button:hover{background:var(--phoenix-options-icon-bg);border-radius:40%;cursor:pointer}.phoenix-menu-item .icon-wrapper svg{width:100%;height:100%;vertical-align:top}.phoenix-menu-item .mat-slide-toggle-bar{width:30px!important}.phoenix-menu-item .mat-slide-toggle-thumb{width:15px!important;height:15px!important;position:absolute;top:2px}.phoenix-menu-item .mat-slider-horizontal{min-width:0;width:100%;height:20px}.phoenix-menu-item .mat-slider-horizontal .mat-slider-wrapper{top:10px}.phoenix-menu-item label.mat-checkbox-layout{margin:0}@media screen and (max-width: 768px){.phoenix-menu-item{font-size:.75rem;padding:.5rem}.phoenix-menu-item .icon-wrapper{width:1rem;height:1rem;padding:.15rem}}.phoenix-menu-children{margin-left:.5rem;border-left:1px solid var(--phoenix-accent)}.range-slider .range-slider-inputs{gap:20%}\n"], encapsulation: 2 });
|
|
421
|
+
}
|
|
422
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PhoenixMenuItemComponent, [{
|
|
423
|
+
type: Component,
|
|
424
|
+
args: [{ selector: 'app-phoenix-menu-item', encapsulation: ViewEncapsulation.None, template: "<div class=\"phoenix-menu-item\" #phoenixMenuItem>\n <div class=\"phoenix-menu-item-left align-items-center\">\n <!-- If the item has some toggle function -->\n <ng-container *ngIf=\"currentNode.onToggle; else nodeName\">\n <mat-slide-toggle\n [checked]=\"currentNode.toggleState\"\n (change)=\"currentNode.toggleSelfAndDescendants($event.checked)\"\n >\n <ng-container *ngTemplateOutlet=\"nodeName\"></ng-container>\n </mat-slide-toggle>\n </ng-container>\n <!-- If the item has no toggle function -->\n <ng-template #nodeName>\n <span class=\"d-flex w-100 align-items-center\">\n <span *ngIf=\"currentNode.icon\" class=\"icon-wrapper item-icon\">\n <svg>\n <use\n attr.href=\"assets/icons/{{ currentNode.icon }}.svg#{{\n currentNode.icon\n }}\"\n ></use>\n </svg>\n </span>\n <span class=\"item-name\" [title]=\"currentNode.name\">{{\n currentNode.name\n }}</span>\n </span>\n </ng-template>\n </div>\n <div class=\"phoenix-menu-item-right\">\n <div *ngIf=\"currentNode.configs.length > 0\">\n <button\n class=\"icon-wrapper icon-button btn-blank item-settings\"\n (click)=\"\n calculateConfigTop();\n currentNode.configActive = !currentNode.configActive\n \"\n >\n <svg>\n <use href=\"assets/icons/gear.svg#gear\"></use>\n </svg>\n </button>\n <div\n class=\"item-config-backdrop\"\n *ngIf=\"currentNode.configActive\"\n (click)=\"currentNode.configActive = false\"\n ></div>\n <div\n class=\"item-config\"\n [hidden]=\"!currentNode.configActive\"\n [ngStyle]=\"{ 'top.px': configTop }\"\n >\n <ng-container\n *ngFor=\"let config of castConfigsToAny(currentNode.configs)\"\n [ngSwitch]=\"config.type\"\n >\n <!-- Config types -->\n <div class=\"item-config-single\" *ngIf=\"!config.hidden\">\n <label\n class=\"item-config-label\"\n for=\"item-config-field\"\n *ngIf=\"config.type !== 'button'\"\n [ngClass]=\"{ 'font-weight-bold w-100': config.type === 'label' }\"\n >\n {{ config.label }}\n </label>\n <div\n class=\"item-config-data\"\n [ngClass]=\"{ 'p-0': config.type === 'button' }\"\n *ngIf=\"config.type !== 'label'\"\n >\n <mat-checkbox\n *ngSwitchCase=\"'checkbox'\"\n [checked]=\"config.isChecked\"\n (change)=\"\n config.onChange($event.checked);\n config.isChecked = $event.checked\n \"\n ></mat-checkbox>\n\n <app-config-slider\n *ngSwitchCase=\"'slider'\"\n [value]=\"config.value\"\n (onChange)=\"config.onChange($event); config.value = $event\"\n [min]=\"config.min\"\n [max]=\"config.max\"\n [step]=\"config.step\"\n [allowCustomValue]=\"config.allowCustomValue\"\n >\n </app-config-slider>\n\n <button\n *ngSwitchCase=\"'button'\"\n class=\"w-100\"\n (click)=\"config.onClick()\"\n mat-button\n mat-stroked-button\n >\n {{ config.label }}\n </button>\n\n <input\n *ngSwitchCase=\"'color'\"\n id=\"item-config-field\"\n type=\"color\"\n [value]=\"config.color\"\n (input)=\"\n config.onChange($event.target.value);\n config.color = $event.target.value\n \"\n />\n\n <div *ngSwitchCase=\"'rangeSlider'\" class=\"range-slider\">\n <div class=\"range-slider-inputs d-flex justify-content-between\">\n <mat-checkbox\n [checked]=\"config.enableMin\"\n (change)=\"config.setEnableMin($event.checked)\"\n ></mat-checkbox>\n <mat-checkbox\n [checked]=\"config.enableMax\"\n (change)=\"config.setEnableMax($event.checked)\"\n ></mat-checkbox>\n </div>\n <div class=\"range-slider-inputs d-flex justify-content-between\">\n <input\n type=\"number\"\n placeholder=\"Min\"\n class=\"form-control form-control-sm\"\n [value]=\"config.value\"\n (input)=\"\n config.value = $event.target.value;\n config.onChange(config)\n \"\n step=\"config.step\"\n />\n <input\n type=\"number\"\n placeholder=\"Max\"\n class=\"form-control form-control-sm\"\n [value]=\"config.highValue\"\n (input)=\"\n config.highValue = $event.target.value;\n config.onChange(config)\n \"\n step=\"config.step\"\n />\n </div>\n </div>\n\n <select\n *ngSwitchCase=\"'select'\"\n id=\"item-config-field\"\n class=\"w-100\"\n (change)=\"config.onChange($event.target.value)\"\n >\n <option\n *ngFor=\"let singleOption of config.options\"\n [value]=\"singleOption\"\n >\n {{ singleOption }}\n </option>\n </select>\n </div>\n </div>\n <!-- Config types END -->\n </ng-container>\n </div>\n </div>\n <button\n class=\"icon-wrapper icon-button btn-blank item-expand\"\n *ngIf=\"currentNode.children.length > 0\"\n (click)=\"currentNode.childrenActive = !currentNode.childrenActive\"\n [ngClass]=\"{ expanded: currentNode.childrenActive }\"\n data-testid=\"dropdown\"\n >\n <svg>\n <use href=\"assets/icons/expand.svg#expand\"></use>\n </svg>\n </button>\n </div>\n</div>\n<div class=\"phoenix-menu-children\" *ngIf=\"currentNode.childrenActive\">\n <app-phoenix-menu-item\n *ngFor=\"let childNode of currentNode.children\"\n [currentNode]=\"childNode\"\n >\n </app-phoenix-menu-item>\n</div>\n", styles: [".phoenix-menu-item{width:100%;padding:.6rem;background:var(--phoenix-background-color-secondary);color:var(--phoenix-text-color);font-size:.8rem;transition:all .5s;display:flex;justify-content:space-between;align-items:center}.phoenix-menu-item-left{display:flex;justify-content:flex-start;min-width:0;padding-right:.5rem;overflow:hidden}.phoenix-menu-item-left .item-name{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.phoenix-menu-item-left .item-icon{margin-right:.2rem}.phoenix-menu-item-right{display:flex;justify-content:flex-end}.phoenix-menu-item-right .item-expand.expanded{transform:scaleY(-1)}.phoenix-menu-item-right .item-settings{margin-right:.2rem}.phoenix-menu-item-right .item-config-backdrop{position:fixed;top:0;left:0;width:100vw;height:100vh;z-index:110}.phoenix-menu-item-right .item-config{position:absolute;margin-top:-5rem;right:100%;width:14rem;padding:.5rem;background:var(--phoenix-background-color-secondary);color:var(--phoenix-text-color-secondary);box-shadow:var(--phoenix-box-shadow);display:flex;flex-direction:column;z-index:120}.phoenix-menu-item-right .item-config>*{margin-bottom:.4rem}.phoenix-menu-item-right .item-config>*:last-child{margin-bottom:0}.phoenix-menu-item-right .item-config .item-config-single{display:flex;flex-direction:row}.phoenix-menu-item-right .item-config .item-config-single .item-config-label{width:30%}.phoenix-menu-item-right .item-config .item-config-single .item-config-data{flex-grow:1;padding-left:.5rem}.phoenix-menu-item .icon-wrapper{display:inline-block;width:1.3rem;height:1.3rem;padding:.23rem;transition:all .4s}.phoenix-menu-item .icon-wrapper.icon-button:hover{background:var(--phoenix-options-icon-bg);border-radius:40%;cursor:pointer}.phoenix-menu-item .icon-wrapper svg{width:100%;height:100%;vertical-align:top}.phoenix-menu-item .mat-slide-toggle-bar{width:30px!important}.phoenix-menu-item .mat-slide-toggle-thumb{width:15px!important;height:15px!important;position:absolute;top:2px}.phoenix-menu-item .mat-slider-horizontal{min-width:0;width:100%;height:20px}.phoenix-menu-item .mat-slider-horizontal .mat-slider-wrapper{top:10px}.phoenix-menu-item label.mat-checkbox-layout{margin:0}@media screen and (max-width: 768px){.phoenix-menu-item{font-size:.75rem;padding:.5rem}.phoenix-menu-item .icon-wrapper{width:1rem;height:1rem;padding:.15rem}}.phoenix-menu-children{margin-left:.5rem;border-left:1px solid var(--phoenix-accent)}.range-slider .range-slider-inputs{gap:20%}\n"] }]
|
|
425
|
+
}], () => [{ type: i0.ChangeDetectorRef }], { currentNode: [{
|
|
426
|
+
type: Input
|
|
427
|
+
}], phoenixMenuItem: [{
|
|
428
|
+
type: ViewChild,
|
|
429
|
+
args: ['phoenixMenuItem']
|
|
430
|
+
}] }); })();
|
|
431
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PhoenixMenuItemComponent, { className: "PhoenixMenuItemComponent", filePath: "components/phoenix-menu/phoenix-menu-item/phoenix-menu-item.component.ts", lineNumber: 17 }); })();
|
|
432
|
+
|
|
433
|
+
class PhoenixMenuComponent {
|
|
434
|
+
rootNode;
|
|
435
|
+
static ɵfac = function PhoenixMenuComponent_Factory(t) { return new (t || PhoenixMenuComponent)(); };
|
|
436
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PhoenixMenuComponent, selectors: [["app-phoenix-menu"]], inputs: { rootNode: "rootNode" }, decls: 2, vars: 1, consts: [["id", "phoenixMenu"], [3, "currentNode"]], template: function PhoenixMenuComponent_Template(rf, ctx) { if (rf & 1) {
|
|
437
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
438
|
+
i0.ɵɵelement(1, "app-phoenix-menu-item", 1);
|
|
439
|
+
i0.ɵɵelementEnd();
|
|
440
|
+
} if (rf & 2) {
|
|
441
|
+
i0.ɵɵadvance();
|
|
442
|
+
i0.ɵɵproperty("currentNode", ctx.rootNode);
|
|
443
|
+
} }, dependencies: [PhoenixMenuItemComponent], styles: ["[_nghost-%COMP%]{width:15rem;max-width:45%;position:absolute;top:5rem;right:1rem}#phoenixMenu[_ngcontent-%COMP%]{background:var(--phoenix-background-color-secondary);max-height:75vh;overflow-y:auto;box-shadow:var(--phoenix-box-shadow);z-index:100}@media screen and (max-width: 768px){#phoenixMenu[_ngcontent-%COMP%]{top:4rem}}"] });
|
|
444
|
+
}
|
|
445
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PhoenixMenuComponent, [{
|
|
446
|
+
type: Component,
|
|
447
|
+
args: [{ selector: 'app-phoenix-menu', template: "<div id=\"phoenixMenu\">\n <app-phoenix-menu-item [currentNode]=\"rootNode\"></app-phoenix-menu-item>\n</div>\n", styles: [":host{width:15rem;max-width:45%;position:absolute;top:5rem;right:1rem}#phoenixMenu{background:var(--phoenix-background-color-secondary);max-height:75vh;overflow-y:auto;box-shadow:var(--phoenix-box-shadow);z-index:100}@media screen and (max-width: 768px){#phoenixMenu{top:4rem}}\n"] }]
|
|
448
|
+
}], null, { rootNode: [{
|
|
449
|
+
type: Input
|
|
450
|
+
}] }); })();
|
|
451
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PhoenixMenuComponent, { className: "PhoenixMenuComponent", filePath: "components/phoenix-menu/phoenix-menu.component.ts", lineNumber: 9 }); })();
|
|
452
|
+
|
|
453
|
+
/**
|
|
454
|
+
* Service for all event display related functions.
|
|
455
|
+
*/
|
|
456
|
+
class EventDisplayService extends EventDisplay {
|
|
457
|
+
/**
|
|
458
|
+
* Instantiate the event display by calling the parent constructor.
|
|
459
|
+
*/
|
|
460
|
+
constructor() {
|
|
461
|
+
super();
|
|
462
|
+
}
|
|
463
|
+
static ɵfac = function EventDisplayService_Factory(t) { return new (t || EventDisplayService)(); };
|
|
464
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: EventDisplayService, factory: EventDisplayService.ɵfac, providedIn: 'root' });
|
|
465
|
+
}
|
|
466
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventDisplayService, [{
|
|
467
|
+
type: Injectable,
|
|
468
|
+
args: [{
|
|
469
|
+
providedIn: 'root',
|
|
470
|
+
}]
|
|
471
|
+
}], () => [], null); })();
|
|
472
|
+
|
|
473
|
+
const _c0$a = a0 => ({ disabled: a0 });
|
|
474
|
+
const _c1$3 = a0 => ({ "active-icon": a0 });
|
|
475
|
+
class MenuToggleComponent {
|
|
476
|
+
icon;
|
|
477
|
+
active;
|
|
478
|
+
tooltip;
|
|
479
|
+
disabled = false;
|
|
480
|
+
static ɵfac = function MenuToggleComponent_Factory(t) { return new (t || MenuToggleComponent)(); };
|
|
481
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MenuToggleComponent, selectors: [["app-menu-toggle"]], inputs: { icon: "icon", active: "active", tooltip: "tooltip", disabled: "disabled" }, decls: 3, vars: 10, consts: [["matTooltipPosition", "above", "matTooltipTouchGestures", "off", 1, "menu-toggle", 3, "ngClass", "matTooltip"], [1, "menu-toggle-icon", 3, "ngClass"]], template: function MenuToggleComponent_Template(rf, ctx) { if (rf & 1) {
|
|
482
|
+
i0.ɵɵelementStart(0, "button", 0);
|
|
483
|
+
i0.ɵɵnamespaceSVG();
|
|
484
|
+
i0.ɵɵelementStart(1, "svg", 1);
|
|
485
|
+
i0.ɵɵelement(2, "use");
|
|
486
|
+
i0.ɵɵelementEnd()();
|
|
487
|
+
} if (rf & 2) {
|
|
488
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c0$a, ctx.disabled))("matTooltip", ctx.tooltip);
|
|
489
|
+
i0.ɵɵadvance();
|
|
490
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(8, _c1$3, ctx.active));
|
|
491
|
+
i0.ɵɵadvance();
|
|
492
|
+
i0.ɵɵattributeInterpolate2("href", "assets/icons/", ctx.icon, ".svg#", ctx.icon, "");
|
|
493
|
+
} }, dependencies: [i2.NgClass, i3$1.MatTooltip], styles: ["[_nghost-%COMP%]{display:flex;margin:0 .6rem}[_nghost-%COMP%] .menu-toggle[_ngcontent-%COMP%]{display:flex;background:unset;border:none;height:2.5rem;width:2.5rem;min-height:2.5rem;min-width:2.5rem;padding:.65rem;cursor:pointer;align-self:center;transition:all .4s}[_nghost-%COMP%] .menu-toggle-icon[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] .menu-toggle-icon.active-icon[_ngcontent-%COMP%]{--phoenix-options-icon-path: #00bcd4}[_nghost-%COMP%] .menu-toggle[_ngcontent-%COMP%]:hover{background-color:var(--phoenix-options-icon-bg);border-radius:40%;transition:all .4s}[_nghost-%COMP%] .menu-toggle.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.4}"] });
|
|
494
|
+
}
|
|
495
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MenuToggleComponent, [{
|
|
496
|
+
type: Component,
|
|
497
|
+
args: [{ selector: 'app-menu-toggle', template: "<button\n class=\"menu-toggle\"\n [ngClass]=\"{ disabled: disabled }\"\n [matTooltip]=\"tooltip\"\n matTooltipPosition=\"above\"\n matTooltipTouchGestures=\"off\"\n>\n <svg class=\"menu-toggle-icon\" [ngClass]=\"{ 'active-icon': active }\">\n <use attr.href=\"assets/icons/{{ icon }}.svg#{{ icon }}\"></use>\n </svg>\n</button>\n", styles: [":host{display:flex;margin:0 .6rem}:host .menu-toggle{display:flex;background:unset;border:none;height:2.5rem;width:2.5rem;min-height:2.5rem;min-width:2.5rem;padding:.65rem;cursor:pointer;align-self:center;transition:all .4s}:host .menu-toggle-icon{width:100%;height:100%}:host .menu-toggle-icon.active-icon{--phoenix-options-icon-path: #00bcd4}:host .menu-toggle:hover{background-color:var(--phoenix-options-icon-bg);border-radius:40%;transition:all .4s}:host .menu-toggle.disabled{cursor:not-allowed;opacity:.4}\n"] }]
|
|
498
|
+
}], null, { icon: [{
|
|
499
|
+
type: Input
|
|
500
|
+
}], active: [{
|
|
501
|
+
type: Input
|
|
502
|
+
}], tooltip: [{
|
|
503
|
+
type: Input
|
|
504
|
+
}], disabled: [{
|
|
505
|
+
type: Input
|
|
506
|
+
}] }); })();
|
|
507
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MenuToggleComponent, { className: "MenuToggleComponent", filePath: "components/ui-menu/menu-toggle/menu-toggle.component.ts", lineNumber: 8 }); })();
|
|
508
|
+
|
|
509
|
+
function AnimateCameraComponent_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
510
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
511
|
+
i0.ɵɵelementStart(0, "button", 2);
|
|
512
|
+
i0.ɵɵlistener("click", function AnimateCameraComponent_button_2_Template_button_click_0_listener() { const preset_r3 = i0.ɵɵrestoreView(_r2).$implicit; const ctx_r3 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r3.animatePreset(preset_r3)); });
|
|
513
|
+
i0.ɵɵtext(1);
|
|
514
|
+
i0.ɵɵelementEnd();
|
|
515
|
+
} if (rf & 2) {
|
|
516
|
+
const preset_r3 = ctx.$implicit;
|
|
517
|
+
i0.ɵɵadvance();
|
|
518
|
+
i0.ɵɵtextInterpolate1(" ", preset_r3, " ");
|
|
519
|
+
} }
|
|
520
|
+
const defaultAnimationPresets = {
|
|
521
|
+
'Cavern to ID': {
|
|
522
|
+
name: 'Cavern to ID',
|
|
523
|
+
positions: [
|
|
524
|
+
{
|
|
525
|
+
position: [66388.95051168812, 5264.228603228927, -46910.7848593543],
|
|
526
|
+
duration: 1000,
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
position: [12834.18729094943, 677.7571205763458, 135.68755273443463],
|
|
530
|
+
duration: 2000,
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
position: [312.02688693297375, 25.884223757326, 270.10019006776236],
|
|
534
|
+
duration: 3500,
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
position: [263.3640855132258, 19.874838262525053, -318.16541790248885],
|
|
538
|
+
duration: 3000,
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
position: [5534.140362338047, 234.03507981484574, -2933.619479808285],
|
|
542
|
+
duration: 2000,
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
position: [2681.277288705242, 646.5795158318147, 5628.5248735111745],
|
|
546
|
+
duration: 1000,
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
position: [-6062.586283740076, 790.5876682946184, 1381.1675900848818],
|
|
550
|
+
duration: 1000,
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
position: [-1766.7693725879053, 1007.1048030984678, -5928.901341784575],
|
|
554
|
+
duration: 1000,
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
position: [12814.982506255355, 2516.987185037266, -22891.902734328327],
|
|
558
|
+
duration: 1000,
|
|
559
|
+
},
|
|
560
|
+
],
|
|
561
|
+
animateEventAfterInterval: 5000,
|
|
562
|
+
collisionDuration: 6000,
|
|
563
|
+
},
|
|
564
|
+
};
|
|
565
|
+
class AnimateCameraComponent {
|
|
566
|
+
eventDisplay;
|
|
567
|
+
animationPresets = defaultAnimationPresets;
|
|
568
|
+
animationPresetsKeys = Object.keys(this.animationPresets);
|
|
569
|
+
isAnimating = false;
|
|
570
|
+
constructor(eventDisplay) {
|
|
571
|
+
this.eventDisplay = eventDisplay;
|
|
572
|
+
// this.animationPresets = this.eventDisplay
|
|
573
|
+
// .getUIManager()
|
|
574
|
+
// .getPresetAnimations();
|
|
575
|
+
// This is too late to fill the UI! FIXME. EJWM
|
|
576
|
+
}
|
|
577
|
+
animatePreset(preset) {
|
|
578
|
+
this.setDetectorOpacity(0.2);
|
|
579
|
+
this.eventDisplay.animatePreset(this.animationPresets[preset], () => {
|
|
580
|
+
this.setDetectorOpacity(1);
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
animateCamera() {
|
|
584
|
+
if (!this.isAnimating) {
|
|
585
|
+
this.isAnimating = true;
|
|
586
|
+
this.eventDisplay.animateThroughEvent([11976, 7262, 11927], 3000, () => {
|
|
587
|
+
this.isAnimating = false;
|
|
588
|
+
});
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
setDetectorOpacity(opacity) {
|
|
592
|
+
const sceneManager = this.eventDisplay.getThreeManager().getSceneManager();
|
|
593
|
+
const geometriesGroup = sceneManager.getObjectByName(SceneManager.GEOMETRIES_ID);
|
|
594
|
+
sceneManager.setGeometryOpacity(geometriesGroup, opacity);
|
|
595
|
+
}
|
|
596
|
+
static ɵfac = function AnimateCameraComponent_Factory(t) { return new (t || AnimateCameraComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
597
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AnimateCameraComponent, selectors: [["app-animate-camera"]], inputs: { animationPresets: "animationPresets" }, decls: 6, vars: 2, consts: [["animationPresets", ""], ["mat-menu-item", "", 3, "click", 4, "ngFor", "ngForOf"], ["mat-menu-item", "", 3, "click"], ["tooltip", "Preset animations", "icon", "animate-camera", 3, "matMenuTriggerFor"]], template: function AnimateCameraComponent_Template(rf, ctx) { if (rf & 1) {
|
|
598
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
599
|
+
i0.ɵɵelementStart(0, "mat-menu", null, 0);
|
|
600
|
+
i0.ɵɵtemplate(2, AnimateCameraComponent_button_2_Template, 2, 1, "button", 1);
|
|
601
|
+
i0.ɵɵelementStart(3, "button", 2);
|
|
602
|
+
i0.ɵɵlistener("click", function AnimateCameraComponent_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.animateCamera()); });
|
|
603
|
+
i0.ɵɵtext(4, "Animate camera");
|
|
604
|
+
i0.ɵɵelementEnd()();
|
|
605
|
+
i0.ɵɵelement(5, "app-menu-toggle", 3);
|
|
606
|
+
} if (rf & 2) {
|
|
607
|
+
const animationPresets_r5 = i0.ɵɵreference(1);
|
|
608
|
+
i0.ɵɵadvance(2);
|
|
609
|
+
i0.ɵɵproperty("ngForOf", ctx.animationPresetsKeys);
|
|
610
|
+
i0.ɵɵadvance(3);
|
|
611
|
+
i0.ɵɵproperty("matMenuTriggerFor", animationPresets_r5);
|
|
612
|
+
} }, dependencies: [i2.NgForOf, i3$2.MatMenu, i3$2.MatMenuItem, i3$2.MatMenuTrigger, MenuToggleComponent] });
|
|
613
|
+
}
|
|
614
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AnimateCameraComponent, [{
|
|
615
|
+
type: Component,
|
|
616
|
+
args: [{ selector: 'app-animate-camera', template: "<mat-menu #animationPresets>\n <button\n mat-menu-item\n *ngFor=\"let preset of animationPresetsKeys\"\n (click)=\"animatePreset(preset)\"\n >\n {{ preset }}\n </button>\n <button mat-menu-item (click)=\"animateCamera()\">Animate camera</button>\n</mat-menu>\n\n<app-menu-toggle\n [matMenuTriggerFor]=\"animationPresets\"\n tooltip=\"Preset animations\"\n icon=\"animate-camera\"\n>\n</app-menu-toggle>\n" }]
|
|
617
|
+
}], () => [{ type: EventDisplayService }], { animationPresets: [{
|
|
618
|
+
type: Input
|
|
619
|
+
}] }); })();
|
|
620
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AnimateCameraComponent, { className: "AnimateCameraComponent", filePath: "components/ui-menu/animate-camera/animate-camera.component.ts", lineNumber: 58 }); })();
|
|
621
|
+
|
|
622
|
+
class AnimateEventComponent {
|
|
623
|
+
eventDisplay;
|
|
624
|
+
isAnimating = false;
|
|
625
|
+
constructor(eventDisplay) {
|
|
626
|
+
this.eventDisplay = eventDisplay;
|
|
627
|
+
}
|
|
628
|
+
toggleAnimateEvent() {
|
|
629
|
+
if (!this.isAnimating) {
|
|
630
|
+
this.isAnimating = true;
|
|
631
|
+
this.eventDisplay.animateEventWithCollision(10000, () => {
|
|
632
|
+
this.isAnimating = false;
|
|
633
|
+
});
|
|
634
|
+
}
|
|
635
|
+
}
|
|
636
|
+
static ɵfac = function AnimateEventComponent_Factory(t) { return new (t || AnimateEventComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
637
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AnimateEventComponent, selectors: [["app-animate-event"]], decls: 1, vars: 1, consts: [["tooltip", "Animate event", "icon", "event-folder", 3, "click", "active"]], template: function AnimateEventComponent_Template(rf, ctx) { if (rf & 1) {
|
|
638
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
639
|
+
i0.ɵɵlistener("click", function AnimateEventComponent_Template_app_menu_toggle_click_0_listener() { return ctx.toggleAnimateEvent(); });
|
|
640
|
+
i0.ɵɵelementEnd();
|
|
641
|
+
} if (rf & 2) {
|
|
642
|
+
i0.ɵɵproperty("active", ctx.isAnimating);
|
|
643
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
644
|
+
}
|
|
645
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AnimateEventComponent, [{
|
|
646
|
+
type: Component,
|
|
647
|
+
args: [{ selector: 'app-animate-event', template: "<app-menu-toggle\n tooltip=\"Animate event\"\n icon=\"event-folder\"\n [active]=\"isAnimating\"\n (click)=\"toggleAnimateEvent()\"\n>\n</app-menu-toggle>\n" }]
|
|
648
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
649
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AnimateEventComponent, { className: "AnimateEventComponent", filePath: "components/ui-menu/animate-event/animate-event.component.ts", lineNumber: 9 }); })();
|
|
650
|
+
|
|
651
|
+
class AutoRotateComponent {
|
|
652
|
+
eventDisplay;
|
|
653
|
+
autoRotate = false;
|
|
654
|
+
constructor(eventDisplay) {
|
|
655
|
+
this.eventDisplay = eventDisplay;
|
|
656
|
+
}
|
|
657
|
+
toggleAutoRotate() {
|
|
658
|
+
this.autoRotate = !this.autoRotate;
|
|
659
|
+
this.eventDisplay.getUIManager().setAutoRotate(this.autoRotate);
|
|
660
|
+
}
|
|
661
|
+
static ɵfac = function AutoRotateComponent_Factory(t) { return new (t || AutoRotateComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
662
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: AutoRotateComponent, selectors: [["app-auto-rotate"]], decls: 1, vars: 1, consts: [["tooltip", "Auto rotate", "icon", "rotate", 3, "click", "active"]], template: function AutoRotateComponent_Template(rf, ctx) { if (rf & 1) {
|
|
663
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
664
|
+
i0.ɵɵlistener("click", function AutoRotateComponent_Template_app_menu_toggle_click_0_listener() { return ctx.toggleAutoRotate(); });
|
|
665
|
+
i0.ɵɵelementEnd();
|
|
666
|
+
} if (rf & 2) {
|
|
667
|
+
i0.ɵɵproperty("active", ctx.autoRotate);
|
|
668
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
669
|
+
}
|
|
670
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AutoRotateComponent, [{
|
|
671
|
+
type: Component,
|
|
672
|
+
args: [{ selector: 'app-auto-rotate', template: "<app-menu-toggle\n tooltip=\"Auto rotate\"\n icon=\"rotate\"\n [active]=\"autoRotate\"\n (click)=\"toggleAutoRotate()\"\n>\n</app-menu-toggle>\n" }]
|
|
673
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
674
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(AutoRotateComponent, { className: "AutoRotateComponent", filePath: "components/ui-menu/auto-rotate/auto-rotate.component.ts", lineNumber: 9 }); })();
|
|
675
|
+
|
|
676
|
+
const _c0$9 = ["overlayCard"];
|
|
677
|
+
const _c1$2 = ["resizeHandleCorner"];
|
|
678
|
+
const _c2 = ["*"];
|
|
679
|
+
const _c3 = a0 => ({ "with-body": a0 });
|
|
680
|
+
const _c4 = a0 => ({ expand: a0 });
|
|
681
|
+
const _c5 = a0 => ({ "transparent-bg": a0 });
|
|
682
|
+
function OverlayComponent_div_2_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
683
|
+
i0.ɵɵelementStart(0, "div", 11);
|
|
684
|
+
i0.ɵɵnamespaceSVG();
|
|
685
|
+
i0.ɵɵelementStart(1, "svg");
|
|
686
|
+
i0.ɵɵelement(2, "use");
|
|
687
|
+
i0.ɵɵelementEnd()();
|
|
688
|
+
} if (rf & 2) {
|
|
689
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
690
|
+
i0.ɵɵadvance(2);
|
|
691
|
+
i0.ɵɵattributeInterpolate2("href", "assets/icons/", ctx_r1.icon, ".svg#", ctx_r1.icon, "");
|
|
692
|
+
} }
|
|
693
|
+
function OverlayComponent_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
694
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
695
|
+
i0.ɵɵelementStart(0, "div", 6);
|
|
696
|
+
i0.ɵɵtemplate(1, OverlayComponent_div_2_div_1_Template, 3, 3, "div", 7);
|
|
697
|
+
i0.ɵɵelementStart(2, "h5", 8);
|
|
698
|
+
i0.ɵɵtext(3);
|
|
699
|
+
i0.ɵɵelementEnd();
|
|
700
|
+
i0.ɵɵelementStart(4, "button", 9);
|
|
701
|
+
i0.ɵɵlistener("click", function OverlayComponent_div_2_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.showBody = !ctx_r1.showBody); });
|
|
702
|
+
i0.ɵɵnamespaceSVG();
|
|
703
|
+
i0.ɵɵelementStart(5, "svg");
|
|
704
|
+
i0.ɵɵelement(6, "use", 10);
|
|
705
|
+
i0.ɵɵelementEnd()()();
|
|
706
|
+
} if (rf & 2) {
|
|
707
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
708
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c3, ctx_r1.showBody));
|
|
709
|
+
i0.ɵɵadvance();
|
|
710
|
+
i0.ɵɵproperty("ngIf", ctx_r1.icon);
|
|
711
|
+
i0.ɵɵadvance(2);
|
|
712
|
+
i0.ɵɵtextInterpolate(ctx_r1.overlayTitle);
|
|
713
|
+
i0.ɵɵadvance();
|
|
714
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(6, _c4, ctx_r1.showBody));
|
|
715
|
+
} }
|
|
716
|
+
function OverlayComponent_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
717
|
+
i0.ɵɵelementStart(0, "div", 12);
|
|
718
|
+
i0.ɵɵprojection(1);
|
|
719
|
+
i0.ɵɵelementEnd();
|
|
720
|
+
} if (rf & 2) {
|
|
721
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
722
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(1, _c5, ctx_r1.transparentBody));
|
|
723
|
+
} }
|
|
724
|
+
function OverlayComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
725
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
726
|
+
i0.ɵɵelementStart(0, "span", 13, 1);
|
|
727
|
+
i0.ɵɵlistener("cdkDragMoved", function OverlayComponent_span_4_Template_span_cdkDragMoved_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.onResize()); });
|
|
728
|
+
i0.ɵɵelementEnd();
|
|
729
|
+
} if (rf & 2) {
|
|
730
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
731
|
+
i0.ɵɵproperty("hidden", !ctx_r1.showBody);
|
|
732
|
+
} }
|
|
733
|
+
/**
|
|
734
|
+
* Component for overlay panel.
|
|
735
|
+
*/
|
|
736
|
+
class OverlayComponent {
|
|
737
|
+
/** Title of the overlay. */
|
|
738
|
+
overlayTitle;
|
|
739
|
+
/** If the overlay is open or not. */
|
|
740
|
+
active = false;
|
|
741
|
+
/** Icon of the overlay header. */
|
|
742
|
+
icon;
|
|
743
|
+
/** If the overlay is resizable. */
|
|
744
|
+
resizable = false;
|
|
745
|
+
/** If the overlay body is transparent or not. */
|
|
746
|
+
transparentBody = false;
|
|
747
|
+
/** If the aspect ratio is kept fixed or not. */
|
|
748
|
+
keepAspectRatioFixed = false;
|
|
749
|
+
/** If the overlay body is visible or not. */
|
|
750
|
+
showBody = true;
|
|
751
|
+
/** Aspect ratio of the overlay view. */
|
|
752
|
+
aspectRatio = window.innerWidth / window.innerHeight;
|
|
753
|
+
// ********************************************************************************
|
|
754
|
+
// * Below code is specific to the overlay resize feature. (LOOK INTO CSS RESIZE) *
|
|
755
|
+
// ********************************************************************************
|
|
756
|
+
/** Complete overlay card containing both header and body. */
|
|
757
|
+
overlayCard;
|
|
758
|
+
/** Handle for resizing the overlay. */
|
|
759
|
+
resizeHandleCorner;
|
|
760
|
+
/** Minimum resizable width. */
|
|
761
|
+
MIN_RES_WIDTH = 300;
|
|
762
|
+
/** Minimum resizable height */
|
|
763
|
+
MIN_RES_HEIGHT = 100;
|
|
764
|
+
/**
|
|
765
|
+
* Move the resizable handle to the bottom right after the component is created.
|
|
766
|
+
*/
|
|
767
|
+
ngAfterViewInit() {
|
|
768
|
+
if (this.resizable) {
|
|
769
|
+
const resizeHandleElement = this.resizeHandleCorner.nativeElement;
|
|
770
|
+
resizeHandleElement.style.bottom = '0';
|
|
771
|
+
resizeHandleElement.style.right = '0';
|
|
772
|
+
new ResizeSensor(this.overlayCard.nativeElement, () => {
|
|
773
|
+
this.resetHandlePosition();
|
|
774
|
+
});
|
|
775
|
+
window.addEventListener('resize', () => {
|
|
776
|
+
this.resetHandlePosition();
|
|
777
|
+
});
|
|
778
|
+
}
|
|
779
|
+
}
|
|
780
|
+
/**
|
|
781
|
+
* Resize the overlay card when the resize handle is dragged.
|
|
782
|
+
*/
|
|
783
|
+
onResize() {
|
|
784
|
+
const resizeHandleElement = this.resizeHandleCorner.nativeElement;
|
|
785
|
+
const overlayCardElement = this.overlayCard.nativeElement;
|
|
786
|
+
const dragRect = resizeHandleElement.getBoundingClientRect();
|
|
787
|
+
const overlayRect = overlayCardElement.getBoundingClientRect();
|
|
788
|
+
const width = dragRect.left - overlayRect.left + dragRect.width;
|
|
789
|
+
const height = dragRect.top - overlayRect.top + dragRect.height;
|
|
790
|
+
this.setHandleTransform(overlayRect, dragRect);
|
|
791
|
+
if (width > this.MIN_RES_WIDTH && height > this.MIN_RES_HEIGHT) {
|
|
792
|
+
overlayCardElement.style.width = width + 'px';
|
|
793
|
+
if (this.keepAspectRatioFixed) {
|
|
794
|
+
overlayCardElement.style.height = width / this.aspectRatio + 30 + 'px';
|
|
795
|
+
}
|
|
796
|
+
else {
|
|
797
|
+
overlayCardElement.style.height = height + 'px';
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
/**
|
|
802
|
+
* Reset resize handle position.
|
|
803
|
+
*/
|
|
804
|
+
resetHandlePosition() {
|
|
805
|
+
const resizeHandleElement = this.resizeHandleCorner.nativeElement;
|
|
806
|
+
this.setHandleTransform(this.overlayCard.nativeElement.getBoundingClientRect(), resizeHandleElement.getBoundingClientRect());
|
|
807
|
+
resizeHandleElement.style.bottom = null;
|
|
808
|
+
resizeHandleElement.style.right = null;
|
|
809
|
+
}
|
|
810
|
+
/**
|
|
811
|
+
* Set the position of the resize handle using transform3d.
|
|
812
|
+
* @param overlayRect Bounding client rectangle of the overlay card.
|
|
813
|
+
* @param dragRect Bounding client rectangle of the resize handle.
|
|
814
|
+
*/
|
|
815
|
+
setHandleTransform(overlayRect, dragRect) {
|
|
816
|
+
const translateX = overlayRect.width - dragRect.width;
|
|
817
|
+
const translateY = overlayRect.height - dragRect.height;
|
|
818
|
+
this.resizeHandleCorner.nativeElement.style.transform = `translate3d(${translateX}px, ${translateY}px, 0)`;
|
|
819
|
+
}
|
|
820
|
+
static ɵfac = function OverlayComponent_Factory(t) { return new (t || OverlayComponent)(); };
|
|
821
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OverlayComponent, selectors: [["app-overlay"]], viewQuery: function OverlayComponent_Query(rf, ctx) { if (rf & 1) {
|
|
822
|
+
i0.ɵɵviewQuery(_c0$9, 5);
|
|
823
|
+
i0.ɵɵviewQuery(_c1$2, 5);
|
|
824
|
+
} if (rf & 2) {
|
|
825
|
+
let _t;
|
|
826
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.overlayCard = _t.first);
|
|
827
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.resizeHandleCorner = _t.first);
|
|
828
|
+
} }, inputs: { overlayTitle: "overlayTitle", active: "active", icon: "icon", resizable: "resizable", transparentBody: "transparentBody", keepAspectRatioFixed: "keepAspectRatioFixed" }, ngContentSelectors: _c2, decls: 5, vars: 4, consts: [["overlayCard", ""], ["resizeHandleCorner", ""], ["cdkDrag", "", "cdkDragBoundary", "body", 1, "overlay-card", "card", 3, "hidden"], ["class", "card-header d-flex justify-content-between", "cdkDragHandle", "", 3, "ngClass", 4, "ngIf"], ["class", "overlay-card-content", 3, "ngClass", 4, "ngIf"], ["class", "resize-handle corner", "cdkDrag", "", 3, "hidden", "cdkDragMoved", 4, "ngIf"], ["cdkDragHandle", "", 1, "card-header", "d-flex", "justify-content-between", 3, "ngClass"], ["class", "align-self-center card-icon", 4, "ngIf"], [1, "align-self-center", "m-0", "px-2"], ["matTooltip", "Expand / Collapse", "matTooltipPosition", "right", 1, "align-self-center", "card-icon", "btn-blank", "expandCollapse", 3, "click", "ngClass"], ["href", "assets/icons/expand.svg#expand"], [1, "align-self-center", "card-icon"], [1, "overlay-card-content", 3, "ngClass"], ["cdkDrag", "", 1, "resize-handle", "corner", 3, "cdkDragMoved", "hidden"]], template: function OverlayComponent_Template(rf, ctx) { if (rf & 1) {
|
|
829
|
+
i0.ɵɵprojectionDef();
|
|
830
|
+
i0.ɵɵelementStart(0, "div", 2, 0);
|
|
831
|
+
i0.ɵɵtemplate(2, OverlayComponent_div_2_Template, 7, 8, "div", 3)(3, OverlayComponent_div_3_Template, 2, 3, "div", 4)(4, OverlayComponent_span_4_Template, 2, 1, "span", 5);
|
|
832
|
+
i0.ɵɵelementEnd();
|
|
833
|
+
} if (rf & 2) {
|
|
834
|
+
i0.ɵɵproperty("hidden", !ctx.active);
|
|
835
|
+
i0.ɵɵadvance(2);
|
|
836
|
+
i0.ɵɵproperty("ngIf", ctx.overlayTitle);
|
|
837
|
+
i0.ɵɵadvance();
|
|
838
|
+
i0.ɵɵproperty("ngIf", ctx.showBody);
|
|
839
|
+
i0.ɵɵadvance();
|
|
840
|
+
i0.ɵɵproperty("ngIf", ctx.resizable);
|
|
841
|
+
} }, dependencies: [i2.NgClass, i2.NgIf, i2$2.CdkDrag, i2$2.CdkDragHandle, i3$1.MatTooltip], styles: [".overlay-card.card{color:var(--phoenix-text-color);background:none;max-width:100vw;font-size:12px;min-width:300px;height:100%;max-height:70vh;box-shadow:none;border:none;position:relative;z-index:200}.overlay-card.card .card-header{width:12rem;background:var(--phoenix-background-color-secondary);box-shadow:var(--phoenix-box-shadow);padding:.4rem .8rem;border-radius:10px;border:none;cursor:move;text-align:center;transition:all .2s}.overlay-card.card .card-header.with-body{border-bottom-left-radius:0;border-bottom-right-radius:0}.overlay-card.card .card-header .card-icon{display:flex;height:.7rem;width:.7rem}.overlay-card.card .card-header h5{font-size:.9rem}.overlay-card.card .card-header .expandCollapse{cursor:pointer;transition:all .2s}.overlay-card.card .card-header .expandCollapse.expand{transform:scaleY(-1)}.overlay-card.card .card-header .expandCollapse svg{width:100%;height:100%}.overlay-card.card .overlay-card-content{background:var(--phoenix-background-color-secondary);box-shadow:var(--phoenix-box-shadow);border-radius:0 10px 10px;overflow:auto;height:100%}.overlay-card.card .overlay-card-content.transparent-bg{background:none}.overlay-card.card .list-group{color:var(--phoenix-text-color-secondary);background:var(--phoenix-background-color-secondary);max-height:40vh;overflow:auto}.overlay-card.card .list-group .list-group-item{background-color:var(--phoenix-background-color-secondary);border-color:var(--phoenix-border)}.overlay-card.card .resize-handle{width:1rem;height:1rem;cursor:nwse-resize;position:absolute}.overlay-card.card .resize-handle.corner{border-right:.2rem solid var(--phoenix-text-color);border-bottom:.2rem solid var(--phoenix-text-color)}\n"], encapsulation: 2 });
|
|
842
|
+
}
|
|
843
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayComponent, [{
|
|
844
|
+
type: Component,
|
|
845
|
+
args: [{ selector: 'app-overlay', encapsulation: ViewEncapsulation.None, template: "<div\n #overlayCard\n class=\"overlay-card card\"\n [hidden]=\"!active\"\n cdkDrag\n cdkDragBoundary=\"body\"\n>\n <div\n class=\"card-header d-flex justify-content-between\"\n [ngClass]=\"{ 'with-body': showBody }\"\n cdkDragHandle\n *ngIf=\"overlayTitle\"\n >\n <div class=\"align-self-center card-icon\" *ngIf=\"icon\">\n <svg>\n <use attr.href=\"assets/icons/{{ icon }}.svg#{{ icon }}\"></use>\n </svg>\n </div>\n <h5 class=\"align-self-center m-0 px-2\">{{ overlayTitle }}</h5>\n <button\n class=\"align-self-center card-icon btn-blank expandCollapse\"\n matTooltip=\"Expand / Collapse\"\n matTooltipPosition=\"right\"\n [ngClass]=\"{ expand: showBody }\"\n (click)=\"showBody = !showBody\"\n >\n <svg>\n <use href=\"assets/icons/expand.svg#expand\"></use>\n </svg>\n </button>\n </div>\n <div\n class=\"overlay-card-content\"\n *ngIf=\"showBody\"\n [ngClass]=\"{ 'transparent-bg': transparentBody }\"\n >\n <ng-content></ng-content>\n </div>\n <!-- Making the overlay resizable -->\n <span\n #resizeHandleCorner\n class=\"resize-handle corner\"\n *ngIf=\"resizable\"\n [hidden]=\"!showBody\"\n cdkDrag\n (cdkDragMoved)=\"onResize()\"\n ></span>\n</div>\n", styles: [".overlay-card.card{color:var(--phoenix-text-color);background:none;max-width:100vw;font-size:12px;min-width:300px;height:100%;max-height:70vh;box-shadow:none;border:none;position:relative;z-index:200}.overlay-card.card .card-header{width:12rem;background:var(--phoenix-background-color-secondary);box-shadow:var(--phoenix-box-shadow);padding:.4rem .8rem;border-radius:10px;border:none;cursor:move;text-align:center;transition:all .2s}.overlay-card.card .card-header.with-body{border-bottom-left-radius:0;border-bottom-right-radius:0}.overlay-card.card .card-header .card-icon{display:flex;height:.7rem;width:.7rem}.overlay-card.card .card-header h5{font-size:.9rem}.overlay-card.card .card-header .expandCollapse{cursor:pointer;transition:all .2s}.overlay-card.card .card-header .expandCollapse.expand{transform:scaleY(-1)}.overlay-card.card .card-header .expandCollapse svg{width:100%;height:100%}.overlay-card.card .overlay-card-content{background:var(--phoenix-background-color-secondary);box-shadow:var(--phoenix-box-shadow);border-radius:0 10px 10px;overflow:auto;height:100%}.overlay-card.card .overlay-card-content.transparent-bg{background:none}.overlay-card.card .list-group{color:var(--phoenix-text-color-secondary);background:var(--phoenix-background-color-secondary);max-height:40vh;overflow:auto}.overlay-card.card .list-group .list-group-item{background-color:var(--phoenix-background-color-secondary);border-color:var(--phoenix-border)}.overlay-card.card .resize-handle{width:1rem;height:1rem;cursor:nwse-resize;position:absolute}.overlay-card.card .resize-handle.corner{border-right:.2rem solid var(--phoenix-text-color);border-bottom:.2rem solid var(--phoenix-text-color)}\n"] }]
|
|
846
|
+
}], null, { overlayTitle: [{
|
|
847
|
+
type: Input
|
|
848
|
+
}], active: [{
|
|
849
|
+
type: Input
|
|
850
|
+
}], icon: [{
|
|
851
|
+
type: Input
|
|
852
|
+
}], resizable: [{
|
|
853
|
+
type: Input
|
|
854
|
+
}], transparentBody: [{
|
|
855
|
+
type: Input
|
|
856
|
+
}], keepAspectRatioFixed: [{
|
|
857
|
+
type: Input
|
|
858
|
+
}], overlayCard: [{
|
|
859
|
+
type: ViewChild,
|
|
860
|
+
args: ['overlayCard']
|
|
861
|
+
}], resizeHandleCorner: [{
|
|
862
|
+
type: ViewChild,
|
|
863
|
+
args: ['resizeHandleCorner']
|
|
864
|
+
}] }); })();
|
|
865
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(OverlayComponent, { className: "OverlayComponent", filePath: "components/ui-menu/overlay/overlay.component.ts", lineNumber: 20 }); })();
|
|
866
|
+
|
|
867
|
+
const _c0$8 = (a0, a1, a2) => ({ "active-object": a0, "is-cut": a1, "d-none": a2 });
|
|
868
|
+
function CollectionsInfoOverlayComponent_div_1_div_1_option_10_Template(rf, ctx) { if (rf & 1) {
|
|
869
|
+
i0.ɵɵelementStart(0, "option", 15);
|
|
870
|
+
i0.ɵɵtext(1);
|
|
871
|
+
i0.ɵɵelementEnd();
|
|
872
|
+
} if (rf & 2) {
|
|
873
|
+
const collection_r3 = ctx.$implicit;
|
|
874
|
+
i0.ɵɵproperty("value", collection_r3);
|
|
875
|
+
i0.ɵɵadvance();
|
|
876
|
+
i0.ɵɵtextInterpolate1(" ", collection_r3, " ");
|
|
877
|
+
} }
|
|
878
|
+
function CollectionsInfoOverlayComponent_div_1_div_1_mat_checkbox_11_Template(rf, ctx) { if (rf & 1) {
|
|
879
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
880
|
+
i0.ɵɵelementStart(0, "mat-checkbox", 16);
|
|
881
|
+
i0.ɵɵlistener("change", function CollectionsInfoOverlayComponent_div_1_div_1_mat_checkbox_11_Template_mat_checkbox_change_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.toggleInvisible($event.checked)); });
|
|
882
|
+
i0.ɵɵtext(1, " Hide Invisible Objects ");
|
|
883
|
+
i0.ɵɵelementEnd();
|
|
884
|
+
} }
|
|
885
|
+
function CollectionsInfoOverlayComponent_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
886
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
887
|
+
i0.ɵɵelementStart(0, "div", 7)(1, "div", 8)(2, "span");
|
|
888
|
+
i0.ɵɵtext(3, "Choose a collection: ");
|
|
889
|
+
i0.ɵɵelementEnd();
|
|
890
|
+
i0.ɵɵelementStart(4, "div", 9)(5, "label", 10);
|
|
891
|
+
i0.ɵɵtext(6, "Event");
|
|
892
|
+
i0.ɵɵelementEnd();
|
|
893
|
+
i0.ɵɵelementStart(7, "select", 11);
|
|
894
|
+
i0.ɵɵlistener("change", function CollectionsInfoOverlayComponent_div_1_div_1_Template_select_change_7_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.changeCollection($event.target.value)); });
|
|
895
|
+
i0.ɵɵelementStart(8, "option", 12);
|
|
896
|
+
i0.ɵɵtext(9, "Choose Collection");
|
|
897
|
+
i0.ɵɵelementEnd();
|
|
898
|
+
i0.ɵɵtemplate(10, CollectionsInfoOverlayComponent_div_1_div_1_option_10_Template, 2, 2, "option", 13);
|
|
899
|
+
i0.ɵɵelementEnd()();
|
|
900
|
+
i0.ɵɵtemplate(11, CollectionsInfoOverlayComponent_div_1_div_1_mat_checkbox_11_Template, 2, 0, "mat-checkbox", 14);
|
|
901
|
+
i0.ɵɵelementEnd()();
|
|
902
|
+
} if (rf & 2) {
|
|
903
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
904
|
+
i0.ɵɵadvance(10);
|
|
905
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.collections);
|
|
906
|
+
i0.ɵɵadvance();
|
|
907
|
+
i0.ɵɵproperty("ngIf", ctx_r1.showingCollection);
|
|
908
|
+
} }
|
|
909
|
+
function CollectionsInfoOverlayComponent_div_1_table_3_th_9_Template(rf, ctx) { if (rf & 1) {
|
|
910
|
+
const _r5 = i0.ɵɵgetCurrentView();
|
|
911
|
+
i0.ɵɵelementStart(0, "th")(1, "div", 20)(2, "div");
|
|
912
|
+
i0.ɵɵtext(3);
|
|
913
|
+
i0.ɵɵelementEnd();
|
|
914
|
+
i0.ɵɵelementStart(4, "div", 21)(5, "button", 22);
|
|
915
|
+
i0.ɵɵlistener("click", function CollectionsInfoOverlayComponent_div_1_table_3_th_9_Template_button_click_5_listener() { const column_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.sort(column_r6, "dec")); });
|
|
916
|
+
i0.ɵɵnamespaceSVG();
|
|
917
|
+
i0.ɵɵelementStart(6, "svg");
|
|
918
|
+
i0.ɵɵelement(7, "use", 23);
|
|
919
|
+
i0.ɵɵelementEnd()();
|
|
920
|
+
i0.ɵɵnamespaceHTML();
|
|
921
|
+
i0.ɵɵelementStart(8, "button", 24);
|
|
922
|
+
i0.ɵɵlistener("click", function CollectionsInfoOverlayComponent_div_1_table_3_th_9_Template_button_click_8_listener() { const column_r6 = i0.ɵɵrestoreView(_r5).$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.sort(column_r6, "asc")); });
|
|
923
|
+
i0.ɵɵnamespaceSVG();
|
|
924
|
+
i0.ɵɵelementStart(9, "svg");
|
|
925
|
+
i0.ɵɵelement(10, "use", 23);
|
|
926
|
+
i0.ɵɵelementEnd()()()()();
|
|
927
|
+
} if (rf & 2) {
|
|
928
|
+
const column_r6 = ctx.$implicit;
|
|
929
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
930
|
+
i0.ɵɵadvance(3);
|
|
931
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r1.getPrettySymbol(column_r6), " ");
|
|
932
|
+
} }
|
|
933
|
+
function CollectionsInfoOverlayComponent_div_1_table_3_tr_11_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
934
|
+
const _r8 = i0.ɵɵgetCurrentView();
|
|
935
|
+
i0.ɵɵelementStart(0, "div", 33)(1, "button", 34);
|
|
936
|
+
i0.ɵɵlistener("click", function CollectionsInfoOverlayComponent_div_1_table_3_tr_11_div_4_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r8); const object_r9 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.lookAtObject(object_r9.uuid)); });
|
|
937
|
+
i0.ɵɵnamespaceSVG();
|
|
938
|
+
i0.ɵɵelementStart(2, "svg");
|
|
939
|
+
i0.ɵɵelement(3, "use", 35);
|
|
940
|
+
i0.ɵɵelementEnd()();
|
|
941
|
+
i0.ɵɵnamespaceHTML();
|
|
942
|
+
i0.ɵɵelementStart(4, "button", 36);
|
|
943
|
+
i0.ɵɵlistener("click", function CollectionsInfoOverlayComponent_div_1_table_3_tr_11_div_4_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r8); const object_r9 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.highlightObject(object_r9.uuid)); });
|
|
944
|
+
i0.ɵɵnamespaceSVG();
|
|
945
|
+
i0.ɵɵelementStart(5, "svg");
|
|
946
|
+
i0.ɵɵelement(6, "use", 37);
|
|
947
|
+
i0.ɵɵelementEnd()()();
|
|
948
|
+
} }
|
|
949
|
+
function CollectionsInfoOverlayComponent_div_1_table_3_tr_11_td_13_Template(rf, ctx) { if (rf & 1) {
|
|
950
|
+
i0.ɵɵelementStart(0, "td");
|
|
951
|
+
i0.ɵɵtext(1);
|
|
952
|
+
i0.ɵɵelementEnd();
|
|
953
|
+
} if (rf & 2) {
|
|
954
|
+
const column_r12 = ctx.$implicit;
|
|
955
|
+
const object_r9 = i0.ɵɵnextContext().$implicit;
|
|
956
|
+
i0.ɵɵadvance();
|
|
957
|
+
i0.ɵɵtextInterpolate1(" ", object_r9[column_r12], " ");
|
|
958
|
+
} }
|
|
959
|
+
function CollectionsInfoOverlayComponent_div_1_table_3_tr_11_Template(rf, ctx) { if (rf & 1) {
|
|
960
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
961
|
+
i0.ɵɵelementStart(0, "tr", 25)(1, "td");
|
|
962
|
+
i0.ɵɵtext(2);
|
|
963
|
+
i0.ɵɵelementEnd();
|
|
964
|
+
i0.ɵɵelementStart(3, "td");
|
|
965
|
+
i0.ɵɵtemplate(4, CollectionsInfoOverlayComponent_div_1_table_3_tr_11_div_4_Template, 7, 0, "div", 26);
|
|
966
|
+
i0.ɵɵelementEnd();
|
|
967
|
+
i0.ɵɵelementStart(5, "td")(6, "div", 27)(7, "div", 28);
|
|
968
|
+
i0.ɵɵelement(8, "input", 29);
|
|
969
|
+
i0.ɵɵelementEnd();
|
|
970
|
+
i0.ɵɵelementStart(9, "div", 30)(10, "button", 31);
|
|
971
|
+
i0.ɵɵlistener("click", function CollectionsInfoOverlayComponent_div_1_table_3_tr_11_Template_button_click_10_listener() { const ctx_r9 = i0.ɵɵrestoreView(_r7); const object_r9 = ctx_r9.$implicit; const i_r11 = ctx_r9.index; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.addLabel(i_r11, object_r9.uuid)); });
|
|
972
|
+
i0.ɵɵnamespaceSVG();
|
|
973
|
+
i0.ɵɵelementStart(11, "svg");
|
|
974
|
+
i0.ɵɵelement(12, "use", 32);
|
|
975
|
+
i0.ɵɵelementEnd()()()()();
|
|
976
|
+
i0.ɵɵtemplate(13, CollectionsInfoOverlayComponent_div_1_table_3_tr_11_td_13_Template, 2, 1, "td", 18);
|
|
977
|
+
i0.ɵɵelementEnd();
|
|
978
|
+
} if (rf & 2) {
|
|
979
|
+
const object_r9 = ctx.$implicit;
|
|
980
|
+
const i_r11 = ctx.index;
|
|
981
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
982
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction3(6, _c0$8, ctx_r1.activeObject && ctx_r1.activeObject.value === object_r9.uuid, object_r9.isCut, object_r9.isCut && ctx_r1.hideInvisible));
|
|
983
|
+
i0.ɵɵattribute("id", object_r9.uuid);
|
|
984
|
+
i0.ɵɵadvance(2);
|
|
985
|
+
i0.ɵɵtextInterpolate1("#", i_r11, "");
|
|
986
|
+
i0.ɵɵadvance(2);
|
|
987
|
+
i0.ɵɵproperty("ngIf", object_r9.uuid);
|
|
988
|
+
i0.ɵɵadvance(4);
|
|
989
|
+
i0.ɵɵproperty("id", "label" + i_r11);
|
|
990
|
+
i0.ɵɵadvance(5);
|
|
991
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.collectionColumns);
|
|
992
|
+
} }
|
|
993
|
+
function CollectionsInfoOverlayComponent_div_1_table_3_Template(rf, ctx) { if (rf & 1) {
|
|
994
|
+
i0.ɵɵelementStart(0, "table", 17)(1, "thead")(2, "tr")(3, "th");
|
|
995
|
+
i0.ɵɵtext(4, "No.");
|
|
996
|
+
i0.ɵɵelementEnd();
|
|
997
|
+
i0.ɵɵelementStart(5, "th");
|
|
998
|
+
i0.ɵɵtext(6, "Selection");
|
|
999
|
+
i0.ɵɵelementEnd();
|
|
1000
|
+
i0.ɵɵelementStart(7, "th");
|
|
1001
|
+
i0.ɵɵtext(8, "Label");
|
|
1002
|
+
i0.ɵɵelementEnd();
|
|
1003
|
+
i0.ɵɵtemplate(9, CollectionsInfoOverlayComponent_div_1_table_3_th_9_Template, 11, 1, "th", 18);
|
|
1004
|
+
i0.ɵɵelementEnd()();
|
|
1005
|
+
i0.ɵɵelementStart(10, "tbody");
|
|
1006
|
+
i0.ɵɵtemplate(11, CollectionsInfoOverlayComponent_div_1_table_3_tr_11_Template, 14, 10, "tr", 19);
|
|
1007
|
+
i0.ɵɵelementEnd()();
|
|
1008
|
+
} if (rf & 2) {
|
|
1009
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
1010
|
+
i0.ɵɵadvance(9);
|
|
1011
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.collectionColumns);
|
|
1012
|
+
i0.ɵɵadvance(2);
|
|
1013
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.showingCollection);
|
|
1014
|
+
} }
|
|
1015
|
+
function CollectionsInfoOverlayComponent_div_1_p_4_Template(rf, ctx) { if (rf & 1) {
|
|
1016
|
+
i0.ɵɵelementStart(0, "p", 38);
|
|
1017
|
+
i0.ɵɵtext(1, " Load event data to be able to display information about the collections here. ");
|
|
1018
|
+
i0.ɵɵelementEnd();
|
|
1019
|
+
} }
|
|
1020
|
+
function CollectionsInfoOverlayComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1021
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
1022
|
+
i0.ɵɵtemplate(1, CollectionsInfoOverlayComponent_div_1_div_1_Template, 12, 2, "div", 3);
|
|
1023
|
+
i0.ɵɵelementStart(2, "div", 4);
|
|
1024
|
+
i0.ɵɵtemplate(3, CollectionsInfoOverlayComponent_div_1_table_3_Template, 12, 2, "table", 5)(4, CollectionsInfoOverlayComponent_div_1_p_4_Template, 2, 0, "p", 6);
|
|
1025
|
+
i0.ɵɵelementEnd()();
|
|
1026
|
+
} if (rf & 2) {
|
|
1027
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
1028
|
+
i0.ɵɵadvance();
|
|
1029
|
+
i0.ɵɵproperty("ngIf", ctx_r1.collections != null);
|
|
1030
|
+
i0.ɵɵadvance(2);
|
|
1031
|
+
i0.ɵɵproperty("ngIf", ctx_r1.showingCollection);
|
|
1032
|
+
i0.ɵɵadvance();
|
|
1033
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.collections);
|
|
1034
|
+
} }
|
|
1035
|
+
class CollectionsInfoOverlayComponent {
|
|
1036
|
+
elementRef;
|
|
1037
|
+
eventDisplay;
|
|
1038
|
+
showObjectsInfo;
|
|
1039
|
+
hideInvisible;
|
|
1040
|
+
collections;
|
|
1041
|
+
selectedCollection;
|
|
1042
|
+
showingCollection;
|
|
1043
|
+
collectionColumns;
|
|
1044
|
+
getPrettySymbol = PrettySymbols.getPrettySymbol;
|
|
1045
|
+
activeObject;
|
|
1046
|
+
constructor(elementRef, eventDisplay) {
|
|
1047
|
+
this.elementRef = elementRef;
|
|
1048
|
+
this.eventDisplay = eventDisplay;
|
|
1049
|
+
}
|
|
1050
|
+
ngOnInit() {
|
|
1051
|
+
this.eventDisplay.listenToDisplayedEventChange((_event) => (this.collections = this.eventDisplay.getCollections()));
|
|
1052
|
+
this.activeObject = this.eventDisplay.getActiveObjectId();
|
|
1053
|
+
this.activeObject.onUpdate((value) => {
|
|
1054
|
+
if (document.getElementById(value)) {
|
|
1055
|
+
document.getElementById(value).scrollIntoView(false);
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
changeCollection(selectedCollection) {
|
|
1060
|
+
const eventDataGroup = this.getEventDataGroup();
|
|
1061
|
+
this.selectedCollection = selectedCollection;
|
|
1062
|
+
this.showingCollection = this.eventDisplay
|
|
1063
|
+
.getCollection(selectedCollection)
|
|
1064
|
+
.map((object) => ({
|
|
1065
|
+
...object,
|
|
1066
|
+
isCut: !eventDataGroup.getObjectByProperty('uuid', object.uuid)
|
|
1067
|
+
?.visible,
|
|
1068
|
+
}));
|
|
1069
|
+
this.collectionColumns = Object.keys(this.showingCollection[0]).filter((column) => !['uuid', 'hits', 'isCut'].includes(column));
|
|
1070
|
+
}
|
|
1071
|
+
sort(column, order) {
|
|
1072
|
+
if (order === 'asc')
|
|
1073
|
+
this.showingCollection.sort((a, b) => (a[column] < b[column] ? -1 : 1));
|
|
1074
|
+
else
|
|
1075
|
+
this.showingCollection.sort((a, b) => (a[column] > b[column] ? -1 : 1));
|
|
1076
|
+
}
|
|
1077
|
+
lookAtObject(uuid) {
|
|
1078
|
+
if (uuid) {
|
|
1079
|
+
this.activeObject.update(uuid);
|
|
1080
|
+
this.eventDisplay.lookAtObject(uuid);
|
|
1081
|
+
}
|
|
1082
|
+
}
|
|
1083
|
+
highlightObject(uuid) {
|
|
1084
|
+
if (uuid) {
|
|
1085
|
+
this.activeObject.update(uuid);
|
|
1086
|
+
this.eventDisplay.highlightObject(uuid);
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
enableHighlighting() {
|
|
1090
|
+
this.eventDisplay.enableHighlighting();
|
|
1091
|
+
}
|
|
1092
|
+
disableHighlighting() {
|
|
1093
|
+
this.eventDisplay.disableHighlighting();
|
|
1094
|
+
}
|
|
1095
|
+
toggleInvisible(checked) {
|
|
1096
|
+
this.hideInvisible = checked;
|
|
1097
|
+
}
|
|
1098
|
+
addLabel(index, uuid) {
|
|
1099
|
+
const labelValue = this.elementRef.nativeElement.querySelector(`#label${index}`).value;
|
|
1100
|
+
if (this.selectedCollection) {
|
|
1101
|
+
// Empty labelValue will remove the label object
|
|
1102
|
+
this.eventDisplay.addLabelToObject(labelValue, this.selectedCollection, index, uuid);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
getEventDataGroup() {
|
|
1106
|
+
return this.eventDisplay
|
|
1107
|
+
.getThreeManager()
|
|
1108
|
+
.getSceneManager()
|
|
1109
|
+
.getScene()
|
|
1110
|
+
.getObjectByName(SceneManager.EVENT_DATA_ID);
|
|
1111
|
+
}
|
|
1112
|
+
static ɵfac = function CollectionsInfoOverlayComponent_Factory(t) { return new (t || CollectionsInfoOverlayComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
1113
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionsInfoOverlayComponent, selectors: [["app-collections-info-overlay"]], inputs: { showObjectsInfo: "showObjectsInfo" }, decls: 2, vars: 3, consts: [["overlayTitle", "Collections Info", "icon", "info", 3, "resizable", "active"], ["class", "collectionsInfo m-2", 4, "ngIf"], [1, "collectionsInfo", "m-2"], ["class", "collectionSelector mb-2 d-flex align-items-center", 4, "ngIf"], [1, "boxBody", "table-responsive"], ["id", "collectionTable", "class", "table table-borderless table-sm", 4, "ngIf"], ["class", "emptyBox", 4, "ngIf"], [1, "collectionSelector", "mb-2", "d-flex", "align-items-center"], [1, "d-flex", "align-items-center"], [1, "eventSelector"], ["for", "event"], ["id", "collection", "name", "collection", 3, "change"], ["value", "", "selected", "", "disabled", "", "hidden", ""], [3, "value", 4, "ngFor", "ngForOf"], [3, "change", 4, "ngIf"], [3, "value"], [3, "change"], ["id", "collectionTable", 1, "table", "table-borderless", "table-sm"], [4, "ngFor", "ngForOf"], [3, "ngClass", 4, "ngFor", "ngForOf"], [1, "head-wrapper"], [1, "sort-options"], [1, "icon-wrapper", "icon-button", "btn-blank", "up", 3, "click"], ["href", "assets/icons/expand.svg#expand"], [1, "icon-wrapper", "icon-button", "btn-blank", 3, "click"], [3, "ngClass"], ["class", "row justify-content-center icon-wrapper", 4, "ngIf"], [1, "row", "m-0", "add-label"], [1, "col-10", "p-0"], ["type", "text", 1, "form-control", "form-control-sm", 3, "id"], [1, "col-2", "p-0", "pl-2", "text-center", "icon-wrapper"], ["matTooltip", "Add, update or remove object label", 1, "object-select", "btn-blank", 3, "click"], ["href", "assets/icons/update.svg#update"], [1, "row", "justify-content-center", "icon-wrapper"], ["matTooltip", "Move camera to object", 1, "object-select", "btn-blank", 3, "click"], ["href", "assets/icons/views.svg#views"], ["matTooltip", "Highlight object", 1, "object-select", "btn-blank", 3, "click"], ["href", "assets/icons/cursor.svg#cursor"], [1, "emptyBox"]], template: function CollectionsInfoOverlayComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1114
|
+
i0.ɵɵelementStart(0, "app-overlay", 0);
|
|
1115
|
+
i0.ɵɵtemplate(1, CollectionsInfoOverlayComponent_div_1_Template, 5, 3, "div", 1);
|
|
1116
|
+
i0.ɵɵelementEnd();
|
|
1117
|
+
} if (rf & 2) {
|
|
1118
|
+
i0.ɵɵproperty("resizable", true)("active", ctx.showObjectsInfo);
|
|
1119
|
+
i0.ɵɵadvance();
|
|
1120
|
+
i0.ɵɵproperty("ngIf", ctx.showObjectsInfo);
|
|
1121
|
+
} }, dependencies: [i2.NgClass, i2.NgForOf, i2.NgIf, i3$1.MatTooltip, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, i5.MatCheckbox, OverlayComponent], styles: [".collectionsInfo[_ngcontent-%COMP%]{height:95%}.collectionsInfo[_ngcontent-%COMP%] .collectionSelector[_ngcontent-%COMP%]{height:15%;min-height:2rem}.collectionsInfo[_ngcontent-%COMP%] .collectionSelector[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--phoenix-text-color-secondary);margin-right:1rem}.collectionsInfo[_ngcontent-%COMP%] .collectionSelector[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-left:1rem}.boxBody[_ngcontent-%COMP%]{height:85%;overflow:scroll}.boxBody[_ngcontent-%COMP%] p.emptyBox[_ngcontent-%COMP%]{max-width:21em}.boxBody[_ngcontent-%COMP%] .add-label[_ngcontent-%COMP%]{min-width:8rem}.boxBody[_ngcontent-%COMP%] .add-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding:.1rem .3rem;font-size:.75rem}#collectionTable[_ngcontent-%COMP%]{position:relative;color:var(--phoenix-text-color-secondary)}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:sticky;top:0;z-index:100;background:var(--phoenix-background-color-secondary)}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .head-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .head-wrapper[_ngcontent-%COMP%] .sort-options[_ngcontent-%COMP%]{display:flex;flex-direction:row}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .head-wrapper[_ngcontent-%COMP%] .sort-options[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{display:flex;width:1rem;height:1rem;padding:.2rem}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .head-wrapper[_ngcontent-%COMP%] .sort-options[_ngcontent-%COMP%] .icon-wrapper.up[_ngcontent-%COMP%]{transform:rotate(180deg)}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .head-wrapper[_ngcontent-%COMP%] .sort-options[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%}#collectionTable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{padding-right:1.2rem}#collectionTable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] *[_ngcontent-%COMP%]:last-child{padding-right:0}#collectionTable[_ngcontent-%COMP%] tr.is-cut[_ngcontent-%COMP%]{opacity:.5}#collectionTable[_ngcontent-%COMP%] tr.active-object[_ngcontent-%COMP%]{color:var(--phoenix-background-color);background:var(--phoenix-text-color);box-shadow:0 0 15px var(--phoenix-text-color)}#collectionTable[_ngcontent-%COMP%] tr.active-object[_ngcontent-%COMP%] div.icon-wrapper[_ngcontent-%COMP%]{--phoenix-options-icon-path: var(--phoenix-background-color);--phoenix-options-icon-bg: var(--phoenix-text-color-hover)}#collectionTable[_ngcontent-%COMP%] tr.active-object[_ngcontent-%COMP%] .add-label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{--phoenix-text-color: var(--phoenix-background-color);--phoenix-background-color-tertiary: var( --phoenix-text-color-secondary );--phoenix-border: var(--phoenix-background-color)}#collectionTable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .object-select[_ngcontent-%COMP%]{position:relative;width:1.6rem;height:1.6rem;margin-right:.4em;text-align:center;background-color:var(--phoenix-options-icon-bg);border-radius:10px;cursor:pointer}#collectionTable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .object-select[_ngcontent-%COMP%]:last-child{margin-right:0}#collectionTable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .object-select[_ngcontent-%COMP%]:hover{border:1px solid var(--phoenix-options-icon-path)}#collectionTable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .object-select[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;padding:.4rem;width:100%;height:100%;vertical-align:top}.eventSelector[_ngcontent-%COMP%]{display:flex}.eventSelector[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:none;color:var(--phoenix-text-color-secondary)}.eventSelector[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:9rem;padding:5px 10px;font-size:12px;border:1px solid rgba(88,88,88,.08);box-shadow:var(--phoenix-icon-shadow);background-color:var(--phoenix-background-color-tertiary);color:var(--phoenix-text-color-secondary)}"] });
|
|
1122
|
+
}
|
|
1123
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionsInfoOverlayComponent, [{
|
|
1124
|
+
type: Component,
|
|
1125
|
+
args: [{ selector: 'app-collections-info-overlay', template: "<!-- Show objects -->\n<app-overlay\n overlayTitle=\"Collections Info\"\n icon=\"info\"\n [resizable]=\"true\"\n [active]=\"showObjectsInfo\"\n>\n <!-- Using ngIf to remove it from DOM since this panel requires heavy computing -->\n <div *ngIf=\"showObjectsInfo\" class=\"collectionsInfo m-2\">\n <div\n class=\"collectionSelector mb-2 d-flex align-items-center\"\n *ngIf=\"collections != null\"\n >\n <div class=\"d-flex align-items-center\">\n <span>Choose a collection: </span>\n <div class=\"eventSelector\">\n <label for=\"event\">Event</label>\n <select\n id=\"collection\"\n name=\"collection\"\n (change)=\"changeCollection($event.target.value)\"\n >\n <option value=\"\" selected disabled hidden>Choose Collection</option>\n <option *ngFor=\"let collection of collections\" [value]=\"collection\">\n {{ collection }}\n </option>\n </select>\n </div>\n <mat-checkbox\n *ngIf=\"showingCollection\"\n (change)=\"toggleInvisible($event.checked)\"\n >\n Hide Invisible Objects\n </mat-checkbox>\n </div>\n </div>\n\n <div class=\"boxBody table-responsive\">\n <table\n id=\"collectionTable\"\n class=\"table table-borderless table-sm\"\n *ngIf=\"showingCollection\"\n >\n <thead>\n <tr>\n <th>No.</th>\n <th>Selection</th>\n <th>Label</th>\n <th *ngFor=\"let column of collectionColumns\">\n <div class=\"head-wrapper\">\n <div>\n {{ getPrettySymbol(column) }}\n </div>\n <div class=\"sort-options\">\n <button\n class=\"icon-wrapper icon-button btn-blank up\"\n (click)=\"sort(column, 'dec')\"\n >\n <svg>\n <use href=\"assets/icons/expand.svg#expand\"></use>\n </svg>\n </button>\n <button\n class=\"icon-wrapper icon-button btn-blank\"\n (click)=\"sort(column, 'asc')\"\n >\n <svg>\n <use href=\"assets/icons/expand.svg#expand\"></use>\n </svg>\n </button>\n </div>\n </div>\n </th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let object of showingCollection; index as i\"\n [attr.id]=\"object.uuid\"\n [ngClass]=\"{\n 'active-object':\n activeObject && activeObject.value === object.uuid,\n 'is-cut': object.isCut,\n 'd-none': object.isCut && hideInvisible\n }\"\n >\n <td>#{{ i }}</td>\n <td>\n <div\n *ngIf=\"object.uuid\"\n class=\"row justify-content-center icon-wrapper\"\n >\n <button\n class=\"object-select btn-blank\"\n matTooltip=\"Move camera to object\"\n (click)=\"lookAtObject(object.uuid)\"\n >\n <svg>\n <use href=\"assets/icons/views.svg#views\"></use>\n </svg>\n </button>\n <button\n class=\"object-select btn-blank\"\n matTooltip=\"Highlight object\"\n (click)=\"highlightObject(object.uuid)\"\n >\n <svg>\n <use href=\"assets/icons/cursor.svg#cursor\"></use>\n </svg>\n </button>\n </div>\n </td>\n <td>\n <div class=\"row m-0 add-label\">\n <div class=\"col-10 p-0\">\n <input\n class=\"form-control form-control-sm\"\n type=\"text\"\n [id]=\"'label' + i\"\n />\n </div>\n <div class=\"col-2 p-0 pl-2 text-center icon-wrapper\">\n <button\n class=\"object-select btn-blank\"\n matTooltip=\"Add, update or remove object label\"\n (click)=\"addLabel(i, object.uuid)\"\n >\n <svg>\n <use href=\"assets/icons/update.svg#update\"></use>\n </svg>\n </button>\n </div>\n </div>\n </td>\n <td *ngFor=\"let column of collectionColumns\">\n {{ object[column] }}\n </td>\n </tr>\n </tbody>\n </table>\n <p class=\"emptyBox\" *ngIf=\"!collections\">\n Load event data to be able to display information about the collections\n here.\n </p>\n </div>\n </div>\n</app-overlay>\n", styles: [".collectionsInfo{height:95%}.collectionsInfo .collectionSelector{height:15%;min-height:2rem}.collectionsInfo .collectionSelector span{color:var(--phoenix-text-color-secondary);margin-right:1rem}.collectionsInfo .collectionSelector mat-checkbox{margin-left:1rem}.boxBody{height:85%;overflow:scroll}.boxBody p.emptyBox{max-width:21em}.boxBody .add-label{min-width:8rem}.boxBody .add-label input{padding:.1rem .3rem;font-size:.75rem}#collectionTable{position:relative;color:var(--phoenix-text-color-secondary)}#collectionTable thead tr th{position:sticky;top:0;z-index:100;background:var(--phoenix-background-color-secondary)}#collectionTable thead tr th .head-wrapper{display:flex;align-items:center}#collectionTable thead tr th .head-wrapper .sort-options{display:flex;flex-direction:row}#collectionTable thead tr th .head-wrapper .sort-options .icon-wrapper{display:flex;width:1rem;height:1rem;padding:.2rem}#collectionTable thead tr th .head-wrapper .sort-options .icon-wrapper.up{transform:rotate(180deg)}#collectionTable thead tr th .head-wrapper .sort-options .icon-wrapper svg{width:100%;height:100%}#collectionTable tr *{padding-right:1.2rem}#collectionTable tr *:last-child{padding-right:0}#collectionTable tr.is-cut{opacity:.5}#collectionTable tr.active-object{color:var(--phoenix-background-color);background:var(--phoenix-text-color);box-shadow:0 0 15px var(--phoenix-text-color)}#collectionTable tr.active-object div.icon-wrapper{--phoenix-options-icon-path: var(--phoenix-background-color);--phoenix-options-icon-bg: var(--phoenix-text-color-hover)}#collectionTable tr.active-object .add-label input{--phoenix-text-color: var(--phoenix-background-color);--phoenix-background-color-tertiary: var( --phoenix-text-color-secondary );--phoenix-border: var(--phoenix-background-color)}#collectionTable td .object-select{position:relative;width:1.6rem;height:1.6rem;margin-right:.4em;text-align:center;background-color:var(--phoenix-options-icon-bg);border-radius:10px;cursor:pointer}#collectionTable td .object-select:last-child{margin-right:0}#collectionTable td .object-select:hover{border:1px solid var(--phoenix-options-icon-path)}#collectionTable td .object-select svg{position:absolute;top:0;left:0;padding:.4rem;width:100%;height:100%;vertical-align:top}.eventSelector{display:flex}.eventSelector label{display:none;color:var(--phoenix-text-color-secondary)}.eventSelector select{width:9rem;padding:5px 10px;font-size:12px;border:1px solid rgba(88,88,88,.08);box-shadow:var(--phoenix-icon-shadow);background-color:var(--phoenix-background-color-tertiary);color:var(--phoenix-text-color-secondary)}\n"] }]
|
|
1126
|
+
}], () => [{ type: i0.ElementRef }, { type: EventDisplayService }], { showObjectsInfo: [{
|
|
1127
|
+
type: Input
|
|
1128
|
+
}] }); })();
|
|
1129
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CollectionsInfoOverlayComponent, { className: "CollectionsInfoOverlayComponent", filePath: "components/ui-menu/collections-info/collections-info-overlay/collections-info-overlay.component.ts", lineNumber: 14 }); })();
|
|
1130
|
+
|
|
1131
|
+
class CollectionsInfoComponent {
|
|
1132
|
+
overlay;
|
|
1133
|
+
showObjectsInfo = false;
|
|
1134
|
+
overlayWindow;
|
|
1135
|
+
constructor(overlay) {
|
|
1136
|
+
this.overlay = overlay;
|
|
1137
|
+
}
|
|
1138
|
+
ngOnInit() {
|
|
1139
|
+
const overlayRef = this.overlay.create();
|
|
1140
|
+
const overlayPortal = new ComponentPortal(CollectionsInfoOverlayComponent);
|
|
1141
|
+
this.overlayWindow = overlayRef.attach(overlayPortal);
|
|
1142
|
+
this.overlayWindow.instance.showObjectsInfo = this.showObjectsInfo;
|
|
1143
|
+
}
|
|
1144
|
+
ngOnDestroy() {
|
|
1145
|
+
this.overlayWindow.destroy();
|
|
1146
|
+
}
|
|
1147
|
+
toggleOverlay() {
|
|
1148
|
+
this.showObjectsInfo = !this.showObjectsInfo;
|
|
1149
|
+
this.overlayWindow.instance.showObjectsInfo = this.showObjectsInfo;
|
|
1150
|
+
this.showObjectsInfo
|
|
1151
|
+
? this.overlayWindow.instance.enableHighlighting()
|
|
1152
|
+
: this.overlayWindow.instance.disableHighlighting();
|
|
1153
|
+
}
|
|
1154
|
+
static ɵfac = function CollectionsInfoComponent_Factory(t) { return new (t || CollectionsInfoComponent)(i0.ɵɵdirectiveInject(i1$1.Overlay)); };
|
|
1155
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CollectionsInfoComponent, selectors: [["app-collections-info"]], decls: 1, vars: 1, consts: [["tooltip", "Event data collections info", "icon", "info", 3, "click", "active"]], template: function CollectionsInfoComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1156
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
1157
|
+
i0.ɵɵlistener("click", function CollectionsInfoComponent_Template_app_menu_toggle_click_0_listener() { return ctx.toggleOverlay(); });
|
|
1158
|
+
i0.ɵɵelementEnd();
|
|
1159
|
+
} if (rf & 2) {
|
|
1160
|
+
i0.ɵɵproperty("active", ctx.showObjectsInfo);
|
|
1161
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
1162
|
+
}
|
|
1163
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CollectionsInfoComponent, [{
|
|
1164
|
+
type: Component,
|
|
1165
|
+
args: [{ selector: 'app-collections-info', template: "<app-menu-toggle\n tooltip=\"Event data collections info\"\n icon=\"info\"\n [active]=\"showObjectsInfo\"\n (click)=\"toggleOverlay()\"\n>\n</app-menu-toggle>\n" }]
|
|
1166
|
+
}], () => [{ type: i1$1.Overlay }], null); })();
|
|
1167
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CollectionsInfoComponent, { className: "CollectionsInfoComponent", filePath: "components/ui-menu/collections-info/collections-info.component.ts", lineNumber: 11 }); })();
|
|
1168
|
+
|
|
1169
|
+
const _c0$7 = a0 => ({ "active-object": a0 });
|
|
1170
|
+
function GeometryBrowserOverlayComponent_div_1_div_1_option_8_Template(rf, ctx) { if (rf & 1) {
|
|
1171
|
+
i0.ɵɵelementStart(0, "option", 13);
|
|
1172
|
+
i0.ɵɵtext(1);
|
|
1173
|
+
i0.ɵɵelementEnd();
|
|
1174
|
+
} if (rf & 2) {
|
|
1175
|
+
const child_r3 = ctx.$implicit;
|
|
1176
|
+
i0.ɵɵproperty("value", child_r3.name);
|
|
1177
|
+
i0.ɵɵadvance();
|
|
1178
|
+
i0.ɵɵtextInterpolate1(" ", child_r3.name, " ");
|
|
1179
|
+
} }
|
|
1180
|
+
function GeometryBrowserOverlayComponent_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1181
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
1182
|
+
i0.ɵɵelementStart(0, "div", 7)(1, "div", 8)(2, "span");
|
|
1183
|
+
i0.ɵɵtext(3, "Choose a collection: ");
|
|
1184
|
+
i0.ɵɵelementEnd();
|
|
1185
|
+
i0.ɵɵelementStart(4, "div", 9)(5, "select", 10);
|
|
1186
|
+
i0.ɵɵlistener("change", function GeometryBrowserOverlayComponent_div_1_div_1_Template_select_change_5_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r1.changeCollection($event.target.value)); });
|
|
1187
|
+
i0.ɵɵelementStart(6, "option", 11);
|
|
1188
|
+
i0.ɵɵtext(7, "Choose Collection");
|
|
1189
|
+
i0.ɵɵelementEnd();
|
|
1190
|
+
i0.ɵɵtemplate(8, GeometryBrowserOverlayComponent_div_1_div_1_option_8_Template, 2, 2, "option", 12);
|
|
1191
|
+
i0.ɵɵelementEnd()()()();
|
|
1192
|
+
} if (rf & 2) {
|
|
1193
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
1194
|
+
i0.ɵɵadvance(8);
|
|
1195
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.children);
|
|
1196
|
+
} }
|
|
1197
|
+
function GeometryBrowserOverlayComponent_div_1_table_3_tr_8_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
1198
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
1199
|
+
i0.ɵɵelementStart(0, "div", 18)(1, "button", 19);
|
|
1200
|
+
i0.ɵɵlistener("click", function GeometryBrowserOverlayComponent_div_1_table_3_tr_8_div_4_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r4); const object_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.lookAtObject(object_r5.uuid)); });
|
|
1201
|
+
i0.ɵɵnamespaceSVG();
|
|
1202
|
+
i0.ɵɵelementStart(2, "svg");
|
|
1203
|
+
i0.ɵɵelement(3, "use", 20);
|
|
1204
|
+
i0.ɵɵelementEnd()();
|
|
1205
|
+
i0.ɵɵnamespaceHTML();
|
|
1206
|
+
i0.ɵɵelementStart(4, "button", 21);
|
|
1207
|
+
i0.ɵɵlistener("click", function GeometryBrowserOverlayComponent_div_1_table_3_tr_8_div_4_Template_button_click_4_listener() { i0.ɵɵrestoreView(_r4); const object_r5 = i0.ɵɵnextContext().$implicit; const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.highlightObject(object_r5.uuid)); });
|
|
1208
|
+
i0.ɵɵnamespaceSVG();
|
|
1209
|
+
i0.ɵɵelementStart(5, "svg");
|
|
1210
|
+
i0.ɵɵelement(6, "use", 22);
|
|
1211
|
+
i0.ɵɵelementEnd()()();
|
|
1212
|
+
} }
|
|
1213
|
+
function GeometryBrowserOverlayComponent_div_1_table_3_tr_8_Template(rf, ctx) { if (rf & 1) {
|
|
1214
|
+
i0.ɵɵelementStart(0, "tr", 16)(1, "td");
|
|
1215
|
+
i0.ɵɵtext(2);
|
|
1216
|
+
i0.ɵɵelementEnd();
|
|
1217
|
+
i0.ɵɵelementStart(3, "td");
|
|
1218
|
+
i0.ɵɵtemplate(4, GeometryBrowserOverlayComponent_div_1_table_3_tr_8_div_4_Template, 7, 0, "div", 17);
|
|
1219
|
+
i0.ɵɵelementEnd()();
|
|
1220
|
+
} if (rf & 2) {
|
|
1221
|
+
const object_r5 = ctx.$implicit;
|
|
1222
|
+
const i_r6 = ctx.index;
|
|
1223
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
1224
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(4, _c0$7, ctx_r1.activeObject && ctx_r1.activeObject.value === object_r5.uuid));
|
|
1225
|
+
i0.ɵɵattribute("id", object_r5.uuid);
|
|
1226
|
+
i0.ɵɵadvance(2);
|
|
1227
|
+
i0.ɵɵtextInterpolate1("#", i_r6, "");
|
|
1228
|
+
i0.ɵɵadvance(2);
|
|
1229
|
+
i0.ɵɵproperty("ngIf", object_r5.uuid);
|
|
1230
|
+
} }
|
|
1231
|
+
function GeometryBrowserOverlayComponent_div_1_table_3_Template(rf, ctx) { if (rf & 1) {
|
|
1232
|
+
i0.ɵɵelementStart(0, "table", 14)(1, "thead")(2, "tr")(3, "th");
|
|
1233
|
+
i0.ɵɵtext(4, "No.");
|
|
1234
|
+
i0.ɵɵelementEnd();
|
|
1235
|
+
i0.ɵɵelementStart(5, "th");
|
|
1236
|
+
i0.ɵɵtext(6, "Selection");
|
|
1237
|
+
i0.ɵɵelementEnd()()();
|
|
1238
|
+
i0.ɵɵelementStart(7, "tbody");
|
|
1239
|
+
i0.ɵɵtemplate(8, GeometryBrowserOverlayComponent_div_1_table_3_tr_8_Template, 5, 6, "tr", 15);
|
|
1240
|
+
i0.ɵɵelementEnd()();
|
|
1241
|
+
} if (rf & 2) {
|
|
1242
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
1243
|
+
i0.ɵɵadvance(8);
|
|
1244
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.showingCollection);
|
|
1245
|
+
} }
|
|
1246
|
+
function GeometryBrowserOverlayComponent_div_1_p_4_Template(rf, ctx) { if (rf & 1) {
|
|
1247
|
+
i0.ɵɵelementStart(0, "p", 23);
|
|
1248
|
+
i0.ɵɵtext(1, " Load event data to be able to display information about the collections here. ");
|
|
1249
|
+
i0.ɵɵelementEnd();
|
|
1250
|
+
} }
|
|
1251
|
+
function GeometryBrowserOverlayComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
1252
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
1253
|
+
i0.ɵɵtemplate(1, GeometryBrowserOverlayComponent_div_1_div_1_Template, 9, 1, "div", 3);
|
|
1254
|
+
i0.ɵɵelementStart(2, "div", 4);
|
|
1255
|
+
i0.ɵɵtemplate(3, GeometryBrowserOverlayComponent_div_1_table_3_Template, 9, 1, "table", 5)(4, GeometryBrowserOverlayComponent_div_1_p_4_Template, 2, 0, "p", 6);
|
|
1256
|
+
i0.ɵɵelementEnd()();
|
|
1257
|
+
} if (rf & 2) {
|
|
1258
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
1259
|
+
i0.ɵɵadvance();
|
|
1260
|
+
i0.ɵɵproperty("ngIf", ctx_r1.children != null);
|
|
1261
|
+
i0.ɵɵadvance(2);
|
|
1262
|
+
i0.ɵɵproperty("ngIf", ctx_r1.showingCollection);
|
|
1263
|
+
i0.ɵɵadvance();
|
|
1264
|
+
i0.ɵɵproperty("ngIf", !ctx_r1.children);
|
|
1265
|
+
} }
|
|
1266
|
+
class GeometryBrowserOverlayComponent {
|
|
1267
|
+
eventDisplay;
|
|
1268
|
+
browseDetectorParts;
|
|
1269
|
+
selectedCollection;
|
|
1270
|
+
showingCollection;
|
|
1271
|
+
activeObject;
|
|
1272
|
+
children;
|
|
1273
|
+
constructor(eventDisplay) {
|
|
1274
|
+
this.eventDisplay = eventDisplay;
|
|
1275
|
+
}
|
|
1276
|
+
ngOnInit() {
|
|
1277
|
+
this.children = this.eventDisplay
|
|
1278
|
+
.getThreeManager()
|
|
1279
|
+
.getSceneManager()
|
|
1280
|
+
.getGeometries().children;
|
|
1281
|
+
this.activeObject = this.eventDisplay.getActiveObjectId();
|
|
1282
|
+
this.activeObject.onUpdate((value) => {
|
|
1283
|
+
if (document.getElementById(value)) {
|
|
1284
|
+
document.getElementById(value).scrollIntoView(false);
|
|
1285
|
+
}
|
|
1286
|
+
});
|
|
1287
|
+
}
|
|
1288
|
+
changeCollection(selectedCollection) {
|
|
1289
|
+
this.selectedCollection = selectedCollection;
|
|
1290
|
+
for (const child of this.children) {
|
|
1291
|
+
if (child.name === this.selectedCollection) {
|
|
1292
|
+
this.showingCollection = child.children;
|
|
1293
|
+
break;
|
|
1294
|
+
}
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
lookAtObject(uuid) {
|
|
1298
|
+
if (uuid) {
|
|
1299
|
+
this.activeObject.update(uuid);
|
|
1300
|
+
this.eventDisplay.lookAtObject(uuid, true);
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
highlightObject(uuid) {
|
|
1304
|
+
if (uuid) {
|
|
1305
|
+
this.activeObject.update(uuid);
|
|
1306
|
+
this.eventDisplay.highlightObject(uuid, true);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
enableHighlighting() {
|
|
1310
|
+
this.eventDisplay.enableHighlighting();
|
|
1311
|
+
}
|
|
1312
|
+
disableHighlighting() {
|
|
1313
|
+
this.eventDisplay.disableHighlighting();
|
|
1314
|
+
}
|
|
1315
|
+
static ɵfac = function GeometryBrowserOverlayComponent_Factory(t) { return new (t || GeometryBrowserOverlayComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
1316
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GeometryBrowserOverlayComponent, selectors: [["app-geometry-browser-overlay"]], inputs: { browseDetectorParts: "browseDetectorParts" }, decls: 2, vars: 3, consts: [["overlayTitle", "Browse Display", "icon", "info", 3, "resizable", "active"], ["class", "collectionsInfo m-2", 4, "ngIf"], [1, "collectionsInfo", "m-2"], ["class", "collectionSelector mb-2 d-flex align-items-center", 4, "ngIf"], [1, "boxBody", "table-responsive"], ["id", "collectionTable", "class", "table table-borderless table-sm", 4, "ngIf"], ["class", "emptyBox", 4, "ngIf"], [1, "collectionSelector", "mb-2", "d-flex", "align-items-center"], [1, "d-flex", "align-items-center"], [1, "eventSelector"], ["id", "detectorCollection", "name", "detectorCollection", 3, "change"], ["value", "", "selected", "", "disabled", "", "hidden", ""], [3, "value", 4, "ngFor", "ngForOf"], [3, "value"], ["id", "collectionTable", 1, "table", "table-borderless", "table-sm"], [3, "ngClass", 4, "ngFor", "ngForOf"], [3, "ngClass"], ["class", "row justify-content-center icon-wrapper", 4, "ngIf"], [1, "row", "justify-content-center", "icon-wrapper"], ["matTooltip", "Move camera to object", 1, "object-select", "btn-blank", 3, "click"], ["href", "assets/icons/views.svg#views"], ["matTooltip", "Highlight object", 1, "object-select", "btn-blank", 3, "click"], ["href", "assets/icons/cursor.svg#cursor"], [1, "emptyBox"]], template: function GeometryBrowserOverlayComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1317
|
+
i0.ɵɵelementStart(0, "app-overlay", 0);
|
|
1318
|
+
i0.ɵɵtemplate(1, GeometryBrowserOverlayComponent_div_1_Template, 5, 3, "div", 1);
|
|
1319
|
+
i0.ɵɵelementEnd();
|
|
1320
|
+
} if (rf & 2) {
|
|
1321
|
+
i0.ɵɵproperty("resizable", true)("active", ctx.browseDetectorParts);
|
|
1322
|
+
i0.ɵɵadvance();
|
|
1323
|
+
i0.ɵɵproperty("ngIf", ctx.browseDetectorParts);
|
|
1324
|
+
} }, dependencies: [i2.NgClass, i2.NgForOf, i2.NgIf, i3$1.MatTooltip, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, OverlayComponent], styles: [".collectionsInfo[_ngcontent-%COMP%]{height:95%}.collectionsInfo[_ngcontent-%COMP%] .collectionSelector[_ngcontent-%COMP%]{height:15%;min-height:2rem}.collectionsInfo[_ngcontent-%COMP%] .collectionSelector[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{color:var(--phoenix-text-color-secondary);margin-right:1rem}.boxBody[_ngcontent-%COMP%]{height:85%;overflow:scroll}.boxBody[_ngcontent-%COMP%] p.emptyBox[_ngcontent-%COMP%]{max-width:21em}#collectionTable[_ngcontent-%COMP%]{position:relative;color:var(--phoenix-text-color-secondary)}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{position:sticky;top:0;z-index:100;background:var(--phoenix-background-color-secondary)}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .row[_ngcontent-%COMP%]{margin-right:10px;margin-left:-92px}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%]{display:flex;width:1rem;height:1rem;padding:.2rem}#collectionTable[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%] .icon-wrapper[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%}#collectionTable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] *[_ngcontent-%COMP%]{padding-right:1.2rem}#collectionTable[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] *[_ngcontent-%COMP%]:last-child{padding-right:0}#collectionTable[_ngcontent-%COMP%] tr.active-object[_ngcontent-%COMP%]{color:var(--phoenix-background-color);background:var(--phoenix-text-color);box-shadow:0 0 15px var(--phoenix-text-color)}#collectionTable[_ngcontent-%COMP%] tr.active-object[_ngcontent-%COMP%] div.icon-wrapper[_ngcontent-%COMP%]{--phoenix-options-icon-path: var(--phoenix-background-color);--phoenix-options-icon-bg: var(--phoenix-text-color-hover)}#collectionTable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .object-select[_ngcontent-%COMP%]{position:relative;width:1.6rem;height:1.6rem;margin-right:.4em;text-align:center;background-color:var(--phoenix-options-icon-bg);border-radius:10px;cursor:pointer}#collectionTable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .object-select[_ngcontent-%COMP%]:last-child{margin-right:0}#collectionTable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .object-select[_ngcontent-%COMP%]:hover{border:1px solid var(--phoenix-options-icon-path)}#collectionTable[_ngcontent-%COMP%] td[_ngcontent-%COMP%] .object-select[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{position:absolute;top:0;left:0;padding:.4rem;width:100%;height:100%;vertical-align:top}.eventSelector[_ngcontent-%COMP%]{display:flex}.eventSelector[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:none;color:var(--phoenix-text-color-secondary)}.eventSelector[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:9rem;padding:5px 10px;font-size:12px;border:1px solid rgba(88,88,88,.08);box-shadow:var(--phoenix-icon-shadow);background-color:var(--phoenix-background-color-tertiary);color:var(--phoenix-text-color-secondary)}"] });
|
|
1325
|
+
}
|
|
1326
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GeometryBrowserOverlayComponent, [{
|
|
1327
|
+
type: Component,
|
|
1328
|
+
args: [{ selector: 'app-geometry-browser-overlay', template: "<!-- Show objects -->\n<app-overlay\n overlayTitle=\"Browse Display\"\n icon=\"info\"\n [resizable]=\"true\"\n [active]=\"browseDetectorParts\"\n>\n <!-- Using ngIf to remove it from DOM since this panel requires heavy computing -->\n <div *ngIf=\"browseDetectorParts\" class=\"collectionsInfo m-2\">\n <div\n class=\"collectionSelector mb-2 d-flex align-items-center\"\n *ngIf=\"children != null\"\n >\n <div class=\"d-flex align-items-center\">\n <span>Choose a collection: </span>\n <div class=\"eventSelector\">\n <select\n id=\"detectorCollection\"\n name=\"detectorCollection\"\n (change)=\"changeCollection($event.target.value)\"\n >\n <option value=\"\" selected disabled hidden>Choose Collection</option>\n <option *ngFor=\"let child of children\" [value]=\"child.name\">\n {{ child.name }}\n </option>\n </select>\n </div>\n </div>\n </div>\n\n <div class=\"boxBody table-responsive\">\n <table\n id=\"collectionTable\"\n class=\"table table-borderless table-sm\"\n *ngIf=\"showingCollection\"\n >\n <thead>\n <tr>\n <th>No.</th>\n <th>Selection</th>\n </tr>\n </thead>\n <tbody>\n <tr\n *ngFor=\"let object of showingCollection; index as i\"\n [attr.id]=\"object.uuid\"\n [ngClass]=\"{\n 'active-object':\n activeObject && activeObject.value === object.uuid\n }\"\n >\n <td>#{{ i }}</td>\n <td>\n <div\n *ngIf=\"object.uuid\"\n class=\"row justify-content-center icon-wrapper\"\n >\n <button\n class=\"object-select btn-blank\"\n matTooltip=\"Move camera to object\"\n (click)=\"lookAtObject(object.uuid)\"\n >\n <svg>\n <use href=\"assets/icons/views.svg#views\"></use>\n </svg>\n </button>\n <button\n class=\"object-select btn-blank\"\n matTooltip=\"Highlight object\"\n (click)=\"highlightObject(object.uuid)\"\n >\n <svg>\n <use href=\"assets/icons/cursor.svg#cursor\"></use>\n </svg>\n </button>\n </div>\n </td>\n </tr>\n </tbody>\n </table>\n <p class=\"emptyBox\" *ngIf=\"!children\">\n Load event data to be able to display information about the collections\n here.\n </p>\n </div>\n </div>\n</app-overlay>\n", styles: [".collectionsInfo{height:95%}.collectionsInfo .collectionSelector{height:15%;min-height:2rem}.collectionsInfo .collectionSelector span{color:var(--phoenix-text-color-secondary);margin-right:1rem}.boxBody{height:85%;overflow:scroll}.boxBody p.emptyBox{max-width:21em}#collectionTable{position:relative;color:var(--phoenix-text-color-secondary)}#collectionTable thead tr th{position:sticky;top:0;z-index:100;background:var(--phoenix-background-color-secondary)}#collectionTable thead tr th .row{margin-right:10px;margin-left:-92px}#collectionTable thead tr th .icon-wrapper{display:flex;width:1rem;height:1rem;padding:.2rem}#collectionTable thead tr th .icon-wrapper svg{width:100%;height:100%}#collectionTable tr *{padding-right:1.2rem}#collectionTable tr *:last-child{padding-right:0}#collectionTable tr.active-object{color:var(--phoenix-background-color);background:var(--phoenix-text-color);box-shadow:0 0 15px var(--phoenix-text-color)}#collectionTable tr.active-object div.icon-wrapper{--phoenix-options-icon-path: var(--phoenix-background-color);--phoenix-options-icon-bg: var(--phoenix-text-color-hover)}#collectionTable td .object-select{position:relative;width:1.6rem;height:1.6rem;margin-right:.4em;text-align:center;background-color:var(--phoenix-options-icon-bg);border-radius:10px;cursor:pointer}#collectionTable td .object-select:last-child{margin-right:0}#collectionTable td .object-select:hover{border:1px solid var(--phoenix-options-icon-path)}#collectionTable td .object-select svg{position:absolute;top:0;left:0;padding:.4rem;width:100%;height:100%;vertical-align:top}.eventSelector{display:flex}.eventSelector label{display:none;color:var(--phoenix-text-color-secondary)}.eventSelector select{width:9rem;padding:5px 10px;font-size:12px;border:1px solid rgba(88,88,88,.08);box-shadow:var(--phoenix-icon-shadow);background-color:var(--phoenix-background-color-tertiary);color:var(--phoenix-text-color-secondary)}\n"] }]
|
|
1329
|
+
}], () => [{ type: EventDisplayService }], { browseDetectorParts: [{
|
|
1330
|
+
type: Input
|
|
1331
|
+
}] }); })();
|
|
1332
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GeometryBrowserOverlayComponent, { className: "GeometryBrowserOverlayComponent", filePath: "components/ui-menu/geometry-browser/geometry-browser-overlay/geometry-browser-overlay.component.ts", lineNumber: 11 }); })();
|
|
1333
|
+
|
|
1334
|
+
class GeometryBrowserComponent {
|
|
1335
|
+
overlay;
|
|
1336
|
+
browseDetectorParts = false;
|
|
1337
|
+
overlayWindow;
|
|
1338
|
+
constructor(overlay) {
|
|
1339
|
+
this.overlay = overlay;
|
|
1340
|
+
}
|
|
1341
|
+
ngOnInit() {
|
|
1342
|
+
const overlayRef = this.overlay.create();
|
|
1343
|
+
const overlayPortal = new ComponentPortal(GeometryBrowserOverlayComponent);
|
|
1344
|
+
this.overlayWindow = overlayRef.attach(overlayPortal);
|
|
1345
|
+
this.overlayWindow.instance.browseDetectorParts = this.browseDetectorParts;
|
|
1346
|
+
}
|
|
1347
|
+
ngOnDestroy() {
|
|
1348
|
+
this.overlayWindow.destroy();
|
|
1349
|
+
}
|
|
1350
|
+
toggleOverlay() {
|
|
1351
|
+
this.browseDetectorParts = !this.browseDetectorParts;
|
|
1352
|
+
this.overlayWindow.instance.browseDetectorParts = this.browseDetectorParts;
|
|
1353
|
+
this.browseDetectorParts
|
|
1354
|
+
? this.overlayWindow.instance.enableHighlighting()
|
|
1355
|
+
: this.overlayWindow.instance.disableHighlighting();
|
|
1356
|
+
}
|
|
1357
|
+
static ɵfac = function GeometryBrowserComponent_Factory(t) { return new (t || GeometryBrowserComponent)(i0.ɵɵdirectiveInject(i1$1.Overlay)); };
|
|
1358
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GeometryBrowserComponent, selectors: [["app-geometry-browser"]], decls: 1, vars: 1, consts: [["tooltip", "Browse geometry", "icon", "info", 3, "click", "active"]], template: function GeometryBrowserComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1359
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
1360
|
+
i0.ɵɵlistener("click", function GeometryBrowserComponent_Template_app_menu_toggle_click_0_listener() { return ctx.toggleOverlay(); });
|
|
1361
|
+
i0.ɵɵelementEnd();
|
|
1362
|
+
} if (rf & 2) {
|
|
1363
|
+
i0.ɵɵproperty("active", ctx.browseDetectorParts);
|
|
1364
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
1365
|
+
}
|
|
1366
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GeometryBrowserComponent, [{
|
|
1367
|
+
type: Component,
|
|
1368
|
+
args: [{ selector: 'app-geometry-browser', template: "<app-menu-toggle\n tooltip=\"Browse geometry\"\n icon=\"info\"\n [active]=\"browseDetectorParts\"\n (click)=\"toggleOverlay()\"\n>\n</app-menu-toggle>\n" }]
|
|
1369
|
+
}], () => [{ type: i1$1.Overlay }], null); })();
|
|
1370
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(GeometryBrowserComponent, { className: "GeometryBrowserComponent", filePath: "components/ui-menu/geometry-browser/geometry-browser.component.ts", lineNumber: 11 }); })();
|
|
1371
|
+
|
|
1372
|
+
class DarkThemeComponent {
|
|
1373
|
+
eventDisplay;
|
|
1374
|
+
darkTheme = false;
|
|
1375
|
+
constructor(eventDisplay) {
|
|
1376
|
+
this.eventDisplay = eventDisplay;
|
|
1377
|
+
}
|
|
1378
|
+
ngOnInit() {
|
|
1379
|
+
this.darkTheme = this.eventDisplay.getUIManager().getDarkTheme();
|
|
1380
|
+
}
|
|
1381
|
+
setDarkTheme() {
|
|
1382
|
+
this.darkTheme = !this.darkTheme;
|
|
1383
|
+
this.eventDisplay.getUIManager().setDarkTheme(this.darkTheme);
|
|
1384
|
+
}
|
|
1385
|
+
static ɵfac = function DarkThemeComponent_Factory(t) { return new (t || DarkThemeComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
1386
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: DarkThemeComponent, selectors: [["app-dark-theme"]], decls: 1, vars: 1, consts: [["tooltip", "Dark theme", "icon", "dark", 3, "click", "active"]], template: function DarkThemeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1387
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
1388
|
+
i0.ɵɵlistener("click", function DarkThemeComponent_Template_app_menu_toggle_click_0_listener() { return ctx.setDarkTheme(); });
|
|
1389
|
+
i0.ɵɵelementEnd();
|
|
1390
|
+
} if (rf & 2) {
|
|
1391
|
+
i0.ɵɵproperty("active", ctx.darkTheme);
|
|
1392
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
1393
|
+
}
|
|
1394
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DarkThemeComponent, [{
|
|
1395
|
+
type: Component,
|
|
1396
|
+
args: [{ selector: 'app-dark-theme', template: "<app-menu-toggle\n tooltip=\"Dark theme\"\n [active]=\"darkTheme\"\n icon=\"dark\"\n (click)=\"setDarkTheme()\"\n>\n</app-menu-toggle>\n" }]
|
|
1397
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
1398
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(DarkThemeComponent, { className: "DarkThemeComponent", filePath: "components/ui-menu/dark-theme/dark-theme.component.ts", lineNumber: 9 }); })();
|
|
1399
|
+
|
|
1400
|
+
function EventSelectorComponent_div_0_option_2_Template(rf, ctx) { if (rf & 1) {
|
|
1401
|
+
i0.ɵɵelementStart(0, "option", 4);
|
|
1402
|
+
i0.ɵɵtext(1);
|
|
1403
|
+
i0.ɵɵelementEnd();
|
|
1404
|
+
} if (rf & 2) {
|
|
1405
|
+
const event_r3 = ctx.$implicit;
|
|
1406
|
+
i0.ɵɵproperty("value", event_r3);
|
|
1407
|
+
i0.ɵɵadvance();
|
|
1408
|
+
i0.ɵɵtextInterpolate1(" ", event_r3, " ");
|
|
1409
|
+
} }
|
|
1410
|
+
function EventSelectorComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
1411
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
1412
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "select", 2);
|
|
1413
|
+
i0.ɵɵlistener("change", function EventSelectorComponent_div_0_Template_select_change_1_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.changeEvent($event)); });
|
|
1414
|
+
i0.ɵɵtemplate(2, EventSelectorComponent_div_0_option_2_Template, 2, 2, "option", 3);
|
|
1415
|
+
i0.ɵɵelementEnd()();
|
|
1416
|
+
} if (rf & 2) {
|
|
1417
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
1418
|
+
i0.ɵɵadvance(2);
|
|
1419
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.events);
|
|
1420
|
+
} }
|
|
1421
|
+
class EventSelectorComponent {
|
|
1422
|
+
eventDisplay;
|
|
1423
|
+
// Array containing the keys of the multiple loaded events
|
|
1424
|
+
events;
|
|
1425
|
+
constructor(eventDisplay) {
|
|
1426
|
+
this.eventDisplay = eventDisplay;
|
|
1427
|
+
}
|
|
1428
|
+
ngOnInit() {
|
|
1429
|
+
this.eventDisplay.listenToLoadedEventsChange((events) => (this.events = events));
|
|
1430
|
+
}
|
|
1431
|
+
changeEvent(selected) {
|
|
1432
|
+
const value = selected.target.value;
|
|
1433
|
+
this.eventDisplay.loadEvent(value);
|
|
1434
|
+
}
|
|
1435
|
+
static ɵfac = function EventSelectorComponent_Factory(t) { return new (t || EventSelectorComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
1436
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventSelectorComponent, selectors: [["app-event-selector"]], decls: 1, vars: 1, consts: [["class", "eventSelector mx-2", "matTooltip", "Event selector", "matTooltipPosition", "above", 4, "ngIf"], ["matTooltip", "Event selector", "matTooltipPosition", "above", 1, "eventSelector", "mx-2"], ["name", "event", 3, "change"], [3, "value", 4, "ngFor", "ngForOf"], [3, "value"]], template: function EventSelectorComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1437
|
+
i0.ɵɵtemplate(0, EventSelectorComponent_div_0_Template, 3, 1, "div", 0);
|
|
1438
|
+
} if (rf & 2) {
|
|
1439
|
+
i0.ɵɵproperty("ngIf", ctx.events != null);
|
|
1440
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, i3$1.MatTooltip, i4.NgSelectOption, i4.ɵNgSelectMultipleOption], styles: [".eventSelector[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:9rem;padding:5px 10px;font-size:12px;border:1px solid rgba(88,88,88,.08);box-shadow:var(--phoenix-icon-shadow);background-color:var(--phoenix-background-color-tertiary);color:var(--phoenix-text-color-secondary)}"] });
|
|
1441
|
+
}
|
|
1442
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventSelectorComponent, [{
|
|
1443
|
+
type: Component,
|
|
1444
|
+
args: [{ selector: 'app-event-selector', template: "<div\n class=\"eventSelector mx-2\"\n *ngIf=\"events != null\"\n matTooltip=\"Event selector\"\n matTooltipPosition=\"above\"\n>\n <select name=\"event\" (change)=\"changeEvent($event)\">\n <option *ngFor=\"let event of events\" [value]=\"event\">\n {{ event }}\n </option>\n </select>\n</div>\n", styles: [".eventSelector select{width:9rem;padding:5px 10px;font-size:12px;border:1px solid rgba(88,88,88,.08);box-shadow:var(--phoenix-icon-shadow);background-color:var(--phoenix-background-color-tertiary);color:var(--phoenix-text-color-secondary)}\n"] }]
|
|
1445
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
1446
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventSelectorComponent, { className: "EventSelectorComponent", filePath: "components/ui-menu/event-selector/event-selector.component.ts", lineNumber: 9 }); })();
|
|
1447
|
+
|
|
1448
|
+
function ExperimentInfoComponent_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
1449
|
+
i0.ɵɵelementStart(0, "a", 5);
|
|
1450
|
+
i0.ɵɵelement(1, "img", 6);
|
|
1451
|
+
i0.ɵɵelementEnd();
|
|
1452
|
+
} if (rf & 2) {
|
|
1453
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
1454
|
+
i0.ɵɵproperty("href", ctx_r0.url, i0.ɵɵsanitizeUrl);
|
|
1455
|
+
i0.ɵɵadvance();
|
|
1456
|
+
i0.ɵɵproperty("src", ctx_r0.logo, i0.ɵɵsanitizeUrl);
|
|
1457
|
+
} }
|
|
1458
|
+
function ExperimentInfoComponent_p_3_Template(rf, ctx) { if (rf & 1) {
|
|
1459
|
+
i0.ɵɵelementStart(0, "p")(1, "b");
|
|
1460
|
+
i0.ɵɵtext(2);
|
|
1461
|
+
i0.ɵɵelementEnd()();
|
|
1462
|
+
} if (rf & 2) {
|
|
1463
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
1464
|
+
i0.ɵɵadvance(2);
|
|
1465
|
+
i0.ɵɵtextInterpolate(ctx_r0.tagline);
|
|
1466
|
+
} }
|
|
1467
|
+
function ExperimentInfoComponent_p_4_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
1468
|
+
i0.ɵɵelementContainerStart(0);
|
|
1469
|
+
i0.ɵɵelementStart(1, "b");
|
|
1470
|
+
i0.ɵɵtext(2);
|
|
1471
|
+
i0.ɵɵelementEnd();
|
|
1472
|
+
i0.ɵɵtext(3);
|
|
1473
|
+
i0.ɵɵelementContainerEnd();
|
|
1474
|
+
} if (rf & 2) {
|
|
1475
|
+
const infoField_r2 = i0.ɵɵnextContext().$implicit;
|
|
1476
|
+
i0.ɵɵadvance(2);
|
|
1477
|
+
i0.ɵɵtextInterpolate1("", infoField_r2.label, ": ");
|
|
1478
|
+
i0.ɵɵadvance();
|
|
1479
|
+
i0.ɵɵtextInterpolate1("", infoField_r2.value, " ");
|
|
1480
|
+
} }
|
|
1481
|
+
function ExperimentInfoComponent_p_4_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
1482
|
+
i0.ɵɵelementContainerStart(0);
|
|
1483
|
+
i0.ɵɵtext(1);
|
|
1484
|
+
i0.ɵɵelementContainerEnd();
|
|
1485
|
+
} if (rf & 2) {
|
|
1486
|
+
const infoField_r2 = i0.ɵɵnextContext().$implicit;
|
|
1487
|
+
i0.ɵɵadvance();
|
|
1488
|
+
i0.ɵɵtextInterpolate1(" ", infoField_r2, " ");
|
|
1489
|
+
} }
|
|
1490
|
+
function ExperimentInfoComponent_p_4_Template(rf, ctx) { if (rf & 1) {
|
|
1491
|
+
i0.ɵɵelementStart(0, "p");
|
|
1492
|
+
i0.ɵɵtemplate(1, ExperimentInfoComponent_p_4_ng_container_1_Template, 4, 2, "ng-container", 3)(2, ExperimentInfoComponent_p_4_ng_container_2_Template, 2, 1, "ng-container", 3);
|
|
1493
|
+
i0.ɵɵelementEnd();
|
|
1494
|
+
} if (rf & 2) {
|
|
1495
|
+
const infoField_r2 = ctx.$implicit;
|
|
1496
|
+
i0.ɵɵadvance();
|
|
1497
|
+
i0.ɵɵproperty("ngIf", infoField_r2.label);
|
|
1498
|
+
i0.ɵɵadvance();
|
|
1499
|
+
i0.ɵɵproperty("ngIf", !infoField_r2.label);
|
|
1500
|
+
} }
|
|
1501
|
+
class ExperimentInfoComponent {
|
|
1502
|
+
eventDisplay;
|
|
1503
|
+
experimentInfo;
|
|
1504
|
+
url;
|
|
1505
|
+
logo;
|
|
1506
|
+
tagline;
|
|
1507
|
+
constructor(eventDisplay) {
|
|
1508
|
+
this.eventDisplay = eventDisplay;
|
|
1509
|
+
}
|
|
1510
|
+
ngOnInit() {
|
|
1511
|
+
this.eventDisplay.listenToDisplayedEventChange(() => {
|
|
1512
|
+
this.experimentInfo = this.eventDisplay.getEventMetadata();
|
|
1513
|
+
});
|
|
1514
|
+
}
|
|
1515
|
+
static ɵfac = function ExperimentInfoComponent_Factory(t) { return new (t || ExperimentInfoComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
1516
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExperimentInfoComponent, selectors: [["app-experiment-info"]], inputs: { url: "url", logo: "logo", tagline: "tagline" }, decls: 5, vars: 3, consts: [["id", "experimentInfo", "cdkDrag", "", "cdkDragBoundary", "body", 1, "experimentInfo"], ["class", "experimentLogoWrapper", "target", "_blank", "rel", "noopener noreferrer", 3, "href", 4, "ngIf"], [1, "textInfo"], [4, "ngIf"], [4, "ngFor", "ngForOf"], ["target", "_blank", "rel", "noopener noreferrer", 1, "experimentLogoWrapper", 3, "href"], ["alt", "", 1, "experimentLogo", 3, "src"]], template: function ExperimentInfoComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1517
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
1518
|
+
i0.ɵɵtemplate(1, ExperimentInfoComponent_a_1_Template, 2, 2, "a", 1);
|
|
1519
|
+
i0.ɵɵelementStart(2, "div", 2);
|
|
1520
|
+
i0.ɵɵtemplate(3, ExperimentInfoComponent_p_3_Template, 3, 1, "p", 3)(4, ExperimentInfoComponent_p_4_Template, 3, 2, "p", 4);
|
|
1521
|
+
i0.ɵɵelementEnd()();
|
|
1522
|
+
} if (rf & 2) {
|
|
1523
|
+
i0.ɵɵadvance();
|
|
1524
|
+
i0.ɵɵproperty("ngIf", ctx.url);
|
|
1525
|
+
i0.ɵɵadvance(2);
|
|
1526
|
+
i0.ɵɵproperty("ngIf", ctx.tagline);
|
|
1527
|
+
i0.ɵɵadvance();
|
|
1528
|
+
i0.ɵɵproperty("ngForOf", ctx.experimentInfo);
|
|
1529
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, i2$2.CdkDrag], styles: [".experimentInfo[_ngcontent-%COMP%]{position:absolute;top:5rem;left:1rem;display:flex;flex-direction:row;justify-items:flex-end;justify-content:flex-end;align-items:center;align-content:center;font-family:Courier New,Lucida Console,monospace;cursor:move}.experimentLogoWrapper[_ngcontent-%COMP%]{width:6rem}.experimentLogoWrapper[_ngcontent-%COMP%] .experimentLogo[_ngcontent-%COMP%]{width:100%;height:100%}.textInfo[_ngcontent-%COMP%]{margin-left:1rem}.textInfo[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--phoenix-text-color-secondary);font-size:.8rem;margin-bottom:.5rem;-webkit-user-select:none;user-select:none}@media screen and (max-width: 768px){.experimentInfo[_ngcontent-%COMP%]{top:4rem;max-width:40%}.experimentLogoWrapper[_ngcontent-%COMP%]{height:4rem}.textInfo[_ngcontent-%COMP%]{display:none}}"] });
|
|
1530
|
+
}
|
|
1531
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExperimentInfoComponent, [{
|
|
1532
|
+
type: Component,
|
|
1533
|
+
args: [{ selector: 'app-experiment-info', template: "<div id=\"experimentInfo\" class=\"experimentInfo\" cdkDrag cdkDragBoundary=\"body\">\n <a\n class=\"experimentLogoWrapper\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n *ngIf=\"url\"\n [href]=\"url\"\n >\n <img class=\"experimentLogo\" [src]=\"logo\" alt=\"\" />\n </a>\n <div class=\"textInfo\">\n <p *ngIf=\"tagline\">\n <b>{{ tagline }}</b>\n </p>\n <p *ngFor=\"let infoField of experimentInfo\">\n <ng-container *ngIf=\"infoField.label\">\n <b>{{ infoField.label }}: </b>{{ infoField.value }}\n </ng-container>\n <ng-container *ngIf=\"!infoField.label\">\n {{ infoField }}\n </ng-container>\n </p>\n </div>\n</div>\n", styles: [".experimentInfo{position:absolute;top:5rem;left:1rem;display:flex;flex-direction:row;justify-items:flex-end;justify-content:flex-end;align-items:center;align-content:center;font-family:Courier New,Lucida Console,monospace;cursor:move}.experimentLogoWrapper{width:6rem}.experimentLogoWrapper .experimentLogo{width:100%;height:100%}.textInfo{margin-left:1rem}.textInfo p{color:var(--phoenix-text-color-secondary);font-size:.8rem;margin-bottom:.5rem;-webkit-user-select:none;user-select:none}@media screen and (max-width: 768px){.experimentInfo{top:4rem;max-width:40%}.experimentLogoWrapper{height:4rem}.textInfo{display:none}}\n"] }]
|
|
1534
|
+
}], () => [{ type: EventDisplayService }], { url: [{
|
|
1535
|
+
type: Input
|
|
1536
|
+
}], logo: [{
|
|
1537
|
+
type: Input
|
|
1538
|
+
}], tagline: [{
|
|
1539
|
+
type: Input
|
|
1540
|
+
}] }); })();
|
|
1541
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExperimentInfoComponent, { className: "ExperimentInfoComponent", filePath: "components/ui-menu/experiment-info/experiment-info.component.ts", lineNumber: 9 }); })();
|
|
1542
|
+
|
|
1543
|
+
function InfoPanelOverlayComponent_li_4_Template(rf, ctx) { if (rf & 1) {
|
|
1544
|
+
i0.ɵɵelementStart(0, "li", 2);
|
|
1545
|
+
i0.ɵɵtext(1, " No actions. ");
|
|
1546
|
+
i0.ɵɵelementEnd();
|
|
1547
|
+
} }
|
|
1548
|
+
function InfoPanelOverlayComponent_li_5_Template(rf, ctx) { if (rf & 1) {
|
|
1549
|
+
i0.ɵɵelementStart(0, "li", 2);
|
|
1550
|
+
i0.ɵɵtext(1);
|
|
1551
|
+
i0.ɵɵelementEnd();
|
|
1552
|
+
} if (rf & 2) {
|
|
1553
|
+
const action_r1 = ctx.$implicit;
|
|
1554
|
+
i0.ɵɵadvance();
|
|
1555
|
+
i0.ɵɵtextInterpolate1(" ", action_r1, " ");
|
|
1556
|
+
} }
|
|
1557
|
+
/**
|
|
1558
|
+
* Component for displaying information from the logger
|
|
1559
|
+
*/
|
|
1560
|
+
class InfoPanelOverlayComponent {
|
|
1561
|
+
eventDisplay;
|
|
1562
|
+
/** @ignore */
|
|
1563
|
+
showInfoPanel;
|
|
1564
|
+
/** List of actions to be displayed in the info panel */
|
|
1565
|
+
actionsList = [];
|
|
1566
|
+
/** Get Phoenix Version */
|
|
1567
|
+
version = packageJson.version;
|
|
1568
|
+
/**
|
|
1569
|
+
* Create the information panel overlay
|
|
1570
|
+
* @param infoLogger Service containing operations related to info logs
|
|
1571
|
+
*/
|
|
1572
|
+
constructor(eventDisplay) {
|
|
1573
|
+
this.eventDisplay = eventDisplay;
|
|
1574
|
+
}
|
|
1575
|
+
/**
|
|
1576
|
+
* Get the list of logs from the info logger service
|
|
1577
|
+
*/
|
|
1578
|
+
ngOnInit() {
|
|
1579
|
+
this.actionsList = this.eventDisplay.getInfoLogger().getInfoLoggerList();
|
|
1580
|
+
}
|
|
1581
|
+
static ɵfac = function InfoPanelOverlayComponent_Factory(t) { return new (t || InfoPanelOverlayComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
1582
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InfoPanelOverlayComponent, selectors: [["app-info-panel-overlay"]], inputs: { showInfoPanel: "showInfoPanel" }, decls: 6, vars: 5, consts: [["overlayTitle", "Info Panel", "icon", "info-panel", 3, "resizable", "active"], [1, "list-group", "list-group-flush"], [1, "list-group-item"], ["class", "list-group-item", 4, "ngIf"], ["class", "list-group-item", 4, "ngFor", "ngForOf"]], template: function InfoPanelOverlayComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1583
|
+
i0.ɵɵelementStart(0, "app-overlay", 0)(1, "ul", 1)(2, "li", 2);
|
|
1584
|
+
i0.ɵɵtext(3);
|
|
1585
|
+
i0.ɵɵelementEnd();
|
|
1586
|
+
i0.ɵɵtemplate(4, InfoPanelOverlayComponent_li_4_Template, 2, 0, "li", 3)(5, InfoPanelOverlayComponent_li_5_Template, 2, 1, "li", 4);
|
|
1587
|
+
i0.ɵɵelementEnd()();
|
|
1588
|
+
} if (rf & 2) {
|
|
1589
|
+
i0.ɵɵproperty("resizable", true)("active", ctx.showInfoPanel);
|
|
1590
|
+
i0.ɵɵadvance(3);
|
|
1591
|
+
i0.ɵɵtextInterpolate1(" Phoenix Version: ", ctx.version, " ");
|
|
1592
|
+
i0.ɵɵadvance();
|
|
1593
|
+
i0.ɵɵproperty("ngIf", ctx.actionsList.length === 0);
|
|
1594
|
+
i0.ɵɵadvance();
|
|
1595
|
+
i0.ɵɵproperty("ngForOf", ctx.actionsList);
|
|
1596
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, OverlayComponent], styles: [".list-group-item[_ngcontent-%COMP%]{font-size:.8rem;padding:.5rem 1rem}"] });
|
|
1597
|
+
}
|
|
1598
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InfoPanelOverlayComponent, [{
|
|
1599
|
+
type: Component,
|
|
1600
|
+
args: [{ selector: 'app-info-panel-overlay', template: "<app-overlay\n overlayTitle=\"Info Panel\"\n icon=\"info-panel\"\n [resizable]=\"true\"\n [active]=\"showInfoPanel\"\n>\n <ul class=\"list-group list-group-flush\">\n <li class=\"list-group-item\">\n <!-- Show Phoenix Current Version (ON by Default) -->\n Phoenix Version: {{ version }}\n </li>\n <li class=\"list-group-item\" *ngIf=\"actionsList.length === 0\">\n No actions.\n </li>\n <li class=\"list-group-item\" *ngFor=\"let action of actionsList\">\n {{ action }}\n </li>\n </ul>\n</app-overlay>\n", styles: [".list-group-item{font-size:.8rem;padding:.5rem 1rem}\n"] }]
|
|
1601
|
+
}], () => [{ type: EventDisplayService }], { showInfoPanel: [{
|
|
1602
|
+
type: Input
|
|
1603
|
+
}] }); })();
|
|
1604
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InfoPanelOverlayComponent, { className: "InfoPanelOverlayComponent", filePath: "components/ui-menu/info-panel/info-panel-overlay/info-panel-overlay.component.ts", lineNumber: 13 }); })();
|
|
1605
|
+
|
|
1606
|
+
/**
|
|
1607
|
+
* Component for toggling info panel overlay
|
|
1608
|
+
*/
|
|
1609
|
+
class InfoPanelComponent {
|
|
1610
|
+
overlay;
|
|
1611
|
+
/** @ignore */
|
|
1612
|
+
showInfoPanel = false;
|
|
1613
|
+
/** Information panel overlay window */
|
|
1614
|
+
overlayWindow;
|
|
1615
|
+
/**
|
|
1616
|
+
* Create the info panel toggle
|
|
1617
|
+
* @param overlay Info panel overlay containing logger data
|
|
1618
|
+
*/
|
|
1619
|
+
constructor(overlay) {
|
|
1620
|
+
this.overlay = overlay;
|
|
1621
|
+
}
|
|
1622
|
+
/**
|
|
1623
|
+
* Create the info panel overlay
|
|
1624
|
+
*/
|
|
1625
|
+
ngOnInit() {
|
|
1626
|
+
const overlayRef = this.overlay.create();
|
|
1627
|
+
const overlayPortal = new ComponentPortal(InfoPanelOverlayComponent);
|
|
1628
|
+
this.overlayWindow = overlayRef.attach(overlayPortal);
|
|
1629
|
+
this.overlayWindow.instance.showInfoPanel = this.showInfoPanel;
|
|
1630
|
+
}
|
|
1631
|
+
/**
|
|
1632
|
+
* Destroy the info panel overlay
|
|
1633
|
+
*/
|
|
1634
|
+
ngOnDestroy() {
|
|
1635
|
+
this.overlayWindow.destroy();
|
|
1636
|
+
}
|
|
1637
|
+
/**
|
|
1638
|
+
* Toggle the info panel overlay
|
|
1639
|
+
*/
|
|
1640
|
+
toggleOverlay() {
|
|
1641
|
+
this.showInfoPanel = !this.showInfoPanel;
|
|
1642
|
+
this.overlayWindow.instance.showInfoPanel = this.showInfoPanel;
|
|
1643
|
+
}
|
|
1644
|
+
static ɵfac = function InfoPanelComponent_Factory(t) { return new (t || InfoPanelComponent)(i0.ɵɵdirectiveInject(i1$1.Overlay)); };
|
|
1645
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: InfoPanelComponent, selectors: [["app-info-panel"]], decls: 1, vars: 1, consts: [["tooltip", "Info panel", "icon", "info-panel", 3, "click", "active"]], template: function InfoPanelComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1646
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
1647
|
+
i0.ɵɵlistener("click", function InfoPanelComponent_Template_app_menu_toggle_click_0_listener() { return ctx.toggleOverlay(); });
|
|
1648
|
+
i0.ɵɵelementEnd();
|
|
1649
|
+
} if (rf & 2) {
|
|
1650
|
+
i0.ɵɵproperty("active", ctx.showInfoPanel);
|
|
1651
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
1652
|
+
}
|
|
1653
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(InfoPanelComponent, [{
|
|
1654
|
+
type: Component,
|
|
1655
|
+
args: [{ selector: 'app-info-panel', template: "<app-menu-toggle\n tooltip=\"Info panel\"\n icon=\"info-panel\"\n [active]=\"showInfoPanel\"\n (click)=\"toggleOverlay()\"\n>\n</app-menu-toggle>\n" }]
|
|
1656
|
+
}], () => [{ type: i1$1.Overlay }], null); })();
|
|
1657
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(InfoPanelComponent, { className: "InfoPanelComponent", filePath: "components/ui-menu/info-panel/info-panel.component.ts", lineNumber: 14 }); })();
|
|
1658
|
+
|
|
1659
|
+
var EventDataFormat;
|
|
1660
|
+
(function (EventDataFormat) {
|
|
1661
|
+
EventDataFormat["JSON"] = "JSON";
|
|
1662
|
+
EventDataFormat["EDM4HEPJSON"] = "EDM4HEPJSON";
|
|
1663
|
+
EventDataFormat["JIVEXML"] = "JIVEXML";
|
|
1664
|
+
EventDataFormat["IG"] = "IG";
|
|
1665
|
+
EventDataFormat["ZIP"] = "ZIP";
|
|
1666
|
+
})(EventDataFormat || (EventDataFormat = {}));
|
|
1667
|
+
class ImportOption {
|
|
1668
|
+
format;
|
|
1669
|
+
fileType;
|
|
1670
|
+
handler;
|
|
1671
|
+
accept;
|
|
1672
|
+
constructor(format, fileType, handler, accept) {
|
|
1673
|
+
this.format = format;
|
|
1674
|
+
this.fileType = fileType;
|
|
1675
|
+
this.handler = handler;
|
|
1676
|
+
this.accept = accept;
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
function IOOptionsDialogComponent_div_4_ng_container_5_Template(rf, ctx) { if (rf & 1) {
|
|
1681
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
1682
|
+
i0.ɵɵelementContainerStart(0);
|
|
1683
|
+
i0.ɵɵelementStart(1, "input", 29, 5);
|
|
1684
|
+
i0.ɵɵlistener("change", function IOOptionsDialogComponent_div_4_ng_container_5_Template_input_change_1_listener($event) { const eventDataImportOption_r3 = i0.ɵɵrestoreView(_r2).$implicit; return i0.ɵɵresetView(eventDataImportOption_r3.handler($event.target.files)); });
|
|
1685
|
+
i0.ɵɵelementEnd();
|
|
1686
|
+
i0.ɵɵelementStart(3, "button", 13);
|
|
1687
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_div_4_ng_container_5_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r2); const eventDataFileInput_r4 = i0.ɵɵreference(2); return i0.ɵɵresetView(eventDataFileInput_r4.click()); });
|
|
1688
|
+
i0.ɵɵelement(4, "img", 30);
|
|
1689
|
+
i0.ɵɵtext(5);
|
|
1690
|
+
i0.ɵɵelementEnd();
|
|
1691
|
+
i0.ɵɵelementContainerEnd();
|
|
1692
|
+
} if (rf & 2) {
|
|
1693
|
+
const eventDataImportOption_r3 = ctx.$implicit;
|
|
1694
|
+
i0.ɵɵadvance();
|
|
1695
|
+
i0.ɵɵproperty("accept", eventDataImportOption_r3.accept);
|
|
1696
|
+
i0.ɵɵadvance(4);
|
|
1697
|
+
i0.ɵɵtextInterpolate1(" Load ", eventDataImportOption_r3.fileType, " ");
|
|
1698
|
+
} }
|
|
1699
|
+
function IOOptionsDialogComponent_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
1700
|
+
i0.ɵɵelementStart(0, "div")(1, "p", 10)(2, "b");
|
|
1701
|
+
i0.ɵɵtext(3, "Event data");
|
|
1702
|
+
i0.ɵɵelementEnd()();
|
|
1703
|
+
i0.ɵɵelementStart(4, "div", 11);
|
|
1704
|
+
i0.ɵɵtemplate(5, IOOptionsDialogComponent_div_4_ng_container_5_Template, 6, 2, "ng-container", 28);
|
|
1705
|
+
i0.ɵɵelementEnd()();
|
|
1706
|
+
} if (rf & 2) {
|
|
1707
|
+
const ctx_r4 = i0.ɵɵnextContext();
|
|
1708
|
+
i0.ɵɵadvance(5);
|
|
1709
|
+
i0.ɵɵproperty("ngForOf", ctx_r4.eventDataOptionsWithHandler);
|
|
1710
|
+
} }
|
|
1711
|
+
class IOOptionsDialogComponent {
|
|
1712
|
+
eventDisplay;
|
|
1713
|
+
dialogRef;
|
|
1714
|
+
eventDataImportOptions = [EventDataFormat.JSON];
|
|
1715
|
+
eventDataOptionsWithHandler;
|
|
1716
|
+
supportedEventDataFormats = [
|
|
1717
|
+
new ImportOption(EventDataFormat.JSON, '.json', this.handleJSONEventDataInput.bind(this), 'application/json'),
|
|
1718
|
+
new ImportOption(EventDataFormat.EDM4HEPJSON, '.edm4hep.json', this.handleEDM4HEPJSONEventDataInput.bind(this), 'application/json'),
|
|
1719
|
+
new ImportOption(EventDataFormat.JIVEXML, '.xml', this.handleJiveXMLDataInput.bind(this), 'text/xml'),
|
|
1720
|
+
new ImportOption(EventDataFormat.ZIP, '.zip', this.handleZipEventDataInput.bind(this), '.zip'),
|
|
1721
|
+
new ImportOption(EventDataFormat.IG, '.ig', this.handleIgEventDataInput.bind(this), '.ig'),
|
|
1722
|
+
];
|
|
1723
|
+
constructor(eventDisplay, dialogRef) {
|
|
1724
|
+
this.eventDisplay = eventDisplay;
|
|
1725
|
+
this.dialogRef = dialogRef;
|
|
1726
|
+
}
|
|
1727
|
+
ngOnInit() {
|
|
1728
|
+
this.eventDataOptionsWithHandler = this.supportedEventDataFormats.filter((eventDataFormat) => this.eventDataImportOptions.includes(eventDataFormat.format));
|
|
1729
|
+
this.eventDataImportOptions.forEach((eventDataImportOption) => {
|
|
1730
|
+
if (eventDataImportOption instanceof ImportOption) {
|
|
1731
|
+
const importHandler = eventDataImportOption.handler.bind(this);
|
|
1732
|
+
eventDataImportOption.handler = (files) => {
|
|
1733
|
+
importHandler(files);
|
|
1734
|
+
this.onClose();
|
|
1735
|
+
};
|
|
1736
|
+
this.eventDataOptionsWithHandler.push(eventDataImportOption);
|
|
1737
|
+
}
|
|
1738
|
+
});
|
|
1739
|
+
}
|
|
1740
|
+
getSupportedEventDataFormats() {
|
|
1741
|
+
return this.eventDataImportOptions
|
|
1742
|
+
.map((format) => {
|
|
1743
|
+
if (format instanceof ImportOption) {
|
|
1744
|
+
return format.format;
|
|
1745
|
+
}
|
|
1746
|
+
return format;
|
|
1747
|
+
})
|
|
1748
|
+
.filter((format) => format !== 'ZIP')
|
|
1749
|
+
.join(', ');
|
|
1750
|
+
}
|
|
1751
|
+
onClose() {
|
|
1752
|
+
this.dialogRef.close();
|
|
1753
|
+
}
|
|
1754
|
+
handleJSONEventDataInput(files) {
|
|
1755
|
+
const callback = (content) => {
|
|
1756
|
+
const json = typeof content === 'string' ? JSON.parse(content) : content;
|
|
1757
|
+
this.eventDisplay.parsePhoenixEvents(json);
|
|
1758
|
+
};
|
|
1759
|
+
this.handleFileInput(files[0], 'json', callback);
|
|
1760
|
+
}
|
|
1761
|
+
handleEDM4HEPJSONEventDataInput(files) {
|
|
1762
|
+
const callback = (content) => {
|
|
1763
|
+
const json = typeof content === 'string' ? JSON.parse(content) : content;
|
|
1764
|
+
const edm4hepJsonLoader = new Edm4hepJsonLoader();
|
|
1765
|
+
edm4hepJsonLoader.setRawEventData(json);
|
|
1766
|
+
edm4hepJsonLoader.processEventData();
|
|
1767
|
+
this.eventDisplay.parsePhoenixEvents(edm4hepJsonLoader.getEventData());
|
|
1768
|
+
};
|
|
1769
|
+
this.handleFileInput(files[0], 'json', callback);
|
|
1770
|
+
}
|
|
1771
|
+
handleJiveXMLDataInput(files) {
|
|
1772
|
+
const callback = (content) => {
|
|
1773
|
+
const jiveloader = new JiveXMLLoader();
|
|
1774
|
+
jiveloader.process(content);
|
|
1775
|
+
const eventData = jiveloader.getEventData();
|
|
1776
|
+
this.eventDisplay.buildEventDataFromJSON(eventData);
|
|
1777
|
+
};
|
|
1778
|
+
this.handleFileInput(files[0], 'xml', callback);
|
|
1779
|
+
}
|
|
1780
|
+
handleOBJInput(files) {
|
|
1781
|
+
const callback = (content, name) => {
|
|
1782
|
+
this.eventDisplay.parseOBJGeometry(content, name);
|
|
1783
|
+
};
|
|
1784
|
+
this.handleFileInput(files[0], 'obj', callback);
|
|
1785
|
+
}
|
|
1786
|
+
handleSceneInput(files) {
|
|
1787
|
+
const callback = (content) => {
|
|
1788
|
+
this.eventDisplay.parsePhoenixDisplay(content);
|
|
1789
|
+
};
|
|
1790
|
+
this.handleFileInput(files[0], 'phnx', callback);
|
|
1791
|
+
}
|
|
1792
|
+
handleGLTFInput(files) {
|
|
1793
|
+
const callback = (content, name) => {
|
|
1794
|
+
this.eventDisplay.parseGLTFGeometry(content, name);
|
|
1795
|
+
};
|
|
1796
|
+
this.handleFileInput(files[0], 'gltf', callback);
|
|
1797
|
+
}
|
|
1798
|
+
handlePhoenixInput(files) {
|
|
1799
|
+
const callback = (content) => {
|
|
1800
|
+
this.eventDisplay.parsePhoenixDisplay(content);
|
|
1801
|
+
};
|
|
1802
|
+
this.handleFileInput(files[0], 'phnx', callback);
|
|
1803
|
+
}
|
|
1804
|
+
async handleROOTInput(files) {
|
|
1805
|
+
const rootObjectName = prompt('Enter object name in ROOT file');
|
|
1806
|
+
await this.eventDisplay.loadRootGeometry(URL.createObjectURL(files[0]), rootObjectName, files[0].name.split('.')[0]);
|
|
1807
|
+
this.onClose();
|
|
1808
|
+
}
|
|
1809
|
+
async handleRootJSONInput(files) {
|
|
1810
|
+
if (!this.isFileOfExtension(files[0], 'gz')) {
|
|
1811
|
+
return;
|
|
1812
|
+
}
|
|
1813
|
+
const name = files[0].name.split('.')[0];
|
|
1814
|
+
await this.eventDisplay.loadRootJSONGeometry(URL.createObjectURL(files[0]), name);
|
|
1815
|
+
this.onClose();
|
|
1816
|
+
}
|
|
1817
|
+
handleIgEventDataInput(files) {
|
|
1818
|
+
const cmsLoader = new CMSLoader();
|
|
1819
|
+
cmsLoader.readIgArchive(files[0], (allEvents) => {
|
|
1820
|
+
const allEventsData = cmsLoader.getAllEventsData(allEvents);
|
|
1821
|
+
this.eventDisplay.parsePhoenixEvents(allEventsData);
|
|
1822
|
+
this.onClose();
|
|
1823
|
+
});
|
|
1824
|
+
}
|
|
1825
|
+
async handleZipEventDataInput(files) {
|
|
1826
|
+
if (!this.isFileOfExtension(files[0], 'zip')) {
|
|
1827
|
+
return;
|
|
1828
|
+
}
|
|
1829
|
+
const allEventsObject = {};
|
|
1830
|
+
let filesWithData;
|
|
1831
|
+
// Using a try catch block to catch any errors in Promises
|
|
1832
|
+
try {
|
|
1833
|
+
filesWithData = await readZipFile(files[0]);
|
|
1834
|
+
}
|
|
1835
|
+
catch (error) {
|
|
1836
|
+
console.error('Error while reading zip', error);
|
|
1837
|
+
this.eventDisplay.getInfoLogger().add('Could not read zip file', 'Error');
|
|
1838
|
+
return;
|
|
1839
|
+
}
|
|
1840
|
+
// JSON event data
|
|
1841
|
+
Object.keys(filesWithData)
|
|
1842
|
+
.filter((fileName) => fileName.endsWith('.json'))
|
|
1843
|
+
.forEach((fileName) => {
|
|
1844
|
+
Object.assign(allEventsObject, JSON.parse(filesWithData[fileName]));
|
|
1845
|
+
});
|
|
1846
|
+
// JiveXML event data
|
|
1847
|
+
const jiveloader = new JiveXMLLoader();
|
|
1848
|
+
Object.keys(filesWithData)
|
|
1849
|
+
.filter((fileName) => {
|
|
1850
|
+
return fileName.endsWith('.xml') || fileName.startsWith('JiveXML');
|
|
1851
|
+
})
|
|
1852
|
+
.forEach((fileName) => {
|
|
1853
|
+
jiveloader.process(filesWithData[fileName]);
|
|
1854
|
+
const eventData = jiveloader.getEventData();
|
|
1855
|
+
Object.assign(allEventsObject, { [fileName]: eventData });
|
|
1856
|
+
});
|
|
1857
|
+
// For some reason the above doesn't pick up JiveXML_XXX_YYY.zip
|
|
1858
|
+
this.eventDisplay.parsePhoenixEvents(allEventsObject);
|
|
1859
|
+
this.onClose();
|
|
1860
|
+
}
|
|
1861
|
+
handleFileInput(file, extension, callback) {
|
|
1862
|
+
const reader = new FileReader();
|
|
1863
|
+
if (this.isFileOfExtension(file, extension)) {
|
|
1864
|
+
reader.onload = () => {
|
|
1865
|
+
callback(reader.result.toString(), file.name.split('.')[0]);
|
|
1866
|
+
};
|
|
1867
|
+
reader.readAsText(file);
|
|
1868
|
+
}
|
|
1869
|
+
this.onClose();
|
|
1870
|
+
}
|
|
1871
|
+
isFileOfExtension(file, extension) {
|
|
1872
|
+
if (file.name.split('.').pop() === extension) {
|
|
1873
|
+
return true;
|
|
1874
|
+
}
|
|
1875
|
+
console.error('Error: Invalid file format!');
|
|
1876
|
+
this.eventDisplay.getInfoLogger().add('Invalid file format!', 'Error');
|
|
1877
|
+
return false;
|
|
1878
|
+
}
|
|
1879
|
+
saveScene() {
|
|
1880
|
+
this.eventDisplay.exportPhoenixDisplay();
|
|
1881
|
+
}
|
|
1882
|
+
exportOBJ() {
|
|
1883
|
+
this.eventDisplay.exportToOBJ();
|
|
1884
|
+
}
|
|
1885
|
+
static ɵfac = function IOOptionsDialogComponent_Factory(t) { return new (t || IOOptionsDialogComponent)(i0.ɵɵdirectiveInject(EventDisplayService), i0.ɵɵdirectiveInject(i1$2.MatDialogRef)); };
|
|
1886
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: IOOptionsDialogComponent, selectors: [["app-io-options-dialog"]], inputs: { eventDataImportOptions: "eventDataImportOptions" }, decls: 47, vars: 1, consts: [["objFileInput", ""], ["gltfFileInput", ""], ["rootFileInput", ""], ["rootJSONFileInput", ""], ["loadSceneInput", ""], ["eventDataFileInput", ""], [1, "dialog"], ["mat-dialog-title", ""], ["mat-dialog-content", "", 1, "dialog-content"], [4, "ngIf"], [1, "text-center"], [1, "row", "centered"], ["type", "file", "tabindex", "-1", "accept", ".obj", "name", "image", 1, "file-input", 3, "change"], [1, "file-input-button", 3, "click"], ["src", "assets/icons/obj.svg", "alt", ""], ["type", "file", "tabindex", "-1", "accept", ".gltf", "name", "image", 1, "file-input", 3, "change"], ["src", "assets/icons/gltf.svg", "alt", ""], ["type", "file", "tabindex", "-1", "accept", ".root", 1, "file-input", 3, "change"], ["src", "assets/icons/file-import.svg", "alt", ""], ["type", "file", "tabindex", "-1", "accept", ".json.gz", 1, "file-input", 3, "change"], ["id", "exportScene", 1, "file-input-button", "load-export", 3, "click"], ["src", "assets/icons/save.svg", "alt", ""], ["type", "file", "tabindex", "-1", "accept", ".phnx", "name", "image", 1, "file-input", 3, "change"], ["id", "importScene", 1, "file-input-button", "load-export", 3, "click"], ["src", "assets/icons/upload.svg", "alt", ""], ["id", "exportOBJ", 1, "file-input-button", "export-button", 3, "click"], ["mat-dialog-actions", "", "align", "end"], ["mat-flat-button", "", "color", "primary", "cdkFocusInitial", "", 3, "click"], [4, "ngFor", "ngForOf"], ["type", "file", "tabindex", "-1", 1, "file-input", 3, "change", "accept"], ["src", "assets/icons/eventData.svg", "alt", "Event data icon"]], template: function IOOptionsDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1887
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
1888
|
+
i0.ɵɵelementStart(0, "div", 6)(1, "h1", 7);
|
|
1889
|
+
i0.ɵɵtext(2, "Import and export");
|
|
1890
|
+
i0.ɵɵelementEnd();
|
|
1891
|
+
i0.ɵɵelementStart(3, "div", 8);
|
|
1892
|
+
i0.ɵɵtemplate(4, IOOptionsDialogComponent_div_4_Template, 6, 1, "div", 9);
|
|
1893
|
+
i0.ɵɵelementStart(5, "p", 10)(6, "b");
|
|
1894
|
+
i0.ɵɵtext(7, "Geometries");
|
|
1895
|
+
i0.ɵɵelementEnd()();
|
|
1896
|
+
i0.ɵɵelementStart(8, "div", 11)(9, "input", 12, 0);
|
|
1897
|
+
i0.ɵɵlistener("change", function IOOptionsDialogComponent_Template_input_change_9_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleOBJInput($event.target.files)); });
|
|
1898
|
+
i0.ɵɵelementEnd();
|
|
1899
|
+
i0.ɵɵelementStart(11, "button", 13);
|
|
1900
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_Template_button_click_11_listener() { i0.ɵɵrestoreView(_r1); const objFileInput_r6 = i0.ɵɵreference(10); return i0.ɵɵresetView(objFileInput_r6.click()); });
|
|
1901
|
+
i0.ɵɵelement(12, "img", 14);
|
|
1902
|
+
i0.ɵɵtext(13, " Load .obj ");
|
|
1903
|
+
i0.ɵɵelementEnd();
|
|
1904
|
+
i0.ɵɵelementStart(14, "input", 15, 1);
|
|
1905
|
+
i0.ɵɵlistener("change", function IOOptionsDialogComponent_Template_input_change_14_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleGLTFInput($event.target.files)); });
|
|
1906
|
+
i0.ɵɵelementEnd();
|
|
1907
|
+
i0.ɵɵelementStart(16, "button", 13);
|
|
1908
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_Template_button_click_16_listener() { i0.ɵɵrestoreView(_r1); const gltfFileInput_r7 = i0.ɵɵreference(15); return i0.ɵɵresetView(gltfFileInput_r7.click()); });
|
|
1909
|
+
i0.ɵɵelement(17, "img", 16);
|
|
1910
|
+
i0.ɵɵtext(18, " Load .gltf ");
|
|
1911
|
+
i0.ɵɵelementEnd();
|
|
1912
|
+
i0.ɵɵelementStart(19, "input", 17, 2);
|
|
1913
|
+
i0.ɵɵlistener("change", function IOOptionsDialogComponent_Template_input_change_19_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleROOTInput($event.target.files)); });
|
|
1914
|
+
i0.ɵɵelementEnd();
|
|
1915
|
+
i0.ɵɵelementStart(21, "button", 13);
|
|
1916
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_Template_button_click_21_listener() { i0.ɵɵrestoreView(_r1); const rootFileInput_r8 = i0.ɵɵreference(20); return i0.ɵɵresetView(rootFileInput_r8.click()); });
|
|
1917
|
+
i0.ɵɵelement(22, "img", 18);
|
|
1918
|
+
i0.ɵɵtext(23, " Load .root ");
|
|
1919
|
+
i0.ɵɵelementEnd();
|
|
1920
|
+
i0.ɵɵelementStart(24, "input", 19, 3);
|
|
1921
|
+
i0.ɵɵlistener("change", function IOOptionsDialogComponent_Template_input_change_24_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handleRootJSONInput($event.target.files)); });
|
|
1922
|
+
i0.ɵɵelementEnd();
|
|
1923
|
+
i0.ɵɵelementStart(26, "button", 13);
|
|
1924
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_Template_button_click_26_listener() { i0.ɵɵrestoreView(_r1); const rootJSONFileInput_r9 = i0.ɵɵreference(25); return i0.ɵɵresetView(rootJSONFileInput_r9.click()); });
|
|
1925
|
+
i0.ɵɵelement(27, "img", 18);
|
|
1926
|
+
i0.ɵɵtext(28, " Load .json.gz ");
|
|
1927
|
+
i0.ɵɵelementEnd()();
|
|
1928
|
+
i0.ɵɵelementStart(29, "p", 10)(30, "b");
|
|
1929
|
+
i0.ɵɵtext(31, "Scene");
|
|
1930
|
+
i0.ɵɵelementEnd()();
|
|
1931
|
+
i0.ɵɵelementStart(32, "div", 11)(33, "button", 20);
|
|
1932
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_Template_button_click_33_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.saveScene()); });
|
|
1933
|
+
i0.ɵɵelement(34, "img", 21);
|
|
1934
|
+
i0.ɵɵtext(35, " Save scene ");
|
|
1935
|
+
i0.ɵɵelementEnd();
|
|
1936
|
+
i0.ɵɵelementStart(36, "input", 22, 4);
|
|
1937
|
+
i0.ɵɵlistener("change", function IOOptionsDialogComponent_Template_input_change_36_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.handlePhoenixInput($event.target.files)); });
|
|
1938
|
+
i0.ɵɵelementEnd();
|
|
1939
|
+
i0.ɵɵelementStart(38, "button", 23);
|
|
1940
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_Template_button_click_38_listener() { i0.ɵɵrestoreView(_r1); const loadSceneInput_r10 = i0.ɵɵreference(37); return i0.ɵɵresetView(loadSceneInput_r10.click()); });
|
|
1941
|
+
i0.ɵɵelement(39, "img", 24);
|
|
1942
|
+
i0.ɵɵtext(40, " Load scene ");
|
|
1943
|
+
i0.ɵɵelementEnd();
|
|
1944
|
+
i0.ɵɵelementStart(41, "button", 25);
|
|
1945
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_Template_button_click_41_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.exportOBJ()); });
|
|
1946
|
+
i0.ɵɵelement(42, "img", 14);
|
|
1947
|
+
i0.ɵɵtext(43, " Save OBJ ");
|
|
1948
|
+
i0.ɵɵelementEnd()()();
|
|
1949
|
+
i0.ɵɵelementStart(44, "div", 26)(45, "button", 27);
|
|
1950
|
+
i0.ɵɵlistener("click", function IOOptionsDialogComponent_Template_button_click_45_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onClose()); });
|
|
1951
|
+
i0.ɵɵtext(46, " Close ");
|
|
1952
|
+
i0.ɵɵelementEnd()()();
|
|
1953
|
+
} if (rf & 2) {
|
|
1954
|
+
i0.ɵɵadvance(4);
|
|
1955
|
+
i0.ɵɵproperty("ngIf", ctx.eventDataImportOptions.length > 0);
|
|
1956
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, i1$2.MatDialogTitle, i1$2.MatDialogActions, i1$2.MatDialogContent, i3.MatButton], styles: [".row[_ngcontent-%COMP%]{justify-content:center;margin:1rem 0}.file-input[_ngcontent-%COMP%]{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.file-input-button[_ngcontent-%COMP%]{font-size:1em;font-weight:700;color:#fff;background-color:#6eaece;padding:1em .5em;border:none;border-radius:10px;width:8rem;margin:0 .4rem}.file-input-button.load-export[_ngcontent-%COMP%]{padding:.8em .2em;width:7rem}.file-input-button.load-export[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:1.2em}.file-input-button.export-button[_ngcontent-%COMP%]{background-color:#cb7133}.file-input-button.export-button[_ngcontent-%COMP%]:hover{background-color:#ad5b2d}.file-input-button[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{max-height:2em;display:block;width:100%}.file-input-button[_ngcontent-%COMP%]:hover{background-color:#118ab2}#exportScene[_ngcontent-%COMP%]{background-color:#5bd99e}#exportScene[_ngcontent-%COMP%]:hover{background-color:#05c292}#importScene[_ngcontent-%COMP%]{background-color:#ecc25e}#importScene[_ngcontent-%COMP%]:hover{background-color:#d6b44d}"] });
|
|
1957
|
+
}
|
|
1958
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IOOptionsDialogComponent, [{
|
|
1959
|
+
type: Component,
|
|
1960
|
+
args: [{ selector: 'app-io-options-dialog', template: "<div class=\"dialog\">\n <h1 mat-dialog-title>Import and export</h1>\n <div mat-dialog-content class=\"dialog-content\">\n <div *ngIf=\"eventDataImportOptions.length > 0\">\n <p class=\"text-center\"><b>Event data</b></p>\n\n <div class=\"row centered\">\n <ng-container\n *ngFor=\"let eventDataImportOption of eventDataOptionsWithHandler\"\n >\n <input\n #eventDataFileInput\n type=\"file\"\n tabindex=\"-1\"\n class=\"file-input\"\n [accept]=\"eventDataImportOption.accept\"\n (change)=\"eventDataImportOption.handler($event.target.files)\"\n />\n <button\n class=\"file-input-button\"\n (click)=\"eventDataFileInput.click()\"\n >\n <img src=\"assets/icons/eventData.svg\" alt=\"Event data icon\" />\n Load {{ eventDataImportOption.fileType }}\n </button>\n </ng-container>\n </div>\n </div>\n\n <p class=\"text-center\"><b>Geometries</b></p>\n\n <div class=\"row centered\">\n <input\n #objFileInput\n type=\"file\"\n tabindex=\"-1\"\n class=\"file-input\"\n accept=\".obj\"\n name=\"image\"\n (change)=\"handleOBJInput($event.target.files)\"\n />\n <button class=\"file-input-button\" (click)=\"objFileInput.click()\">\n <img src=\"assets/icons/obj.svg\" alt=\"\" /> Load .obj\n </button>\n\n <input\n #gltfFileInput\n type=\"file\"\n tabindex=\"-1\"\n class=\"file-input\"\n accept=\".gltf\"\n name=\"image\"\n (change)=\"handleGLTFInput($event.target.files)\"\n />\n <button class=\"file-input-button\" (click)=\"gltfFileInput.click()\">\n <img src=\"assets/icons/gltf.svg\" alt=\"\" /> Load .gltf\n </button>\n\n <input\n #rootFileInput\n type=\"file\"\n tabindex=\"-1\"\n class=\"file-input\"\n accept=\".root\"\n (change)=\"handleROOTInput($event.target.files)\"\n />\n <button class=\"file-input-button\" (click)=\"rootFileInput.click()\">\n <img src=\"assets/icons/file-import.svg\" alt=\"\" /> Load .root\n </button>\n\n <input\n #rootJSONFileInput\n type=\"file\"\n tabindex=\"-1\"\n class=\"file-input\"\n accept=\".json.gz\"\n (change)=\"handleRootJSONInput($event.target.files)\"\n />\n <button class=\"file-input-button\" (click)=\"rootJSONFileInput.click()\">\n <img src=\"assets/icons/file-import.svg\" alt=\"\" /> Load .json.gz\n </button>\n </div>\n\n <p class=\"text-center\"><b>Scene</b></p>\n\n <div class=\"row centered\">\n <button\n class=\"file-input-button load-export\"\n id=\"exportScene\"\n (click)=\"saveScene()\"\n >\n <img src=\"assets/icons/save.svg\" alt=\"\" /> Save scene\n </button>\n\n <input\n #loadSceneInput\n type=\"file\"\n tabindex=\"-1\"\n class=\"file-input\"\n accept=\".phnx\"\n name=\"image\"\n (change)=\"handlePhoenixInput($event.target.files)\"\n />\n <button\n class=\"file-input-button load-export\"\n id=\"importScene\"\n (click)=\"loadSceneInput.click()\"\n >\n <img src=\"assets/icons/upload.svg\" alt=\"\" /> Load scene\n </button>\n\n <button\n class=\"file-input-button export-button\"\n id=\"exportOBJ\"\n (click)=\"exportOBJ()\"\n >\n <img src=\"assets/icons/obj.svg\" alt=\"\" /> Save OBJ\n </button>\n </div>\n </div>\n\n <div mat-dialog-actions align=\"end\">\n <button mat-flat-button color=\"primary\" (click)=\"onClose()\" cdkFocusInitial>\n Close\n </button>\n </div>\n</div>\n", styles: [".row{justify-content:center;margin:1rem 0}.file-input{width:.1px;height:.1px;opacity:0;overflow:hidden;position:absolute;z-index:-1}.file-input-button{font-size:1em;font-weight:700;color:#fff;background-color:#6eaece;padding:1em .5em;border:none;border-radius:10px;width:8rem;margin:0 .4rem}.file-input-button.load-export{padding:.8em .2em;width:7rem}.file-input-button.load-export img{max-height:1.2em}.file-input-button.export-button{background-color:#cb7133}.file-input-button.export-button:hover{background-color:#ad5b2d}.file-input-button img{max-height:2em;display:block;width:100%}.file-input-button:hover{background-color:#118ab2}#exportScene{background-color:#5bd99e}#exportScene:hover{background-color:#05c292}#importScene{background-color:#ecc25e}#importScene:hover{background-color:#d6b44d}\n"] }]
|
|
1961
|
+
}], () => [{ type: EventDisplayService }, { type: i1$2.MatDialogRef }], { eventDataImportOptions: [{
|
|
1962
|
+
type: Input
|
|
1963
|
+
}] }); })();
|
|
1964
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(IOOptionsDialogComponent, { className: "IOOptionsDialogComponent", filePath: "components/ui-menu/io-options/io-options-dialog/io-options-dialog.component.ts", lineNumber: 21 }); })();
|
|
1965
|
+
|
|
1966
|
+
class IoOptionsComponent {
|
|
1967
|
+
dialog;
|
|
1968
|
+
eventDataImportOptions = Object.values(EventDataFormat);
|
|
1969
|
+
constructor(dialog) {
|
|
1970
|
+
this.dialog = dialog;
|
|
1971
|
+
}
|
|
1972
|
+
openIODialog() {
|
|
1973
|
+
const dialogRef = this.dialog.open(IOOptionsDialogComponent, {
|
|
1974
|
+
panelClass: 'dialog',
|
|
1975
|
+
});
|
|
1976
|
+
dialogRef.componentInstance.eventDataImportOptions =
|
|
1977
|
+
this.eventDataImportOptions;
|
|
1978
|
+
}
|
|
1979
|
+
static ɵfac = function IoOptionsComponent_Factory(t) { return new (t || IoOptionsComponent)(i0.ɵɵdirectiveInject(i1$2.MatDialog)); };
|
|
1980
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: IoOptionsComponent, selectors: [["app-io-options"]], inputs: { eventDataImportOptions: "eventDataImportOptions" }, decls: 1, vars: 1, consts: [["tooltip", "Import and export options", "icon", "import", 3, "click", "active"]], template: function IoOptionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1981
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
1982
|
+
i0.ɵɵlistener("click", function IoOptionsComponent_Template_app_menu_toggle_click_0_listener() { return ctx.openIODialog(); });
|
|
1983
|
+
i0.ɵɵelementEnd();
|
|
1984
|
+
} if (rf & 2) {
|
|
1985
|
+
i0.ɵɵproperty("active", false);
|
|
1986
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
1987
|
+
}
|
|
1988
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(IoOptionsComponent, [{
|
|
1989
|
+
type: Component,
|
|
1990
|
+
args: [{ selector: 'app-io-options', template: "<app-menu-toggle\n tooltip=\"Import and export options\"\n icon=\"import\"\n [active]=\"false\"\n (click)=\"openIODialog()\"\n>\n</app-menu-toggle>\n" }]
|
|
1991
|
+
}], () => [{ type: i1$2.MatDialog }], { eventDataImportOptions: [{
|
|
1992
|
+
type: Input
|
|
1993
|
+
}] }); })();
|
|
1994
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(IoOptionsComponent, { className: "IoOptionsComponent", filePath: "components/ui-menu/io-options/io-options.component.ts", lineNumber: 14 }); })();
|
|
1995
|
+
|
|
1996
|
+
class MainViewToggleComponent {
|
|
1997
|
+
eventDisplay;
|
|
1998
|
+
orthographicView = false;
|
|
1999
|
+
constructor(eventDisplay) {
|
|
2000
|
+
this.eventDisplay = eventDisplay;
|
|
2001
|
+
}
|
|
2002
|
+
switchMainView() {
|
|
2003
|
+
this.orthographicView = !this.orthographicView;
|
|
2004
|
+
this.eventDisplay
|
|
2005
|
+
.getUIManager()
|
|
2006
|
+
.toggleOrthographicView(this.orthographicView);
|
|
2007
|
+
}
|
|
2008
|
+
static ɵfac = function MainViewToggleComponent_Factory(t) { return new (t || MainViewToggleComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2009
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MainViewToggleComponent, selectors: [["app-main-view-toggle"]], decls: 1, vars: 2, consts: [[3, "click", "icon", "matTooltip"]], template: function MainViewToggleComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2010
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
2011
|
+
i0.ɵɵlistener("click", function MainViewToggleComponent_Template_app_menu_toggle_click_0_listener() { return ctx.switchMainView(); });
|
|
2012
|
+
i0.ɵɵelementEnd();
|
|
2013
|
+
} if (rf & 2) {
|
|
2014
|
+
i0.ɵɵproperty("icon", ctx.orthographicView ? "perspective" : "orthographic")("matTooltip", "Switch to " + (ctx.orthographicView ? "perspective" : "orthographic") + " view");
|
|
2015
|
+
} }, dependencies: [i3$1.MatTooltip, MenuToggleComponent] });
|
|
2016
|
+
}
|
|
2017
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MainViewToggleComponent, [{
|
|
2018
|
+
type: Component,
|
|
2019
|
+
args: [{ selector: 'app-main-view-toggle', template: "<app-menu-toggle\n [icon]=\"orthographicView ? 'perspective' : 'orthographic'\"\n [matTooltip]=\"\n 'Switch to ' + (orthographicView ? 'perspective' : 'orthographic') + ' view'\n \"\n (click)=\"switchMainView()\"\n>\n</app-menu-toggle>\n" }]
|
|
2020
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
2021
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MainViewToggleComponent, { className: "MainViewToggleComponent", filePath: "components/ui-menu/main-view-toggle/main-view-toggle.component.ts", lineNumber: 9 }); })();
|
|
2022
|
+
|
|
2023
|
+
class ObjectClippingComponent {
|
|
2024
|
+
eventDisplay;
|
|
2025
|
+
clippingEnabled;
|
|
2026
|
+
startClippingAngle;
|
|
2027
|
+
openingClippingAngle;
|
|
2028
|
+
constructor(eventDisplay) {
|
|
2029
|
+
this.eventDisplay = eventDisplay;
|
|
2030
|
+
const stateManager = this.eventDisplay.getStateManager();
|
|
2031
|
+
stateManager.clippingEnabled.onUpdate((clippingValue) => (this.clippingEnabled = clippingValue));
|
|
2032
|
+
stateManager.startClippingAngle.onUpdate((value) => (this.startClippingAngle = value));
|
|
2033
|
+
stateManager.openingClippingAngle.onUpdate((value) => (this.openingClippingAngle = value));
|
|
2034
|
+
}
|
|
2035
|
+
changeStartClippingAngle(startingAngle) {
|
|
2036
|
+
this.eventDisplay.getUIManager().rotateStartAngleClipping(startingAngle);
|
|
2037
|
+
}
|
|
2038
|
+
changeOpeningClippingAngle(openingAngle) {
|
|
2039
|
+
this.eventDisplay.getUIManager().rotateOpeningAngleClipping(openingAngle);
|
|
2040
|
+
}
|
|
2041
|
+
toggleClipping(change) {
|
|
2042
|
+
const value = change.checked;
|
|
2043
|
+
this.eventDisplay.getUIManager().setClipping(value);
|
|
2044
|
+
this.clippingEnabled = value;
|
|
2045
|
+
}
|
|
2046
|
+
static ɵfac = function ObjectClippingComponent_Factory(t) { return new (t || ObjectClippingComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2047
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ObjectClippingComponent, selectors: [["app-object-clipping"]], decls: 17, vars: 5, consts: [["menu", ""], ["clippingCheckbox", ""], ["startingAngleSlider", ""], ["openingAngleSlider", ""], [1, "mat-menu"], ["mat-menu-item", "", 3, "click"], [3, "click", "change", "checked"], ["mat-menu-item", "", 1, "slider-btn", 3, "focus"], ["min", "0", "max", "360", "step", "1", "thumbLabel", ""], ["matSliderThumb", "", 3, "valueChange", "value"], ["tooltip", "Geometry clipping", "icon", "clipping", 3, "matMenuTriggerFor", "active"]], template: function ObjectClippingComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2048
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
2049
|
+
i0.ɵɵelementStart(0, "mat-menu", 4, 0)(2, "button", 5);
|
|
2050
|
+
i0.ɵɵlistener("click", function ObjectClippingComponent_Template_button_click_2_listener($event) { i0.ɵɵrestoreView(_r1); const clippingCheckbox_r2 = i0.ɵɵreference(4); $event.stopPropagation(); return i0.ɵɵresetView(clippingCheckbox_r2._inputElement.nativeElement.click()); });
|
|
2051
|
+
i0.ɵɵelementStart(3, "mat-checkbox", 6, 1);
|
|
2052
|
+
i0.ɵɵlistener("click", function ObjectClippingComponent_Template_mat_checkbox_click_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function ObjectClippingComponent_Template_mat_checkbox_change_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.toggleClipping($event)); });
|
|
2053
|
+
i0.ɵɵtext(5, " Clipping ");
|
|
2054
|
+
i0.ɵɵelementEnd()();
|
|
2055
|
+
i0.ɵɵelementStart(6, "button", 7);
|
|
2056
|
+
i0.ɵɵlistener("focus", function ObjectClippingComponent_Template_button_focus_6_listener() { i0.ɵɵrestoreView(_r1); const startingAngleSlider_r3 = i0.ɵɵreference(9); return i0.ɵɵresetView(startingAngleSlider_r3.focus()); });
|
|
2057
|
+
i0.ɵɵelementStart(7, "mat-slider", 8)(8, "input", 9, 2);
|
|
2058
|
+
i0.ɵɵlistener("valueChange", function ObjectClippingComponent_Template_input_valueChange_8_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.changeStartClippingAngle($event)); });
|
|
2059
|
+
i0.ɵɵelementEnd()();
|
|
2060
|
+
i0.ɵɵtext(10, " Start Angle ");
|
|
2061
|
+
i0.ɵɵelementEnd();
|
|
2062
|
+
i0.ɵɵelementStart(11, "button", 7);
|
|
2063
|
+
i0.ɵɵlistener("focus", function ObjectClippingComponent_Template_button_focus_11_listener() { i0.ɵɵrestoreView(_r1); const openingAngleSlider_r4 = i0.ɵɵreference(14); return i0.ɵɵresetView(openingAngleSlider_r4.focus()); });
|
|
2064
|
+
i0.ɵɵelementStart(12, "mat-slider", 8)(13, "input", 9, 3);
|
|
2065
|
+
i0.ɵɵlistener("valueChange", function ObjectClippingComponent_Template_input_valueChange_13_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.changeOpeningClippingAngle($event)); });
|
|
2066
|
+
i0.ɵɵelementEnd()();
|
|
2067
|
+
i0.ɵɵtext(15, " Opening Angle ");
|
|
2068
|
+
i0.ɵɵelementEnd()();
|
|
2069
|
+
i0.ɵɵelement(16, "app-menu-toggle", 10);
|
|
2070
|
+
} if (rf & 2) {
|
|
2071
|
+
const menu_r5 = i0.ɵɵreference(1);
|
|
2072
|
+
i0.ɵɵadvance(3);
|
|
2073
|
+
i0.ɵɵproperty("checked", ctx.clippingEnabled);
|
|
2074
|
+
i0.ɵɵadvance(5);
|
|
2075
|
+
i0.ɵɵproperty("value", ctx.startClippingAngle);
|
|
2076
|
+
i0.ɵɵadvance(5);
|
|
2077
|
+
i0.ɵɵproperty("value", ctx.openingClippingAngle);
|
|
2078
|
+
i0.ɵɵadvance(3);
|
|
2079
|
+
i0.ɵɵproperty("matMenuTriggerFor", menu_r5)("active", ctx.clippingEnabled);
|
|
2080
|
+
} }, dependencies: [i3$2.MatMenu, i3$2.MatMenuItem, i3$2.MatMenuTrigger, i2$1.MatSlider, i2$1.MatSliderThumb, i5.MatCheckbox, MenuToggleComponent], styles: [".slider-btn[_ngcontent-%COMP%]{overflow:visible}mat-slider[_ngcontent-%COMP%]{margin-left:.75rem;margin-right:.75rem}"] });
|
|
2081
|
+
}
|
|
2082
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ObjectClippingComponent, [{
|
|
2083
|
+
type: Component,
|
|
2084
|
+
args: [{ selector: 'app-object-clipping', template: "<mat-menu class=\"mat-menu\" #menu>\n <button\n mat-menu-item\n (click)=\"\n $event.stopPropagation();\n clippingCheckbox._inputElement.nativeElement.click()\n \"\n >\n <mat-checkbox\n #clippingCheckbox\n [checked]=\"clippingEnabled\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleClipping($event)\"\n >\n Clipping\n </mat-checkbox>\n </button>\n <button\n class=\"slider-btn\"\n mat-menu-item\n (focus)=\"startingAngleSlider.focus()\"\n >\n <mat-slider min=\"0\" max=\"360\" step=\"1\" thumbLabel>\n <input\n #startingAngleSlider\n matSliderThumb\n [value]=\"startClippingAngle\"\n (valueChange)=\"changeStartClippingAngle($event)\"\n />\n </mat-slider>\n Start Angle\n </button>\n <button class=\"slider-btn\" mat-menu-item (focus)=\"openingAngleSlider.focus()\">\n <mat-slider min=\"0\" max=\"360\" step=\"1\" thumbLabel>\n <input\n #openingAngleSlider\n matSliderThumb\n [value]=\"openingClippingAngle\"\n (valueChange)=\"changeOpeningClippingAngle($event)\"\n />\n </mat-slider>\n Opening Angle\n </button>\n</mat-menu>\n\n<app-menu-toggle\n [matMenuTriggerFor]=\"menu\"\n tooltip=\"Geometry clipping\"\n icon=\"clipping\"\n [active]=\"clippingEnabled\"\n>\n</app-menu-toggle>\n", styles: [".slider-btn{overflow:visible}mat-slider{margin-left:.75rem;margin-right:.75rem}\n"] }]
|
|
2085
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
2086
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ObjectClippingComponent, { className: "ObjectClippingComponent", filePath: "components/ui-menu/object-clipping/object-clipping.component.ts", lineNumber: 10 }); })();
|
|
2087
|
+
|
|
2088
|
+
/**
|
|
2089
|
+
* Pipe for transforming selected object attributes to a better format.
|
|
2090
|
+
*/
|
|
2091
|
+
class AttributePipe {
|
|
2092
|
+
/**
|
|
2093
|
+
* Transform the attribute to a better presentable format.
|
|
2094
|
+
* @param value Value to be transformed.
|
|
2095
|
+
* @param args Additional arguments.
|
|
2096
|
+
* @returns The transformed value.
|
|
2097
|
+
*/
|
|
2098
|
+
transform(value, args) {
|
|
2099
|
+
let transformedValue = '';
|
|
2100
|
+
if (Array.isArray(value)) {
|
|
2101
|
+
transformedValue += '\n';
|
|
2102
|
+
value.forEach((v) => (transformedValue += v + '\n'));
|
|
2103
|
+
}
|
|
2104
|
+
else {
|
|
2105
|
+
transformedValue = value.toString();
|
|
2106
|
+
}
|
|
2107
|
+
return transformedValue;
|
|
2108
|
+
}
|
|
2109
|
+
static ɵfac = function AttributePipe_Factory(t) { return new (t || AttributePipe)(); };
|
|
2110
|
+
static ɵpipe = /*@__PURE__*/ i0.ɵɵdefinePipe({ name: "attributePipe", type: AttributePipe, pure: true });
|
|
2111
|
+
}
|
|
2112
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AttributePipe, [{
|
|
2113
|
+
type: Pipe,
|
|
2114
|
+
args: [{
|
|
2115
|
+
name: 'attributePipe',
|
|
2116
|
+
}]
|
|
2117
|
+
}], null, null); })();
|
|
2118
|
+
|
|
2119
|
+
function ObjectSelectionOverlayComponent_div_1_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
2120
|
+
i0.ɵɵelementStart(0, "div", 4)(1, "strong");
|
|
2121
|
+
i0.ɵɵtext(2);
|
|
2122
|
+
i0.ɵɵelementEnd();
|
|
2123
|
+
i0.ɵɵtext(3);
|
|
2124
|
+
i0.ɵɵpipe(4, "attributePipe");
|
|
2125
|
+
i0.ɵɵelementEnd();
|
|
2126
|
+
} if (rf & 2) {
|
|
2127
|
+
const attribute_r1 = ctx.$implicit;
|
|
2128
|
+
i0.ɵɵadvance(2);
|
|
2129
|
+
i0.ɵɵtextInterpolate(attribute_r1.attributeName);
|
|
2130
|
+
i0.ɵɵadvance();
|
|
2131
|
+
i0.ɵɵtextInterpolate1(" : ", i0.ɵɵpipeBind1(4, 2, attribute_r1.attributeValue), " ");
|
|
2132
|
+
} }
|
|
2133
|
+
function ObjectSelectionOverlayComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
2134
|
+
i0.ɵɵelementStart(0, "div", 2);
|
|
2135
|
+
i0.ɵɵtemplate(1, ObjectSelectionOverlayComponent_div_1_div_1_Template, 5, 4, "div", 3);
|
|
2136
|
+
i0.ɵɵelementEnd();
|
|
2137
|
+
} if (rf & 2) {
|
|
2138
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
2139
|
+
i0.ɵɵadvance();
|
|
2140
|
+
i0.ɵɵproperty("ngForOf", ctx_r1.selectedObject.attributes);
|
|
2141
|
+
} }
|
|
2142
|
+
class ObjectSelectionOverlayComponent {
|
|
2143
|
+
eventDisplay;
|
|
2144
|
+
// Attributes for displaying the information of selected objects
|
|
2145
|
+
hiddenSelectedInfo;
|
|
2146
|
+
selectedObject = { name: 'Object', attributes: [] };
|
|
2147
|
+
constructor(eventDisplay) {
|
|
2148
|
+
this.eventDisplay = eventDisplay;
|
|
2149
|
+
}
|
|
2150
|
+
ngOnInit() {
|
|
2151
|
+
this.eventDisplay.allowSelection(this.selectedObject);
|
|
2152
|
+
}
|
|
2153
|
+
static ɵfac = function ObjectSelectionOverlayComponent_Factory(t) { return new (t || ObjectSelectionOverlayComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2154
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ObjectSelectionOverlayComponent, selectors: [["app-object-selection-overlay"]], inputs: { hiddenSelectedInfo: "hiddenSelectedInfo" }, decls: 2, vars: 3, consts: [["icon", "cursor", 3, "overlayTitle", "active"], ["id", "selectedObjectPanelBody", "class", "m-1", 4, "ngIf"], ["id", "selectedObjectPanelBody", 1, "m-1"], ["class", "attributeField", 4, "ngFor", "ngForOf"], [1, "attributeField"]], template: function ObjectSelectionOverlayComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2155
|
+
i0.ɵɵelementStart(0, "app-overlay", 0);
|
|
2156
|
+
i0.ɵɵtemplate(1, ObjectSelectionOverlayComponent_div_1_Template, 2, 1, "div", 1);
|
|
2157
|
+
i0.ɵɵelementEnd();
|
|
2158
|
+
} if (rf & 2) {
|
|
2159
|
+
i0.ɵɵproperty("overlayTitle", ctx.selectedObject.name)("active", !ctx.hiddenSelectedInfo);
|
|
2160
|
+
i0.ɵɵadvance();
|
|
2161
|
+
i0.ɵɵproperty("ngIf", ctx.selectedObject.attributes.length > 0);
|
|
2162
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, OverlayComponent, AttributePipe], styles: ["#selectedObjectPanelBody[_ngcontent-%COMP%]{padding:0 .8em;overflow:auto;max-width:300px;max-height:16rem;min-width:7rem}"] });
|
|
2163
|
+
}
|
|
2164
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ObjectSelectionOverlayComponent, [{
|
|
2165
|
+
type: Component,
|
|
2166
|
+
args: [{ selector: 'app-object-selection-overlay', template: "<app-overlay\n icon=\"cursor\"\n [overlayTitle]=\"selectedObject.name\"\n [active]=\"!hiddenSelectedInfo\"\n>\n <div\n id=\"selectedObjectPanelBody\"\n class=\"m-1\"\n *ngIf=\"selectedObject.attributes.length > 0\"\n >\n <div\n *ngFor=\"let attribute of selectedObject.attributes\"\n class=\"attributeField\"\n >\n <strong>{{ attribute.attributeName }}</strong>\n : {{ attribute.attributeValue | attributePipe }}\n </div>\n </div>\n</app-overlay>\n", styles: ["#selectedObjectPanelBody{padding:0 .8em;overflow:auto;max-width:300px;max-height:16rem;min-width:7rem}\n"] }]
|
|
2167
|
+
}], () => [{ type: EventDisplayService }], { hiddenSelectedInfo: [{
|
|
2168
|
+
type: Input
|
|
2169
|
+
}] }); })();
|
|
2170
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ObjectSelectionOverlayComponent, { className: "ObjectSelectionOverlayComponent", filePath: "components/ui-menu/object-selection/object-selection-overlay/object-selection-overlay.component.ts", lineNumber: 9 }); })();
|
|
2171
|
+
|
|
2172
|
+
class ObjectSelectionComponent {
|
|
2173
|
+
overlay;
|
|
2174
|
+
eventDisplay;
|
|
2175
|
+
// Attributes for displaying the information of selected objects
|
|
2176
|
+
hiddenSelectedInfo = true;
|
|
2177
|
+
overlayWindow;
|
|
2178
|
+
constructor(overlay, eventDisplay) {
|
|
2179
|
+
this.overlay = overlay;
|
|
2180
|
+
this.eventDisplay = eventDisplay;
|
|
2181
|
+
}
|
|
2182
|
+
ngOnInit() {
|
|
2183
|
+
const overlayRef = this.overlay.create();
|
|
2184
|
+
const overlayPortal = new ComponentPortal(ObjectSelectionOverlayComponent);
|
|
2185
|
+
this.overlayWindow = overlayRef.attach(overlayPortal);
|
|
2186
|
+
this.overlayWindow.instance.hiddenSelectedInfo = this.hiddenSelectedInfo;
|
|
2187
|
+
}
|
|
2188
|
+
ngOnDestroy() {
|
|
2189
|
+
this.overlayWindow.destroy();
|
|
2190
|
+
}
|
|
2191
|
+
toggleOverlay() {
|
|
2192
|
+
this.hiddenSelectedInfo = !this.hiddenSelectedInfo;
|
|
2193
|
+
this.overlayWindow.instance.hiddenSelectedInfo = this.hiddenSelectedInfo;
|
|
2194
|
+
this.eventDisplay.enableSelecting(!this.hiddenSelectedInfo);
|
|
2195
|
+
}
|
|
2196
|
+
static ɵfac = function ObjectSelectionComponent_Factory(t) { return new (t || ObjectSelectionComponent)(i0.ɵɵdirectiveInject(i1$1.Overlay), i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2197
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ObjectSelectionComponent, selectors: [["app-object-selection"]], decls: 1, vars: 1, consts: [["tooltip", "Object selection", "icon", "cursor", 3, "click", "active"]], template: function ObjectSelectionComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2198
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
2199
|
+
i0.ɵɵlistener("click", function ObjectSelectionComponent_Template_app_menu_toggle_click_0_listener() { return ctx.toggleOverlay(); });
|
|
2200
|
+
i0.ɵɵelementEnd();
|
|
2201
|
+
} if (rf & 2) {
|
|
2202
|
+
i0.ɵɵproperty("active", !ctx.hiddenSelectedInfo);
|
|
2203
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
2204
|
+
}
|
|
2205
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ObjectSelectionComponent, [{
|
|
2206
|
+
type: Component,
|
|
2207
|
+
args: [{ selector: 'app-object-selection', template: "<app-menu-toggle\n tooltip=\"Object selection\"\n icon=\"cursor\"\n [active]=\"!hiddenSelectedInfo\"\n (click)=\"toggleOverlay()\"\n>\n</app-menu-toggle>\n" }]
|
|
2208
|
+
}], () => [{ type: i1$1.Overlay }, { type: EventDisplayService }], null); })();
|
|
2209
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ObjectSelectionComponent, { className: "ObjectSelectionComponent", filePath: "components/ui-menu/object-selection/object-selection.component.ts", lineNumber: 12 }); })();
|
|
2210
|
+
|
|
2211
|
+
const _c0$6 = ["overlayWindow"];
|
|
2212
|
+
class OverlayViewWindowComponent {
|
|
2213
|
+
eventDisplay;
|
|
2214
|
+
showOverlay = true;
|
|
2215
|
+
transparentBody = false;
|
|
2216
|
+
orthographicView = false;
|
|
2217
|
+
overlayViewFixed = false;
|
|
2218
|
+
overlayWindow;
|
|
2219
|
+
constructor(eventDisplay) {
|
|
2220
|
+
this.eventDisplay = eventDisplay;
|
|
2221
|
+
}
|
|
2222
|
+
ngAfterViewInit() {
|
|
2223
|
+
const canvas = this.initializeCanvas(this.overlayWindow.nativeElement);
|
|
2224
|
+
this.eventDisplay.setOverlayRenderer(canvas);
|
|
2225
|
+
}
|
|
2226
|
+
initializeCanvas(canvas) {
|
|
2227
|
+
const width = window.innerWidth / 2.5;
|
|
2228
|
+
const height = window.innerHeight / 2.5;
|
|
2229
|
+
canvas.width = width;
|
|
2230
|
+
canvas.height = height;
|
|
2231
|
+
canvas.style.width = width.toString() + ' px';
|
|
2232
|
+
canvas.style.height = height.toString() + ' px';
|
|
2233
|
+
return canvas;
|
|
2234
|
+
}
|
|
2235
|
+
switchOverlayView() {
|
|
2236
|
+
this.orthographicView = !this.orthographicView;
|
|
2237
|
+
this.eventDisplay
|
|
2238
|
+
.getUIManager()
|
|
2239
|
+
.toggleOrthographicView(this.orthographicView);
|
|
2240
|
+
}
|
|
2241
|
+
fixOverlayView() {
|
|
2242
|
+
this.overlayViewFixed = !this.overlayViewFixed;
|
|
2243
|
+
this.eventDisplay.fixOverlayView(this.overlayViewFixed);
|
|
2244
|
+
}
|
|
2245
|
+
toggleBgTransparency() {
|
|
2246
|
+
this.transparentBody = !this.transparentBody;
|
|
2247
|
+
}
|
|
2248
|
+
static ɵfac = function OverlayViewWindowComponent_Factory(t) { return new (t || OverlayViewWindowComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2249
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OverlayViewWindowComponent, selectors: [["app-overlay-view-window"]], viewQuery: function OverlayViewWindowComponent_Query(rf, ctx) { if (rf & 1) {
|
|
2250
|
+
i0.ɵɵviewQuery(_c0$6, 5);
|
|
2251
|
+
} if (rf & 2) {
|
|
2252
|
+
let _t;
|
|
2253
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.overlayWindow = _t.first);
|
|
2254
|
+
} }, inputs: { showOverlay: "showOverlay" }, decls: 8, vars: 9, consts: [["overlayWindow", ""], ["overlayTitle", "Overlay View", "icon", "overlay", 3, "resizable", "transparentBody", "active", "keepAspectRatioFixed"], [1, "overlay-view-wrapper"], ["id", "overlay-canvas", 3, "hidden"], [1, "overlay-view-controls", "position-absolute", "d-flex", "flex-row"], ["icon", "transparent", "matTooltip", "Toggle background transparency", 1, "overlay-view-control", 3, "click"], ["icon", "move-lock", 1, "overlay-view-control", 3, "click", "matTooltip", "active"], [1, "overlay-view-control", 3, "click", "icon", "matTooltip"]], template: function OverlayViewWindowComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2255
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
2256
|
+
i0.ɵɵelementStart(0, "app-overlay", 1)(1, "div", 2);
|
|
2257
|
+
i0.ɵɵelement(2, "canvas", 3, 0);
|
|
2258
|
+
i0.ɵɵelementStart(4, "div", 4)(5, "app-menu-toggle", 5);
|
|
2259
|
+
i0.ɵɵlistener("click", function OverlayViewWindowComponent_Template_app_menu_toggle_click_5_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.toggleBgTransparency()); });
|
|
2260
|
+
i0.ɵɵelementEnd();
|
|
2261
|
+
i0.ɵɵelementStart(6, "app-menu-toggle", 6);
|
|
2262
|
+
i0.ɵɵlistener("click", function OverlayViewWindowComponent_Template_app_menu_toggle_click_6_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.fixOverlayView()); });
|
|
2263
|
+
i0.ɵɵelementEnd();
|
|
2264
|
+
i0.ɵɵelementStart(7, "app-menu-toggle", 7);
|
|
2265
|
+
i0.ɵɵlistener("click", function OverlayViewWindowComponent_Template_app_menu_toggle_click_7_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.switchOverlayView()); });
|
|
2266
|
+
i0.ɵɵelementEnd()()()();
|
|
2267
|
+
} if (rf & 2) {
|
|
2268
|
+
i0.ɵɵproperty("resizable", true)("transparentBody", ctx.transparentBody)("active", ctx.showOverlay)("keepAspectRatioFixed", true);
|
|
2269
|
+
i0.ɵɵadvance(2);
|
|
2270
|
+
i0.ɵɵproperty("hidden", !ctx.showOverlay);
|
|
2271
|
+
i0.ɵɵadvance(4);
|
|
2272
|
+
i0.ɵɵproperty("matTooltip", (ctx.overlayViewFixed ? "Restore" : "Fix") + " overlay view")("active", ctx.overlayViewFixed);
|
|
2273
|
+
i0.ɵɵadvance();
|
|
2274
|
+
i0.ɵɵproperty("icon", ctx.orthographicView ? "orthographic" : "perspective")("matTooltip", "Switch to " + (ctx.orthographicView ? "orthographic" : "perspective") + " view");
|
|
2275
|
+
} }, dependencies: [i3$1.MatTooltip, MenuToggleComponent, OverlayComponent], styles: ["#overlay-canvas[_ngcontent-%COMP%]{background-color:#0000001a;width:100%}.overlay-view-controls[_ngcontent-%COMP%]{bottom:1em;right:1em;opacity:0;transition:opacity .2s}.overlay-view-controls[_ngcontent-%COMP%] .overlay-view-control[_ngcontent-%COMP%]{background:var(--phoenix-background-color-secondary);box-shadow:var(--phoenix-box-shadow);overflow:hidden;width:2.5rem;height:2.5rem;border-radius:50%;display:flex;justify-content:center;align-items:center}.overlay-view-wrapper[_ngcontent-%COMP%]:hover .overlay-view-controls[_ngcontent-%COMP%]{opacity:1;transition:opacity .2s}"] });
|
|
2276
|
+
}
|
|
2277
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayViewWindowComponent, [{
|
|
2278
|
+
type: Component,
|
|
2279
|
+
args: [{ selector: 'app-overlay-view-window', template: "<app-overlay\n overlayTitle=\"Overlay View\"\n icon=\"overlay\"\n [resizable]=\"true\"\n [transparentBody]=\"transparentBody\"\n [active]=\"showOverlay\"\n [keepAspectRatioFixed]=\"true\"\n>\n <div class=\"overlay-view-wrapper\">\n <canvas #overlayWindow id=\"overlay-canvas\" [hidden]=\"!showOverlay\">\n </canvas>\n <div class=\"overlay-view-controls position-absolute d-flex flex-row\">\n <app-menu-toggle\n class=\"overlay-view-control\"\n icon=\"transparent\"\n matTooltip=\"Toggle background transparency\"\n (click)=\"toggleBgTransparency()\"\n >\n </app-menu-toggle>\n <app-menu-toggle\n class=\"overlay-view-control\"\n icon=\"move-lock\"\n [matTooltip]=\"(overlayViewFixed ? 'Restore' : 'Fix') + ' overlay view'\"\n [active]=\"overlayViewFixed\"\n (click)=\"fixOverlayView()\"\n >\n </app-menu-toggle>\n <app-menu-toggle\n class=\"overlay-view-control\"\n [icon]=\"orthographicView ? 'orthographic' : 'perspective'\"\n [matTooltip]=\"\n 'Switch to ' +\n (orthographicView ? 'orthographic' : 'perspective') +\n ' view'\n \"\n (click)=\"switchOverlayView()\"\n >\n </app-menu-toggle>\n </div>\n </div>\n</app-overlay>\n", styles: ["#overlay-canvas{background-color:#0000001a;width:100%}.overlay-view-controls{bottom:1em;right:1em;opacity:0;transition:opacity .2s}.overlay-view-controls .overlay-view-control{background:var(--phoenix-background-color-secondary);box-shadow:var(--phoenix-box-shadow);overflow:hidden;width:2.5rem;height:2.5rem;border-radius:50%;display:flex;justify-content:center;align-items:center}.overlay-view-wrapper:hover .overlay-view-controls{opacity:1;transition:opacity .2s}\n"] }]
|
|
2280
|
+
}], () => [{ type: EventDisplayService }], { showOverlay: [{
|
|
2281
|
+
type: Input
|
|
2282
|
+
}], overlayWindow: [{
|
|
2283
|
+
type: ViewChild,
|
|
2284
|
+
args: ['overlayWindow']
|
|
2285
|
+
}] }); })();
|
|
2286
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(OverlayViewWindowComponent, { className: "OverlayViewWindowComponent", filePath: "components/ui-menu/overlay-view/overlay-view-window/overlay-view-window.component.ts", lineNumber: 10 }); })();
|
|
2287
|
+
|
|
2288
|
+
class OverlayViewComponent {
|
|
2289
|
+
overlay;
|
|
2290
|
+
overlayWindow;
|
|
2291
|
+
showOverlay = false;
|
|
2292
|
+
constructor(overlay) {
|
|
2293
|
+
this.overlay = overlay;
|
|
2294
|
+
}
|
|
2295
|
+
ngOnInit() {
|
|
2296
|
+
const overlayRef = this.overlay.create();
|
|
2297
|
+
const overlayPortal = new ComponentPortal(OverlayViewWindowComponent);
|
|
2298
|
+
this.overlayWindow = overlayRef.attach(overlayPortal);
|
|
2299
|
+
this.overlayWindow.instance.showOverlay = this.showOverlay;
|
|
2300
|
+
}
|
|
2301
|
+
ngOnDestroy() {
|
|
2302
|
+
this.overlayWindow.destroy();
|
|
2303
|
+
}
|
|
2304
|
+
toggleOverlay() {
|
|
2305
|
+
this.showOverlay = !this.showOverlay;
|
|
2306
|
+
this.overlayWindow.instance.showOverlay = this.showOverlay;
|
|
2307
|
+
}
|
|
2308
|
+
static ɵfac = function OverlayViewComponent_Factory(t) { return new (t || OverlayViewComponent)(i0.ɵɵdirectiveInject(i1$1.Overlay)); };
|
|
2309
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: OverlayViewComponent, selectors: [["app-overlay-view"]], decls: 1, vars: 1, consts: [["tooltip", "Overlay view", "icon", "overlay", 3, "click", "active"]], template: function OverlayViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2310
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
2311
|
+
i0.ɵɵlistener("click", function OverlayViewComponent_Template_app_menu_toggle_click_0_listener() { return ctx.toggleOverlay(); });
|
|
2312
|
+
i0.ɵɵelementEnd();
|
|
2313
|
+
} if (rf & 2) {
|
|
2314
|
+
i0.ɵɵproperty("active", ctx.showOverlay);
|
|
2315
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
2316
|
+
}
|
|
2317
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OverlayViewComponent, [{
|
|
2318
|
+
type: Component,
|
|
2319
|
+
args: [{ selector: 'app-overlay-view', template: "<app-menu-toggle\n tooltip=\"Overlay view\"\n icon=\"overlay\"\n [active]=\"showOverlay\"\n (click)=\"toggleOverlay()\"\n>\n</app-menu-toggle>\n" }]
|
|
2320
|
+
}], () => [{ type: i1$1.Overlay }], null); })();
|
|
2321
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(OverlayViewComponent, { className: "OverlayViewComponent", filePath: "components/ui-menu/overlay-view/overlay-view.component.ts", lineNumber: 11 }); })();
|
|
2322
|
+
|
|
2323
|
+
const _c0$5 = a0 => ({ visible: a0 });
|
|
2324
|
+
function TreeMenuItemComponent_ng_container_0_button_2_Template(rf, ctx) { if (rf & 1) {
|
|
2325
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
2326
|
+
i0.ɵɵelementStart(0, "button", 7);
|
|
2327
|
+
i0.ɵɵlistener("click", function TreeMenuItemComponent_ng_container_0_button_2_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.isExpanded = !ctx_r2.isExpanded); });
|
|
2328
|
+
i0.ɵɵelementStart(1, "mat-icon", 8);
|
|
2329
|
+
i0.ɵɵtext(2);
|
|
2330
|
+
i0.ɵɵelementEnd()();
|
|
2331
|
+
} if (rf & 2) {
|
|
2332
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
2333
|
+
i0.ɵɵadvance(2);
|
|
2334
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.isExpanded ? "expand_more" : "chevron_right", " ");
|
|
2335
|
+
} }
|
|
2336
|
+
function TreeMenuItemComponent_ng_container_0_li_7_Template(rf, ctx) { if (rf & 1) {
|
|
2337
|
+
i0.ɵɵelementStart(0, "li");
|
|
2338
|
+
i0.ɵɵelement(1, "app-tree-menu-item", 9);
|
|
2339
|
+
i0.ɵɵelementEnd();
|
|
2340
|
+
} if (rf & 2) {
|
|
2341
|
+
const node_r4 = ctx.$implicit;
|
|
2342
|
+
i0.ɵɵadvance();
|
|
2343
|
+
i0.ɵɵproperty("node", node_r4);
|
|
2344
|
+
} }
|
|
2345
|
+
function TreeMenuItemComponent_ng_container_0_Template(rf, ctx) { if (rf & 1) {
|
|
2346
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
2347
|
+
i0.ɵɵelementContainerStart(0);
|
|
2348
|
+
i0.ɵɵelementStart(1, "div", 1);
|
|
2349
|
+
i0.ɵɵtemplate(2, TreeMenuItemComponent_ng_container_0_button_2_Template, 3, 1, "button", 2);
|
|
2350
|
+
i0.ɵɵelementStart(3, "div", 3);
|
|
2351
|
+
i0.ɵɵlistener("click", function TreeMenuItemComponent_ng_container_0_Template_div_click_3_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleVisibility(!ctx_r2.visible)); });
|
|
2352
|
+
i0.ɵɵtext(4);
|
|
2353
|
+
i0.ɵɵelementEnd()();
|
|
2354
|
+
i0.ɵɵelementStart(5, "ul", 4)(6, "div", 5);
|
|
2355
|
+
i0.ɵɵtemplate(7, TreeMenuItemComponent_ng_container_0_li_7_Template, 2, 1, "li", 6);
|
|
2356
|
+
i0.ɵɵelementEnd()();
|
|
2357
|
+
i0.ɵɵelementContainerEnd();
|
|
2358
|
+
} if (rf & 2) {
|
|
2359
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
2360
|
+
i0.ɵɵadvance();
|
|
2361
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(5, _c0$5, ctx_r2.visible));
|
|
2362
|
+
i0.ɵɵadvance();
|
|
2363
|
+
i0.ɵɵproperty("ngIf", ctx_r2.node.children);
|
|
2364
|
+
i0.ɵɵadvance(2);
|
|
2365
|
+
i0.ɵɵtextInterpolate1(" ", ctx_r2.node.name, " ");
|
|
2366
|
+
i0.ɵɵadvance();
|
|
2367
|
+
i0.ɵɵproperty("hidden", !ctx_r2.isExpanded);
|
|
2368
|
+
i0.ɵɵadvance(2);
|
|
2369
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.node.children);
|
|
2370
|
+
} }
|
|
2371
|
+
class TreeMenuItemComponent {
|
|
2372
|
+
eventDisplay;
|
|
2373
|
+
children;
|
|
2374
|
+
node;
|
|
2375
|
+
isExpanded = false;
|
|
2376
|
+
visible = true;
|
|
2377
|
+
constructor(eventDisplay) {
|
|
2378
|
+
this.eventDisplay = eventDisplay;
|
|
2379
|
+
}
|
|
2380
|
+
toggleVisibility(visible) {
|
|
2381
|
+
console.log("hi! it's " + this.node.name);
|
|
2382
|
+
this.eventDisplay
|
|
2383
|
+
.getUIManager()
|
|
2384
|
+
.geometryVisibility(this.node.geometryId, visible);
|
|
2385
|
+
this.visible = visible;
|
|
2386
|
+
this.children.forEach((child) => child.toggleVisibility(visible));
|
|
2387
|
+
}
|
|
2388
|
+
static ɵfac = function TreeMenuItemComponent_Factory(t) { return new (t || TreeMenuItemComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2389
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TreeMenuItemComponent, selectors: [["app-tree-menu-item"]], viewQuery: function TreeMenuItemComponent_Query(rf, ctx) { if (rf & 1) {
|
|
2390
|
+
i0.ɵɵviewQuery(TreeMenuItemComponent, 5);
|
|
2391
|
+
} if (rf & 2) {
|
|
2392
|
+
let _t;
|
|
2393
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.children = _t);
|
|
2394
|
+
} }, inputs: { node: "node" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "header", 3, "ngClass"], ["mat-icon-button", "", "matTreeNodeToggle", "", 3, "click", 4, "ngIf"], [1, "node-name", 3, "click"], ["hid", "", 3, "hidden"], [1, "children"], [4, "ngFor", "ngForOf"], ["mat-icon-button", "", "matTreeNodeToggle", "", 3, "click"], [1, "mat-icon-rtl-mirror"], [3, "node"]], template: function TreeMenuItemComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2395
|
+
i0.ɵɵtemplate(0, TreeMenuItemComponent_ng_container_0_Template, 8, 7, "ng-container", 0);
|
|
2396
|
+
} if (rf & 2) {
|
|
2397
|
+
i0.ɵɵproperty("ngIf", ctx.node);
|
|
2398
|
+
} }, dependencies: [i2.NgClass, i2.NgForOf, i2.NgIf, i3.MatIconButton, i4$2.MatIcon, TreeMenuItemComponent], styles: [".header[_ngcontent-%COMP%]{cursor:pointer;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;display:flex;flex-direction:row;align-items:center}.header[_ngcontent-%COMP%] .node-name[_ngcontent-%COMP%], .header[_ngcontent-%COMP%] .mat-icon-rtl-mirror[_ngcontent-%COMP%]{color:var(--phoenix-text-color-secondary)}.header.visible[_ngcontent-%COMP%] .node-name[_ngcontent-%COMP%], .header.visible[_ngcontent-%COMP%] .mat-icon-rtl-mirror[_ngcontent-%COMP%]{color:var(--phoenix-accent)}.children[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{list-style-type:none}"] });
|
|
2399
|
+
}
|
|
2400
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TreeMenuItemComponent, [{
|
|
2401
|
+
type: Component,
|
|
2402
|
+
args: [{ selector: 'app-tree-menu-item', template: "<ng-container *ngIf=\"node\">\n <div class=\"header\" [ngClass]=\"{ visible: visible }\">\n <button\n *ngIf=\"node.children\"\n mat-icon-button\n matTreeNodeToggle\n (click)=\"isExpanded = !isExpanded\"\n >\n <mat-icon class=\"mat-icon-rtl-mirror\">\n {{ isExpanded ? 'expand_more' : 'chevron_right' }}\n </mat-icon>\n </button>\n <div (click)=\"toggleVisibility(!visible)\" class=\"node-name\">\n {{ node.name }}\n </div>\n </div>\n <ul [hidden]=\"!isExpanded\" hid>\n <div class=\"children\">\n <li *ngFor=\"let node of node.children\">\n <app-tree-menu-item [node]=\"node\"></app-tree-menu-item>\n </li>\n </div>\n </ul>\n</ng-container>\n", styles: [".header{cursor:pointer;user-select:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;display:flex;flex-direction:row;align-items:center}.header .node-name,.header .mat-icon-rtl-mirror{color:var(--phoenix-text-color-secondary)}.header.visible .node-name,.header.visible .mat-icon-rtl-mirror{color:var(--phoenix-accent)}.children li{list-style-type:none}\n"] }]
|
|
2403
|
+
}], () => [{ type: EventDisplayService }], { children: [{
|
|
2404
|
+
type: ViewChildren,
|
|
2405
|
+
args: [TreeMenuItemComponent]
|
|
2406
|
+
}], node: [{
|
|
2407
|
+
type: Input
|
|
2408
|
+
}] }); })();
|
|
2409
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TreeMenuItemComponent, { className: "TreeMenuItemComponent", filePath: "components/ui-menu/tree-menu/tree-menu-item/tree-menu-item.component.ts", lineNumber: 16 }); })();
|
|
2410
|
+
|
|
2411
|
+
class TreeMenuComponent {
|
|
2412
|
+
rootNode = {
|
|
2413
|
+
name: 'Atlas Detector',
|
|
2414
|
+
geometryId: 'AtlasDetector',
|
|
2415
|
+
children: [
|
|
2416
|
+
{
|
|
2417
|
+
name: 'Magnet systems',
|
|
2418
|
+
geometryId: 'MagnetSys',
|
|
2419
|
+
children: [
|
|
2420
|
+
{
|
|
2421
|
+
name: 'Toroids',
|
|
2422
|
+
geometryId: 'Toroids',
|
|
2423
|
+
},
|
|
2424
|
+
],
|
|
2425
|
+
},
|
|
2426
|
+
{
|
|
2427
|
+
name: 'Calorimeters',
|
|
2428
|
+
geometryId: 'CaloSys',
|
|
2429
|
+
children: [
|
|
2430
|
+
{
|
|
2431
|
+
name: 'LAr Barrel',
|
|
2432
|
+
geometryId: 'LAr Barrel',
|
|
2433
|
+
},
|
|
2434
|
+
{
|
|
2435
|
+
name: 'LAr EC1',
|
|
2436
|
+
geometryId: 'LAr EC1',
|
|
2437
|
+
},
|
|
2438
|
+
{
|
|
2439
|
+
name: 'LAr EC2',
|
|
2440
|
+
geometryId: 'LAr EC2',
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
name: 'Tile Cal',
|
|
2444
|
+
geometryId: 'Tile Cal',
|
|
2445
|
+
},
|
|
2446
|
+
],
|
|
2447
|
+
},
|
|
2448
|
+
{
|
|
2449
|
+
name: 'Inner detector',
|
|
2450
|
+
geometryId: 'InDetSys',
|
|
2451
|
+
children: [
|
|
2452
|
+
{
|
|
2453
|
+
name: 'Pixel',
|
|
2454
|
+
geometryId: 'Pixel',
|
|
2455
|
+
},
|
|
2456
|
+
{
|
|
2457
|
+
name: 'SCT',
|
|
2458
|
+
geometryId: 'SCT',
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
name: 'TRT',
|
|
2462
|
+
geometryId: 'TRT',
|
|
2463
|
+
},
|
|
2464
|
+
],
|
|
2465
|
+
},
|
|
2466
|
+
],
|
|
2467
|
+
};
|
|
2468
|
+
constructor() { }
|
|
2469
|
+
ngOnInit() { }
|
|
2470
|
+
static ɵfac = function TreeMenuComponent_Factory(t) { return new (t || TreeMenuComponent)(); };
|
|
2471
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: TreeMenuComponent, selectors: [["app-tree-menu"]], decls: 3, vars: 1, consts: [[1, "tree-wrapper"], [1, "tree-menu"], [3, "node"]], template: function TreeMenuComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2472
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
2473
|
+
i0.ɵɵelement(2, "app-tree-menu-item", 2);
|
|
2474
|
+
i0.ɵɵelementEnd()();
|
|
2475
|
+
} if (rf & 2) {
|
|
2476
|
+
i0.ɵɵadvance(2);
|
|
2477
|
+
i0.ɵɵproperty("node", ctx.rootNode);
|
|
2478
|
+
} }, dependencies: [TreeMenuItemComponent], styles: [".tree-wrapper[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;display:flex;flex-direction:column;justify-content:center;align-items:center;align-content:center}.tree-menu[_ngcontent-%COMP%]{display:flex;flex-direction:column;justify-content:center;align-items:center;align-content:center;max-height:70vh;overflow-y:scroll}.example-tree-invisible[_ngcontent-%COMP%]{display:none}.example-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .example-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}"] });
|
|
2479
|
+
}
|
|
2480
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TreeMenuComponent, [{
|
|
2481
|
+
type: Component,
|
|
2482
|
+
args: [{ selector: 'app-tree-menu', template: "<div class=\"tree-wrapper\">\n <div class=\"tree-menu\">\n <app-tree-menu-item [node]=\"rootNode\"></app-tree-menu-item>\n </div>\n</div>\n", styles: [".tree-wrapper{position:absolute;top:0;bottom:0;left:0;display:flex;flex-direction:column;justify-content:center;align-items:center;align-content:center}.tree-menu{display:flex;flex-direction:column;justify-content:center;align-items:center;align-content:center;max-height:70vh;overflow-y:scroll}.example-tree-invisible{display:none}.example-tree ul,.example-tree li{margin-top:0;margin-bottom:0;list-style-type:none}\n"] }]
|
|
2483
|
+
}], () => [], null); })();
|
|
2484
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(TreeMenuComponent, { className: "TreeMenuComponent", filePath: "components/ui-menu/tree-menu/tree-menu.component.ts", lineNumber: 9 }); })();
|
|
2485
|
+
|
|
2486
|
+
class CartesianGridConfigComponent {
|
|
2487
|
+
data;
|
|
2488
|
+
dialogRef;
|
|
2489
|
+
eventDisplay;
|
|
2490
|
+
cartesianPos = new Vector3();
|
|
2491
|
+
originChangedSub = null;
|
|
2492
|
+
stopShiftingSub = null;
|
|
2493
|
+
showCartesianGrid;
|
|
2494
|
+
gridConfig;
|
|
2495
|
+
scale;
|
|
2496
|
+
shiftGrid;
|
|
2497
|
+
constructor(data, dialogRef, eventDisplay) {
|
|
2498
|
+
this.data = data;
|
|
2499
|
+
this.dialogRef = dialogRef;
|
|
2500
|
+
this.eventDisplay = eventDisplay;
|
|
2501
|
+
}
|
|
2502
|
+
ngOnInit() {
|
|
2503
|
+
this.shiftGrid = this.eventDisplay.getThreeManager().shiftGrid;
|
|
2504
|
+
this.showCartesianGrid = this.data.gridVisible;
|
|
2505
|
+
this.scale = this.data.scale;
|
|
2506
|
+
this.gridConfig = this.eventDisplay.getUIManager().getCartesianGridConfig();
|
|
2507
|
+
this.cartesianPos = this.eventDisplay.getThreeManager().origin;
|
|
2508
|
+
}
|
|
2509
|
+
onClose() {
|
|
2510
|
+
this.dialogRef.close();
|
|
2511
|
+
}
|
|
2512
|
+
onSave(x, y, z) {
|
|
2513
|
+
this.shiftCartesianGridByValues(new Vector3(x * 10, y * 10, z * 10));
|
|
2514
|
+
}
|
|
2515
|
+
shiftCartesianGridByPointer() {
|
|
2516
|
+
this.shiftGrid = true;
|
|
2517
|
+
this.eventDisplay.getUIManager().shiftCartesianGridByPointer();
|
|
2518
|
+
this.originChangedSub = this.eventDisplay
|
|
2519
|
+
.getThreeManager()
|
|
2520
|
+
.originChanged.subscribe((intersect) => {
|
|
2521
|
+
this.translateGrid(intersect);
|
|
2522
|
+
});
|
|
2523
|
+
this.stopShiftingSub = this.eventDisplay
|
|
2524
|
+
.getThreeManager()
|
|
2525
|
+
.stopShifting.subscribe((stop) => {
|
|
2526
|
+
if (stop) {
|
|
2527
|
+
this.originChangedSub.unsubscribe();
|
|
2528
|
+
this.stopShiftingSub.unsubscribe();
|
|
2529
|
+
}
|
|
2530
|
+
});
|
|
2531
|
+
this.onClose();
|
|
2532
|
+
}
|
|
2533
|
+
shiftCartesianGridByValues(position) {
|
|
2534
|
+
this.translateGrid(position);
|
|
2535
|
+
this.eventDisplay.getThreeManager().originChangedEmit(position);
|
|
2536
|
+
}
|
|
2537
|
+
translateGrid(position) {
|
|
2538
|
+
const finalPos = position;
|
|
2539
|
+
const initialPos = this.cartesianPos;
|
|
2540
|
+
const difference = new Vector3(finalPos.x - initialPos.x, finalPos.y - initialPos.y, finalPos.z - initialPos.z);
|
|
2541
|
+
this.eventDisplay.getUIManager().translateCartesianGrid(difference.clone());
|
|
2542
|
+
this.eventDisplay
|
|
2543
|
+
.getUIManager()
|
|
2544
|
+
.translateCartesianLabels(difference.clone());
|
|
2545
|
+
this.cartesianPos = finalPos;
|
|
2546
|
+
}
|
|
2547
|
+
addXYPlanes(zDistance) {
|
|
2548
|
+
this.gridConfig.zDistance = Number(zDistance.target.value);
|
|
2549
|
+
this.callSetShowCartesianGrid();
|
|
2550
|
+
}
|
|
2551
|
+
addYZPlanes(xDistance) {
|
|
2552
|
+
this.gridConfig.xDistance = Number(xDistance.target.value);
|
|
2553
|
+
this.callSetShowCartesianGrid();
|
|
2554
|
+
}
|
|
2555
|
+
addZXPlanes(yDistance) {
|
|
2556
|
+
this.gridConfig.yDistance = Number(yDistance.target.value);
|
|
2557
|
+
this.callSetShowCartesianGrid();
|
|
2558
|
+
}
|
|
2559
|
+
changeSparsity(sparsity) {
|
|
2560
|
+
this.gridConfig.sparsity = Number(sparsity.target.value);
|
|
2561
|
+
this.callSetShowCartesianGrid();
|
|
2562
|
+
}
|
|
2563
|
+
showXYPlanes(change) {
|
|
2564
|
+
this.gridConfig.showXY = change.checked;
|
|
2565
|
+
this.callSetShowCartesianGrid();
|
|
2566
|
+
}
|
|
2567
|
+
showYZPlanes(change) {
|
|
2568
|
+
this.gridConfig.showYZ = change.checked;
|
|
2569
|
+
this.callSetShowCartesianGrid();
|
|
2570
|
+
}
|
|
2571
|
+
showZXPlanes(change) {
|
|
2572
|
+
this.gridConfig.showZX = change.checked;
|
|
2573
|
+
this.callSetShowCartesianGrid();
|
|
2574
|
+
}
|
|
2575
|
+
callSetShowCartesianGrid() {
|
|
2576
|
+
this.eventDisplay
|
|
2577
|
+
.getUIManager()
|
|
2578
|
+
.setShowCartesianGrid(this.showCartesianGrid, this.scale, this.gridConfig);
|
|
2579
|
+
}
|
|
2580
|
+
// helper function to calculate number of planes
|
|
2581
|
+
calcPlanes(dis) {
|
|
2582
|
+
return Math.max(0, 1 + 2 * Math.floor((dis * 10) / (this.scale * this.gridConfig.sparsity)));
|
|
2583
|
+
}
|
|
2584
|
+
static ɵfac = function CartesianGridConfigComponent_Factory(t) { return new (t || CartesianGridConfigComponent)(i0.ɵɵdirectiveInject(MAT_DIALOG_DATA), i0.ɵɵdirectiveInject(i1$2.MatDialogRef), i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2585
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CartesianGridConfigComponent, selectors: [["app-cartesian-grid-config"]], decls: 65, vars: 28, consts: [["xPos", ""], ["yPos", ""], ["zPos", ""], ["showXYPlanesCheckbox", ""], ["xyPlaneSlider", ""], ["showYZPlanesCheckbox", ""], ["yzPlaneSlider", ""], ["showZXPlanesCheckbox", ""], ["zxPlaneSlider", ""], ["sparsitySlider", ""], ["mat-dialog-title", ""], ["mat-dialog-content", "", 1, "container", "dialog-content"], [1, "item-config-single"], [1, "item-config-group"], ["for", "xPos", 1, "item-config-label"], ["type", "number", "placeholder", "Origin X", "name", "xPos", "id", "xPos", 1, "form-control", 3, "value"], ["for", "yPos", 1, "item-config-label"], ["type", "number", "placeholder", "Origin Y", "name", "yPos", "id", "yPos", 1, "form-control", 3, "value"], ["for", "zPos", 1, "item-config-label"], ["type", "number", "placeholder", "Origin Z", "name", "zPos", "id", "zPos", 1, "form-control", 3, "value"], ["mat-stroked-button", "", 3, "click", "disabled"], ["mat-menu-item", "", 1, "explain-button", 2, "margin", "0.5rem 0", 3, "click", "disabled"], [1, "explain-text"], ["mat-menu-item", "", 3, "click"], [3, "ngModelChange", "click", "change", "ngModel"], ["mat-menu-item", "", 1, "slider-btn", 3, "focus"], ["min", "-300", "step", "300", "thumbLabel", "", 3, "max"], ["matSliderThumb", "", 3, "input", "value"], ["min", "1", "max", "5", "step", "1", "thumbLabel", ""], ["mat-dialog-actions", "", "align", "end"], ["mat-flat-button", "", "color", "primary", "cdkFocusInitial", "", 3, "click"]], template: function CartesianGridConfigComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2586
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
2587
|
+
i0.ɵɵelementStart(0, "div")(1, "h1", 10);
|
|
2588
|
+
i0.ɵɵtext(2, "Customize Cartesian Grid");
|
|
2589
|
+
i0.ɵɵelementEnd();
|
|
2590
|
+
i0.ɵɵelementStart(3, "div", 11)(4, "div", 12)(5, "div", 13)(6, "label", 14);
|
|
2591
|
+
i0.ɵɵtext(7, "x (cm) : ");
|
|
2592
|
+
i0.ɵɵelementEnd();
|
|
2593
|
+
i0.ɵɵelement(8, "input", 15, 0);
|
|
2594
|
+
i0.ɵɵpipe(10, "number");
|
|
2595
|
+
i0.ɵɵelementEnd();
|
|
2596
|
+
i0.ɵɵelementStart(11, "div", 13)(12, "label", 16);
|
|
2597
|
+
i0.ɵɵtext(13, "y (cm) : ");
|
|
2598
|
+
i0.ɵɵelementEnd();
|
|
2599
|
+
i0.ɵɵelement(14, "input", 17, 1);
|
|
2600
|
+
i0.ɵɵpipe(16, "number");
|
|
2601
|
+
i0.ɵɵelementEnd();
|
|
2602
|
+
i0.ɵɵelementStart(17, "div", 13)(18, "label", 18);
|
|
2603
|
+
i0.ɵɵtext(19, "z (cm) : ");
|
|
2604
|
+
i0.ɵɵelementEnd();
|
|
2605
|
+
i0.ɵɵelement(20, "input", 19, 2);
|
|
2606
|
+
i0.ɵɵpipe(22, "number");
|
|
2607
|
+
i0.ɵɵelementEnd();
|
|
2608
|
+
i0.ɵɵelementStart(23, "button", 20);
|
|
2609
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_button_click_23_listener() { i0.ɵɵrestoreView(_r1); const xPos_r2 = i0.ɵɵreference(9); const yPos_r3 = i0.ɵɵreference(15); const zPos_r4 = i0.ɵɵreference(21); return i0.ɵɵresetView(ctx.onSave(xPos_r2.value, yPos_r3.value, zPos_r4.value)); });
|
|
2610
|
+
i0.ɵɵtext(24, " Save ");
|
|
2611
|
+
i0.ɵɵelementEnd();
|
|
2612
|
+
i0.ɵɵelementStart(25, "button", 21);
|
|
2613
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_button_click_25_listener($event) { i0.ɵɵrestoreView(_r1); $event.stopPropagation(); return i0.ɵɵresetView(ctx.shiftCartesianGridByPointer()); });
|
|
2614
|
+
i0.ɵɵtext(26, " Shift Cartesian Grid on click ");
|
|
2615
|
+
i0.ɵɵelementStart(27, "p", 22);
|
|
2616
|
+
i0.ɵɵtext(28, " Click on a point to shift the grid. Keep clicking at various points to continue shifting. Right click to stop. ");
|
|
2617
|
+
i0.ɵɵelementEnd()()();
|
|
2618
|
+
i0.ɵɵelementStart(29, "div")(30, "button", 23);
|
|
2619
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_button_click_30_listener() { i0.ɵɵrestoreView(_r1); const showXYPlanesCheckbox_r5 = i0.ɵɵreference(32); return i0.ɵɵresetView(showXYPlanesCheckbox_r5._inputElement.nativeElement.click()); });
|
|
2620
|
+
i0.ɵɵelementStart(31, "mat-checkbox", 24, 3);
|
|
2621
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CartesianGridConfigComponent_Template_mat_checkbox_ngModelChange_31_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.gridConfig.showXY, $event) || (ctx.gridConfig.showXY = $event); return i0.ɵɵresetView($event); });
|
|
2622
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_mat_checkbox_click_31_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function CartesianGridConfigComponent_Template_mat_checkbox_change_31_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.showXYPlanes($event)); });
|
|
2623
|
+
i0.ɵɵtext(33, "Show XY Planes ");
|
|
2624
|
+
i0.ɵɵelementEnd()();
|
|
2625
|
+
i0.ɵɵelementStart(34, "button", 25);
|
|
2626
|
+
i0.ɵɵlistener("focus", function CartesianGridConfigComponent_Template_button_focus_34_listener() { i0.ɵɵrestoreView(_r1); const xyPlaneSlider_r6 = i0.ɵɵreference(37); return i0.ɵɵresetView(xyPlaneSlider_r6.focus()); });
|
|
2627
|
+
i0.ɵɵelementStart(35, "mat-slider", 26)(36, "input", 27, 4);
|
|
2628
|
+
i0.ɵɵlistener("input", function CartesianGridConfigComponent_Template_input_input_36_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.addXYPlanes($event)); });
|
|
2629
|
+
i0.ɵɵelementEnd()();
|
|
2630
|
+
i0.ɵɵtext(38);
|
|
2631
|
+
i0.ɵɵelementEnd();
|
|
2632
|
+
i0.ɵɵelementStart(39, "button", 23);
|
|
2633
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_button_click_39_listener() { i0.ɵɵrestoreView(_r1); const showYZPlanesCheckbox_r7 = i0.ɵɵreference(41); return i0.ɵɵresetView(showYZPlanesCheckbox_r7._inputElement.nativeElement.click()); });
|
|
2634
|
+
i0.ɵɵelementStart(40, "mat-checkbox", 24, 5);
|
|
2635
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CartesianGridConfigComponent_Template_mat_checkbox_ngModelChange_40_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.gridConfig.showYZ, $event) || (ctx.gridConfig.showYZ = $event); return i0.ɵɵresetView($event); });
|
|
2636
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_mat_checkbox_click_40_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function CartesianGridConfigComponent_Template_mat_checkbox_change_40_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.showYZPlanes($event)); });
|
|
2637
|
+
i0.ɵɵtext(42, "Show YZ Planes ");
|
|
2638
|
+
i0.ɵɵelementEnd()();
|
|
2639
|
+
i0.ɵɵelementStart(43, "button", 25);
|
|
2640
|
+
i0.ɵɵlistener("focus", function CartesianGridConfigComponent_Template_button_focus_43_listener() { i0.ɵɵrestoreView(_r1); const yzPlaneSlider_r8 = i0.ɵɵreference(46); return i0.ɵɵresetView(yzPlaneSlider_r8.focus()); });
|
|
2641
|
+
i0.ɵɵelementStart(44, "mat-slider", 26)(45, "input", 27, 6);
|
|
2642
|
+
i0.ɵɵlistener("input", function CartesianGridConfigComponent_Template_input_input_45_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.addYZPlanes($event)); });
|
|
2643
|
+
i0.ɵɵelementEnd()();
|
|
2644
|
+
i0.ɵɵtext(47);
|
|
2645
|
+
i0.ɵɵelementEnd();
|
|
2646
|
+
i0.ɵɵelementStart(48, "button", 23);
|
|
2647
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_button_click_48_listener() { i0.ɵɵrestoreView(_r1); const showZXPlanesCheckbox_r9 = i0.ɵɵreference(50); return i0.ɵɵresetView(showZXPlanesCheckbox_r9._inputElement.nativeElement.click()); });
|
|
2648
|
+
i0.ɵɵelementStart(49, "mat-checkbox", 24, 7);
|
|
2649
|
+
i0.ɵɵtwoWayListener("ngModelChange", function CartesianGridConfigComponent_Template_mat_checkbox_ngModelChange_49_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.gridConfig.showZX, $event) || (ctx.gridConfig.showZX = $event); return i0.ɵɵresetView($event); });
|
|
2650
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_mat_checkbox_click_49_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function CartesianGridConfigComponent_Template_mat_checkbox_change_49_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.showZXPlanes($event)); });
|
|
2651
|
+
i0.ɵɵtext(51, "Show ZX Planes ");
|
|
2652
|
+
i0.ɵɵelementEnd()();
|
|
2653
|
+
i0.ɵɵelementStart(52, "button", 25);
|
|
2654
|
+
i0.ɵɵlistener("focus", function CartesianGridConfigComponent_Template_button_focus_52_listener() { i0.ɵɵrestoreView(_r1); const zxPlaneSlider_r10 = i0.ɵɵreference(55); return i0.ɵɵresetView(zxPlaneSlider_r10.focus()); });
|
|
2655
|
+
i0.ɵɵelementStart(53, "mat-slider", 26)(54, "input", 27, 8);
|
|
2656
|
+
i0.ɵɵlistener("input", function CartesianGridConfigComponent_Template_input_input_54_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.addZXPlanes($event)); });
|
|
2657
|
+
i0.ɵɵelementEnd()();
|
|
2658
|
+
i0.ɵɵtext(56);
|
|
2659
|
+
i0.ɵɵelementEnd();
|
|
2660
|
+
i0.ɵɵelementStart(57, "button", 25);
|
|
2661
|
+
i0.ɵɵlistener("focus", function CartesianGridConfigComponent_Template_button_focus_57_listener() { i0.ɵɵrestoreView(_r1); const sparsitySlider_r11 = i0.ɵɵreference(60); return i0.ɵɵresetView(sparsitySlider_r11.focus()); });
|
|
2662
|
+
i0.ɵɵelementStart(58, "mat-slider", 28)(59, "input", 27, 9);
|
|
2663
|
+
i0.ɵɵlistener("input", function CartesianGridConfigComponent_Template_input_input_59_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.changeSparsity($event)); });
|
|
2664
|
+
i0.ɵɵelementEnd()();
|
|
2665
|
+
i0.ɵɵtext(61);
|
|
2666
|
+
i0.ɵɵelementEnd()()();
|
|
2667
|
+
i0.ɵɵelementStart(62, "div", 29)(63, "button", 30);
|
|
2668
|
+
i0.ɵɵlistener("click", function CartesianGridConfigComponent_Template_button_click_63_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onClose()); });
|
|
2669
|
+
i0.ɵɵtext(64, " Close ");
|
|
2670
|
+
i0.ɵɵelementEnd()()();
|
|
2671
|
+
} if (rf & 2) {
|
|
2672
|
+
i0.ɵɵadvance(8);
|
|
2673
|
+
i0.ɵɵproperty("value", i0.ɵɵpipeBind2(10, 19, ctx.cartesianPos.x / 10, "1.2-2"));
|
|
2674
|
+
i0.ɵɵadvance(6);
|
|
2675
|
+
i0.ɵɵproperty("value", i0.ɵɵpipeBind2(16, 22, ctx.cartesianPos.y / 10, "1.2-2"));
|
|
2676
|
+
i0.ɵɵadvance(6);
|
|
2677
|
+
i0.ɵɵproperty("value", i0.ɵɵpipeBind2(22, 25, ctx.cartesianPos.z / 10, "1.2-2"));
|
|
2678
|
+
i0.ɵɵadvance(3);
|
|
2679
|
+
i0.ɵɵproperty("disabled", ctx.shiftGrid);
|
|
2680
|
+
i0.ɵɵadvance(2);
|
|
2681
|
+
i0.ɵɵproperty("disabled", ctx.shiftGrid);
|
|
2682
|
+
i0.ɵɵadvance(6);
|
|
2683
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.gridConfig.showXY);
|
|
2684
|
+
i0.ɵɵadvance(4);
|
|
2685
|
+
i0.ɵɵproperty("max", ctx.scale);
|
|
2686
|
+
i0.ɵɵadvance();
|
|
2687
|
+
i0.ɵɵproperty("value", ctx.gridConfig.zDistance);
|
|
2688
|
+
i0.ɵɵadvance(2);
|
|
2689
|
+
i0.ɵɵtextInterpolate1(" XY Plane (", ctx.calcPlanes(ctx.gridConfig.zDistance), ") ");
|
|
2690
|
+
i0.ɵɵadvance(2);
|
|
2691
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.gridConfig.showYZ);
|
|
2692
|
+
i0.ɵɵadvance(4);
|
|
2693
|
+
i0.ɵɵproperty("max", ctx.scale);
|
|
2694
|
+
i0.ɵɵadvance();
|
|
2695
|
+
i0.ɵɵproperty("value", ctx.gridConfig.xDistance);
|
|
2696
|
+
i0.ɵɵadvance(2);
|
|
2697
|
+
i0.ɵɵtextInterpolate1(" YZ Plane (", ctx.calcPlanes(ctx.gridConfig.xDistance), ") ");
|
|
2698
|
+
i0.ɵɵadvance(2);
|
|
2699
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.gridConfig.showZX);
|
|
2700
|
+
i0.ɵɵadvance(4);
|
|
2701
|
+
i0.ɵɵproperty("max", ctx.scale);
|
|
2702
|
+
i0.ɵɵadvance();
|
|
2703
|
+
i0.ɵɵproperty("value", ctx.gridConfig.yDistance);
|
|
2704
|
+
i0.ɵɵadvance(2);
|
|
2705
|
+
i0.ɵɵtextInterpolate1(" ZX Plane (", ctx.calcPlanes(ctx.gridConfig.yDistance), ") ");
|
|
2706
|
+
i0.ɵɵadvance(3);
|
|
2707
|
+
i0.ɵɵproperty("value", ctx.gridConfig.sparsity);
|
|
2708
|
+
i0.ɵɵadvance(2);
|
|
2709
|
+
i0.ɵɵtextInterpolate1(" Sparsity (", ctx.gridConfig.sparsity, ") ");
|
|
2710
|
+
} }, dependencies: [i1$2.MatDialogTitle, i1$2.MatDialogActions, i1$2.MatDialogContent, i3.MatButton, i4.NgControlStatus, i4.NgModel, i3$2.MatMenuItem, i2$1.MatSlider, i2$1.MatSliderThumb, i5.MatCheckbox, i2.DecimalPipe], styles: [".container[_ngcontent-%COMP%]{display:flex;flex-direction:row}.item-config-single[_ngcontent-%COMP%]{display:flex;flex-direction:column}.item-config-single[_ngcontent-%COMP%] .item-config-group[_ngcontent-%COMP%]{margin:.1rem 2rem}.item-config-single[_ngcontent-%COMP%] .item-config-group[_ngcontent-%COMP%] .item-config-label[_ngcontent-%COMP%]{display:inline;margin:1rem}.item-config-single[_ngcontent-%COMP%] .item-config-group[_ngcontent-%COMP%] .form-control[_ngcontent-%COMP%]{width:60%;display:inline}.item-config-single[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:.5rem 4rem}.item-config-single[_ngcontent-%COMP%] .explain-button[_ngcontent-%COMP%]{padding-top:1rem}.item-config-single[_ngcontent-%COMP%] .explain-text[_ngcontent-%COMP%]{width:20rem;opacity:.7;margin-top:.5rem;font-size:.9rem}"] });
|
|
2711
|
+
}
|
|
2712
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CartesianGridConfigComponent, [{
|
|
2713
|
+
type: Component,
|
|
2714
|
+
args: [{ selector: 'app-cartesian-grid-config', template: "<div>\n <h1 mat-dialog-title>Customize Cartesian Grid</h1>\n\n <div class=\"container dialog-content\" mat-dialog-content>\n <div class=\"item-config-single\">\n <div class=\"item-config-group\">\n <label class=\"item-config-label\" for=\"xPos\">x (cm) : </label>\n <input\n type=\"number\"\n placeholder=\"Origin X\"\n [value]=\"cartesianPos.x / 10 | number: '1.2-2'\"\n class=\"form-control\"\n name=\"xPos\"\n id=\"xPos\"\n #xPos\n />\n </div>\n\n <div class=\"item-config-group\">\n <label class=\"item-config-label\" for=\"yPos\">y (cm) : </label>\n <input\n type=\"number\"\n placeholder=\"Origin Y\"\n [value]=\"cartesianPos.y / 10 | number: '1.2-2'\"\n class=\"form-control\"\n name=\"yPos\"\n id=\"yPos\"\n #yPos\n />\n </div>\n\n <div class=\"item-config-group\">\n <label class=\"item-config-label\" for=\"zPos\">z (cm) : </label>\n <input\n type=\"number\"\n placeholder=\"Origin Z\"\n [value]=\"cartesianPos.z / 10 | number: '1.2-2'\"\n class=\"form-control\"\n name=\"zPos\"\n id=\"zPos\"\n #zPos\n />\n </div>\n\n <button\n mat-stroked-button\n (click)=\"onSave(xPos.value, yPos.value, zPos.value)\"\n [disabled]=\"shiftGrid\"\n >\n Save\n </button>\n\n <button\n style=\"margin: 0.5rem 0\"\n mat-menu-item\n class=\"explain-button\"\n [disabled]=\"shiftGrid\"\n (click)=\"$event.stopPropagation(); shiftCartesianGridByPointer()\"\n >\n Shift Cartesian Grid on click\n <p class=\"explain-text\">\n Click on a point to shift the grid. Keep clicking at various points to\n continue shifting. Right click to stop.\n </p>\n </button>\n </div>\n\n <div>\n <button\n mat-menu-item\n (click)=\"showXYPlanesCheckbox._inputElement.nativeElement.click()\"\n >\n <mat-checkbox\n #showXYPlanesCheckbox\n [(ngModel)]=\"gridConfig.showXY\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"showXYPlanes($event)\"\n >Show XY Planes\n </mat-checkbox>\n </button>\n <button class=\"slider-btn\" mat-menu-item (focus)=\"xyPlaneSlider.focus()\">\n <mat-slider min=\"-300\" [max]=\"scale\" step=\"300\" thumbLabel>\n <input\n #xyPlaneSlider\n matSliderThumb\n [value]=\"gridConfig.zDistance\"\n (input)=\"addXYPlanes($event)\"\n />\n </mat-slider>\n XY Plane ({{ calcPlanes(gridConfig.zDistance) }})\n </button>\n <button\n mat-menu-item\n (click)=\"showYZPlanesCheckbox._inputElement.nativeElement.click()\"\n >\n <mat-checkbox\n #showYZPlanesCheckbox\n [(ngModel)]=\"gridConfig.showYZ\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"showYZPlanes($event)\"\n >Show YZ Planes\n </mat-checkbox>\n </button>\n <button class=\"slider-btn\" mat-menu-item (focus)=\"yzPlaneSlider.focus()\">\n <mat-slider min=\"-300\" [max]=\"scale\" step=\"300\" thumbLabel>\n <input\n #yzPlaneSlider\n matSliderThumb\n [value]=\"gridConfig.xDistance\"\n (input)=\"addYZPlanes($event)\"\n />\n </mat-slider>\n YZ Plane ({{ calcPlanes(gridConfig.xDistance) }})\n </button>\n <button\n mat-menu-item\n (click)=\"showZXPlanesCheckbox._inputElement.nativeElement.click()\"\n >\n <mat-checkbox\n #showZXPlanesCheckbox\n [(ngModel)]=\"gridConfig.showZX\"\n (click)=\"$event.stopPropagation()\"\n (change)=\"showZXPlanes($event)\"\n >Show ZX Planes\n </mat-checkbox>\n </button>\n <button class=\"slider-btn\" mat-menu-item (focus)=\"zxPlaneSlider.focus()\">\n <mat-slider min=\"-300\" [max]=\"scale\" step=\"300\" thumbLabel>\n <input\n #zxPlaneSlider\n matSliderThumb\n [value]=\"gridConfig.yDistance\"\n (input)=\"addZXPlanes($event)\"\n />\n </mat-slider>\n ZX Plane ({{ calcPlanes(gridConfig.yDistance) }})\n </button>\n <button class=\"slider-btn\" mat-menu-item (focus)=\"sparsitySlider.focus()\">\n <mat-slider min=\"1\" max=\"5\" step=\"1\" thumbLabel>\n <input\n #sparsitySlider\n matSliderThumb\n [value]=\"gridConfig.sparsity\"\n (input)=\"changeSparsity($event)\"\n />\n </mat-slider>\n Sparsity ({{ gridConfig.sparsity }})\n </button>\n </div>\n </div>\n\n <div mat-dialog-actions align=\"end\">\n <button mat-flat-button color=\"primary\" (click)=\"onClose()\" cdkFocusInitial>\n Close\n </button>\n </div>\n</div>\n", styles: [".container{display:flex;flex-direction:row}.item-config-single{display:flex;flex-direction:column}.item-config-single .item-config-group{margin:.1rem 2rem}.item-config-single .item-config-group .item-config-label{display:inline;margin:1rem}.item-config-single .item-config-group .form-control{width:60%;display:inline}.item-config-single button{margin:.5rem 4rem}.item-config-single .explain-button{padding-top:1rem}.item-config-single .explain-text{width:20rem;opacity:.7;margin-top:.5rem;font-size:.9rem}\n"] }]
|
|
2715
|
+
}], () => [{ type: undefined, decorators: [{
|
|
2716
|
+
type: Inject,
|
|
2717
|
+
args: [MAT_DIALOG_DATA]
|
|
2718
|
+
}] }, { type: i1$2.MatDialogRef }, { type: EventDisplayService }], null); })();
|
|
2719
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CartesianGridConfigComponent, { className: "CartesianGridConfigComponent", filePath: "components/ui-menu/view-options/cartesian-grid-config/cartesian-grid-config.component.ts", lineNumber: 13 }); })();
|
|
2720
|
+
|
|
2721
|
+
function ViewOptionsComponent_button_29__svg_svg_1_Template(rf, ctx) { if (rf & 1) {
|
|
2722
|
+
i0.ɵɵnamespaceSVG();
|
|
2723
|
+
i0.ɵɵelementStart(0, "svg", 15);
|
|
2724
|
+
i0.ɵɵelement(1, "use");
|
|
2725
|
+
i0.ɵɵelementEnd();
|
|
2726
|
+
} if (rf & 2) {
|
|
2727
|
+
const view_r8 = i0.ɵɵnextContext().$implicit;
|
|
2728
|
+
i0.ɵɵadvance();
|
|
2729
|
+
i0.ɵɵattributeInterpolate2("href", "assets/icons/", view_r8.icon, ".svg#", view_r8.icon, "");
|
|
2730
|
+
} }
|
|
2731
|
+
function ViewOptionsComponent_button_29_Template(rf, ctx) { if (rf & 1) {
|
|
2732
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
2733
|
+
i0.ɵɵelementStart(0, "button", 11);
|
|
2734
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_button_29_Template_button_click_0_listener($event) { const view_r8 = i0.ɵɵrestoreView(_r7).$implicit; const ctx_r8 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r8.displayView($event, view_r8)); });
|
|
2735
|
+
i0.ɵɵtemplate(1, ViewOptionsComponent_button_29__svg_svg_1_Template, 2, 3, "svg", 14);
|
|
2736
|
+
i0.ɵɵtext(2);
|
|
2737
|
+
i0.ɵɵelementEnd();
|
|
2738
|
+
} if (rf & 2) {
|
|
2739
|
+
const view_r8 = ctx.$implicit;
|
|
2740
|
+
i0.ɵɵadvance();
|
|
2741
|
+
i0.ɵɵproperty("ngIf", view_r8.icon);
|
|
2742
|
+
i0.ɵɵadvance();
|
|
2743
|
+
i0.ɵɵtextInterpolate1(" ", view_r8.name, " ");
|
|
2744
|
+
} }
|
|
2745
|
+
class ViewOptionsComponent {
|
|
2746
|
+
eventDisplay;
|
|
2747
|
+
dialog;
|
|
2748
|
+
trigger;
|
|
2749
|
+
showCartesianGrid = false;
|
|
2750
|
+
scale = 3000;
|
|
2751
|
+
views;
|
|
2752
|
+
show3DPoints;
|
|
2753
|
+
origin = new Vector3(0, 0, 0);
|
|
2754
|
+
sub;
|
|
2755
|
+
constructor(eventDisplay, dialog) {
|
|
2756
|
+
this.eventDisplay = eventDisplay;
|
|
2757
|
+
this.dialog = dialog;
|
|
2758
|
+
}
|
|
2759
|
+
ngOnInit() {
|
|
2760
|
+
this.views = this.eventDisplay.getUIManager().getPresetViews();
|
|
2761
|
+
this.sub = this.eventDisplay
|
|
2762
|
+
.getThreeManager()
|
|
2763
|
+
.originChanged.subscribe((intersect) => {
|
|
2764
|
+
this.origin = intersect;
|
|
2765
|
+
});
|
|
2766
|
+
}
|
|
2767
|
+
openCartesianGridConfigDialog() {
|
|
2768
|
+
this.dialog.open(CartesianGridConfigComponent, {
|
|
2769
|
+
data: {
|
|
2770
|
+
gridVisible: this.showCartesianGrid,
|
|
2771
|
+
scale: this.scale,
|
|
2772
|
+
},
|
|
2773
|
+
position: {
|
|
2774
|
+
bottom: '5rem',
|
|
2775
|
+
left: '3rem',
|
|
2776
|
+
},
|
|
2777
|
+
});
|
|
2778
|
+
}
|
|
2779
|
+
displayView($event, view) {
|
|
2780
|
+
$event.stopPropagation();
|
|
2781
|
+
this.eventDisplay.getUIManager().displayView(view);
|
|
2782
|
+
}
|
|
2783
|
+
setAxis(change) {
|
|
2784
|
+
const value = change.checked;
|
|
2785
|
+
this.eventDisplay.getUIManager().setShowAxis(value);
|
|
2786
|
+
}
|
|
2787
|
+
setEtaPhiGrid(change) {
|
|
2788
|
+
const value = change.checked;
|
|
2789
|
+
this.eventDisplay.getUIManager().setShowEtaPhiGrid(value);
|
|
2790
|
+
}
|
|
2791
|
+
setCartesianGrid(change) {
|
|
2792
|
+
this.showCartesianGrid = change.checked;
|
|
2793
|
+
this.eventDisplay
|
|
2794
|
+
.getUIManager()
|
|
2795
|
+
.setShowCartesianGrid(this.showCartesianGrid, this.scale);
|
|
2796
|
+
}
|
|
2797
|
+
showLabels(change) {
|
|
2798
|
+
this.eventDisplay.getUIManager().showLabels(change.checked);
|
|
2799
|
+
}
|
|
2800
|
+
show3DMousePoints(change) {
|
|
2801
|
+
this.show3DPoints = change.checked;
|
|
2802
|
+
this.eventDisplay.getUIManager().show3DMousePoints(this.show3DPoints);
|
|
2803
|
+
}
|
|
2804
|
+
toggleShowDistance(change) {
|
|
2805
|
+
this.trigger.closeMenu();
|
|
2806
|
+
this.eventDisplay.getUIManager().show3DDistance(change.checked);
|
|
2807
|
+
}
|
|
2808
|
+
ngOnDestroy() {
|
|
2809
|
+
this.sub.unsubscribe();
|
|
2810
|
+
}
|
|
2811
|
+
static ɵfac = function ViewOptionsComponent_Factory(t) { return new (t || ViewOptionsComponent)(i0.ɵɵdirectiveInject(EventDisplayService), i0.ɵɵdirectiveInject(i1$2.MatDialog)); };
|
|
2812
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ViewOptionsComponent, selectors: [["app-view-options"]], viewQuery: function ViewOptionsComponent_Query(rf, ctx) { if (rf & 1) {
|
|
2813
|
+
i0.ɵɵviewQuery(MatMenuTrigger, 5);
|
|
2814
|
+
} if (rf & 2) {
|
|
2815
|
+
let _t;
|
|
2816
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.trigger = _t.first);
|
|
2817
|
+
} }, decls: 31, vars: 3, consts: [["viewOptions", ""], ["showCartesianGridCheckbox", ""], ["showEtaPhiGridCheckbox", ""], ["showAxisCheckbox", ""], ["showLabelsCheckbox", ""], ["showMouse3DPointsCheckbox", ""], ["show3DDistanceCheckbox", ""], ["mat-menu-item", ""], [3, "click", "change"], [1, "icon-wrapper", "icon-button", "btn-blank", "item-settings", 3, "click"], ["href", "assets/icons/gear.svg#gear"], ["mat-menu-item", "", 3, "click"], ["mat-menu-item", "", 3, "click", 4, "ngFor", "ngForOf"], ["tooltip", "View options and Tools", "icon", "views", 3, "matMenuTriggerFor", "active"], ["class", "view-icon", 4, "ngIf"], [1, "view-icon"]], template: function ViewOptionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2818
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
2819
|
+
i0.ɵɵelementStart(0, "mat-menu", null, 0)(2, "button", 7)(3, "mat-checkbox", 8, 1);
|
|
2820
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_mat_checkbox_click_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function ViewOptionsComponent_Template_mat_checkbox_change_3_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setCartesianGrid($event)); });
|
|
2821
|
+
i0.ɵɵtext(5, "Show Cartesian Grid ");
|
|
2822
|
+
i0.ɵɵelementEnd();
|
|
2823
|
+
i0.ɵɵelementStart(6, "button", 9);
|
|
2824
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_button_click_6_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.openCartesianGridConfigDialog()); });
|
|
2825
|
+
i0.ɵɵnamespaceSVG();
|
|
2826
|
+
i0.ɵɵelementStart(7, "svg");
|
|
2827
|
+
i0.ɵɵelement(8, "use", 10);
|
|
2828
|
+
i0.ɵɵelementEnd()()();
|
|
2829
|
+
i0.ɵɵnamespaceHTML();
|
|
2830
|
+
i0.ɵɵelementStart(9, "button", 11);
|
|
2831
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_button_click_9_listener($event) { i0.ɵɵrestoreView(_r1); const showEtaPhiGridCheckbox_r2 = i0.ɵɵreference(11); $event.stopPropagation(); return i0.ɵɵresetView(showEtaPhiGridCheckbox_r2._inputElement.nativeElement.click()); });
|
|
2832
|
+
i0.ɵɵelementStart(10, "mat-checkbox", 8, 2);
|
|
2833
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_mat_checkbox_click_10_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function ViewOptionsComponent_Template_mat_checkbox_change_10_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setEtaPhiGrid($event)); });
|
|
2834
|
+
i0.ɵɵtext(12, "Show Eta Phi Grid ");
|
|
2835
|
+
i0.ɵɵelementEnd()();
|
|
2836
|
+
i0.ɵɵelementStart(13, "button", 11);
|
|
2837
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_button_click_13_listener($event) { i0.ɵɵrestoreView(_r1); const showAxisCheckbox_r3 = i0.ɵɵreference(15); $event.stopPropagation(); return i0.ɵɵresetView(showAxisCheckbox_r3._inputElement.nativeElement.click()); });
|
|
2838
|
+
i0.ɵɵelementStart(14, "mat-checkbox", 8, 3);
|
|
2839
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_mat_checkbox_click_14_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function ViewOptionsComponent_Template_mat_checkbox_change_14_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setAxis($event)); });
|
|
2840
|
+
i0.ɵɵtext(16, "Show Axis ");
|
|
2841
|
+
i0.ɵɵelementEnd()();
|
|
2842
|
+
i0.ɵɵelementStart(17, "button", 11);
|
|
2843
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_button_click_17_listener() { i0.ɵɵrestoreView(_r1); const showLabelsCheckbox_r4 = i0.ɵɵreference(19); return i0.ɵɵresetView(showLabelsCheckbox_r4._inputElement.nativeElement.click()); });
|
|
2844
|
+
i0.ɵɵelementStart(18, "mat-checkbox", 8, 4);
|
|
2845
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_mat_checkbox_click_18_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function ViewOptionsComponent_Template_mat_checkbox_change_18_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.showLabels($event)); });
|
|
2846
|
+
i0.ɵɵtext(20, "Show Labels ");
|
|
2847
|
+
i0.ɵɵelementEnd()();
|
|
2848
|
+
i0.ɵɵelementStart(21, "button", 11);
|
|
2849
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_button_click_21_listener($event) { i0.ɵɵrestoreView(_r1); const showMouse3DPointsCheckbox_r5 = i0.ɵɵreference(23); $event.stopPropagation(); return i0.ɵɵresetView(showMouse3DPointsCheckbox_r5._inputElement.nativeElement.click()); });
|
|
2850
|
+
i0.ɵɵelementStart(22, "mat-checkbox", 8, 5);
|
|
2851
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_mat_checkbox_click_22_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function ViewOptionsComponent_Template_mat_checkbox_change_22_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.show3DMousePoints($event)); });
|
|
2852
|
+
i0.ɵɵtext(24, "Show 3D Coordinates ");
|
|
2853
|
+
i0.ɵɵelementEnd()();
|
|
2854
|
+
i0.ɵɵelementStart(25, "button", 11);
|
|
2855
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_button_click_25_listener($event) { i0.ɵɵrestoreView(_r1); const show3DDistanceCheckbox_r6 = i0.ɵɵreference(27); $event.stopPropagation(); return i0.ɵɵresetView(show3DDistanceCheckbox_r6._inputElement.nativeElement.click()); });
|
|
2856
|
+
i0.ɵɵelementStart(26, "mat-checkbox", 8, 6);
|
|
2857
|
+
i0.ɵɵlistener("click", function ViewOptionsComponent_Template_mat_checkbox_click_26_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); })("change", function ViewOptionsComponent_Template_mat_checkbox_change_26_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.toggleShowDistance($event)); });
|
|
2858
|
+
i0.ɵɵtext(28, "Show 3D Distance ");
|
|
2859
|
+
i0.ɵɵelementEnd()();
|
|
2860
|
+
i0.ɵɵtemplate(29, ViewOptionsComponent_button_29_Template, 3, 2, "button", 12);
|
|
2861
|
+
i0.ɵɵelementEnd();
|
|
2862
|
+
i0.ɵɵelement(30, "app-menu-toggle", 13);
|
|
2863
|
+
} if (rf & 2) {
|
|
2864
|
+
const viewOptions_r10 = i0.ɵɵreference(1);
|
|
2865
|
+
i0.ɵɵadvance(29);
|
|
2866
|
+
i0.ɵɵproperty("ngForOf", ctx.views);
|
|
2867
|
+
i0.ɵɵadvance();
|
|
2868
|
+
i0.ɵɵproperty("matMenuTriggerFor", viewOptions_r10)("active", false);
|
|
2869
|
+
} }, dependencies: [i2.NgForOf, i2.NgIf, i3$2.MatMenu, i3$2.MatMenuItem, i3$2.MatMenuTrigger, i5.MatCheckbox, MenuToggleComponent], styles: [".view-icon[_ngcontent-%COMP%]{width:1.2rem;height:1.2rem;margin-right:.5rem}.icon-wrapper[_ngcontent-%COMP%]{display:inline-block;width:1.5rem;height:1.5rem;padding:.23rem;transition:all .4s;transform:translateY(27%)}.icon-wrapper.icon-button[_ngcontent-%COMP%]:hover{background:var(--phoenix-options-icon-bg);border-radius:40%;cursor:pointer}.icon-wrapper[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{width:100%;height:100%;vertical-align:top}.item-settings[_ngcontent-%COMP%]{margin-right:.2rem;margin-left:.5rem}"] });
|
|
2870
|
+
}
|
|
2871
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ViewOptionsComponent, [{
|
|
2872
|
+
type: Component,
|
|
2873
|
+
args: [{ selector: 'app-view-options', template: "<mat-menu #viewOptions>\n <button mat-menu-item>\n <mat-checkbox\n #showCartesianGridCheckbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"setCartesianGrid($event)\"\n >Show Cartesian Grid\n </mat-checkbox>\n <button\n class=\"icon-wrapper icon-button btn-blank item-settings\"\n (click)=\"openCartesianGridConfigDialog()\"\n >\n <svg>\n <use href=\"assets/icons/gear.svg#gear\"></use>\n </svg>\n </button>\n </button>\n <button\n mat-menu-item\n (click)=\"\n $event.stopPropagation();\n showEtaPhiGridCheckbox._inputElement.nativeElement.click()\n \"\n >\n <mat-checkbox\n #showEtaPhiGridCheckbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"setEtaPhiGrid($event)\"\n >Show Eta Phi Grid\n </mat-checkbox>\n </button>\n <button\n mat-menu-item\n (click)=\"\n $event.stopPropagation();\n showAxisCheckbox._inputElement.nativeElement.click()\n \"\n >\n <mat-checkbox\n #showAxisCheckbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"setAxis($event)\"\n >Show Axis\n </mat-checkbox>\n </button>\n <button\n mat-menu-item\n (click)=\"showLabelsCheckbox._inputElement.nativeElement.click()\"\n >\n <mat-checkbox\n #showLabelsCheckbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"showLabels($event)\"\n >Show Labels\n </mat-checkbox>\n </button>\n <button\n mat-menu-item\n (click)=\"\n $event.stopPropagation();\n showMouse3DPointsCheckbox._inputElement.nativeElement.click()\n \"\n >\n <mat-checkbox\n #showMouse3DPointsCheckbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"show3DMousePoints($event)\"\n >Show 3D Coordinates\n </mat-checkbox>\n </button>\n <button\n mat-menu-item\n (click)=\"\n $event.stopPropagation();\n show3DDistanceCheckbox._inputElement.nativeElement.click()\n \"\n >\n <mat-checkbox\n #show3DDistanceCheckbox\n (click)=\"$event.stopPropagation()\"\n (change)=\"toggleShowDistance($event)\"\n >Show 3D Distance\n </mat-checkbox>\n </button>\n <button\n mat-menu-item\n *ngFor=\"let view of views\"\n (click)=\"displayView($event, view)\"\n >\n <svg class=\"view-icon\" *ngIf=\"view.icon\">\n <use attr.href=\"assets/icons/{{ view.icon }}.svg#{{ view.icon }}\"></use>\n </svg>\n {{ view.name }}\n </button>\n</mat-menu>\n\n<app-menu-toggle\n [matMenuTriggerFor]=\"viewOptions\"\n tooltip=\"View options and Tools\"\n icon=\"views\"\n [active]=\"false\"\n>\n</app-menu-toggle>\n", styles: [".view-icon{width:1.2rem;height:1.2rem;margin-right:.5rem}.icon-wrapper{display:inline-block;width:1.5rem;height:1.5rem;padding:.23rem;transition:all .4s;transform:translateY(27%)}.icon-wrapper.icon-button:hover{background:var(--phoenix-options-icon-bg);border-radius:40%;cursor:pointer}.icon-wrapper svg{width:100%;height:100%;vertical-align:top}.item-settings{margin-right:.2rem;margin-left:.5rem}\n"] }]
|
|
2874
|
+
}], () => [{ type: EventDisplayService }, { type: i1$2.MatDialog }], { trigger: [{
|
|
2875
|
+
type: ViewChild,
|
|
2876
|
+
args: [MatMenuTrigger]
|
|
2877
|
+
}] }); })();
|
|
2878
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ViewOptionsComponent, { className: "ViewOptionsComponent", filePath: "components/ui-menu/view-options/view-options.component.ts", lineNumber: 16 }); })();
|
|
2879
|
+
|
|
2880
|
+
class VrToggleComponent {
|
|
2881
|
+
eventDisplay;
|
|
2882
|
+
vrSupported = false;
|
|
2883
|
+
vrActive = false;
|
|
2884
|
+
constructor(eventDisplay) {
|
|
2885
|
+
this.eventDisplay = eventDisplay;
|
|
2886
|
+
// NOTE: WebXR needs secure HTTPS context
|
|
2887
|
+
// Query for permissions of XR before using it (not supported by browsers yet). See https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query
|
|
2888
|
+
navigator?.xr
|
|
2889
|
+
?.isSessionSupported?.(VRManager.SESSION_TYPE)
|
|
2890
|
+
.then((supported) => {
|
|
2891
|
+
if (supported) {
|
|
2892
|
+
this.vrSupported = true;
|
|
2893
|
+
}
|
|
2894
|
+
})
|
|
2895
|
+
.catch((err) => console.warn('Error in VR', err));
|
|
2896
|
+
}
|
|
2897
|
+
toggleVr() {
|
|
2898
|
+
// If toggling VR on
|
|
2899
|
+
if (!this.vrActive) {
|
|
2900
|
+
this.eventDisplay.initXR(XRSessionType.VR, () => {
|
|
2901
|
+
this.vrActive = false;
|
|
2902
|
+
// Disable renderer XR and remove animation loop
|
|
2903
|
+
this.eventDisplay.endXR(XRSessionType.VR);
|
|
2904
|
+
});
|
|
2905
|
+
this.vrActive = true;
|
|
2906
|
+
}
|
|
2907
|
+
else {
|
|
2908
|
+
this.eventDisplay.endXR(XRSessionType.VR);
|
|
2909
|
+
this.vrActive = false;
|
|
2910
|
+
}
|
|
2911
|
+
}
|
|
2912
|
+
static ɵfac = function VrToggleComponent_Factory(t) { return new (t || VrToggleComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2913
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: VrToggleComponent, selectors: [["app-vr-toggle"]], decls: 1, vars: 3, consts: [["icon", "vr", 3, "click", "disabled", "active", "tooltip"]], template: function VrToggleComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2914
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
2915
|
+
i0.ɵɵlistener("click", function VrToggleComponent_Template_app_menu_toggle_click_0_listener() { return ctx.vrSupported && ctx.toggleVr(); });
|
|
2916
|
+
i0.ɵɵelementEnd();
|
|
2917
|
+
} if (rf & 2) {
|
|
2918
|
+
i0.ɵɵproperty("disabled", !ctx.vrSupported)("active", ctx.vrActive)("tooltip", ctx.vrSupported ? ctx.vrActive ? "Exit VR" : "Enter VR" : "VR not supported");
|
|
2919
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
2920
|
+
}
|
|
2921
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(VrToggleComponent, [{
|
|
2922
|
+
type: Component,
|
|
2923
|
+
args: [{ selector: 'app-vr-toggle', template: "<app-menu-toggle\n [disabled]=\"!vrSupported\"\n [active]=\"vrActive\"\n icon=\"vr\"\n (click)=\"vrSupported && toggleVr()\"\n [tooltip]=\"\n vrSupported ? (vrActive ? 'Exit VR' : 'Enter VR') : 'VR not supported'\n \"\n>\n</app-menu-toggle>\n" }]
|
|
2924
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
2925
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(VrToggleComponent, { className: "VrToggleComponent", filePath: "components/ui-menu/vr-toggle/vr-toggle.component.ts", lineNumber: 10 }); })();
|
|
2926
|
+
|
|
2927
|
+
function ArToggleComponent_ng_container_2_Template(rf, ctx) { if (rf & 1) {
|
|
2928
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
2929
|
+
i0.ɵɵelementContainerStart(0);
|
|
2930
|
+
i0.ɵɵelementStart(1, "button", 4);
|
|
2931
|
+
i0.ɵɵlistener("click", function ArToggleComponent_ng_container_2_Template_button_click_1_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleAr(true)); });
|
|
2932
|
+
i0.ɵɵtext(2, "AR with overlays");
|
|
2933
|
+
i0.ɵɵelementEnd();
|
|
2934
|
+
i0.ɵɵelementStart(3, "button", 4);
|
|
2935
|
+
i0.ɵɵlistener("click", function ArToggleComponent_ng_container_2_Template_button_click_3_listener() { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.toggleAr(false)); });
|
|
2936
|
+
i0.ɵɵtext(4, "AR without overlays");
|
|
2937
|
+
i0.ɵɵelementEnd();
|
|
2938
|
+
i0.ɵɵelementContainerEnd();
|
|
2939
|
+
} }
|
|
2940
|
+
function ArToggleComponent_button_3_Template(rf, ctx) { if (rf & 1) {
|
|
2941
|
+
i0.ɵɵelementStart(0, "button", 5);
|
|
2942
|
+
i0.ɵɵtext(1, "AR not supported");
|
|
2943
|
+
i0.ɵɵelementEnd();
|
|
2944
|
+
} }
|
|
2945
|
+
class ArToggleComponent {
|
|
2946
|
+
eventDisplay;
|
|
2947
|
+
arSupported = false;
|
|
2948
|
+
arActive = false;
|
|
2949
|
+
constructor(eventDisplay) {
|
|
2950
|
+
this.eventDisplay = eventDisplay;
|
|
2951
|
+
// NOTE: WebXR needs secure HTTPS context
|
|
2952
|
+
// Query for permissions of XR before using it (not supported by browsers yet). See https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query
|
|
2953
|
+
navigator.xr
|
|
2954
|
+
?.isSessionSupported?.(ARManager.SESSION_TYPE)
|
|
2955
|
+
.then((supported) => {
|
|
2956
|
+
if (supported) {
|
|
2957
|
+
this.arSupported = true;
|
|
2958
|
+
}
|
|
2959
|
+
})
|
|
2960
|
+
.catch((err) => console.warn('Error in AR', err));
|
|
2961
|
+
}
|
|
2962
|
+
toggleAr(enableDomOverlay = true) {
|
|
2963
|
+
ARManager.enableDomOverlay = enableDomOverlay;
|
|
2964
|
+
// If toggling AR on
|
|
2965
|
+
if (!this.arActive) {
|
|
2966
|
+
this.eventDisplay.initXR(XRSessionType.AR, () => {
|
|
2967
|
+
this.arActive = false;
|
|
2968
|
+
// Disable renderer XR and remove animation loop
|
|
2969
|
+
this.eventDisplay.endXR(XRSessionType.AR);
|
|
2970
|
+
});
|
|
2971
|
+
this.arActive = true;
|
|
2972
|
+
}
|
|
2973
|
+
else {
|
|
2974
|
+
this.eventDisplay.endXR(XRSessionType.AR);
|
|
2975
|
+
this.arActive = false;
|
|
2976
|
+
}
|
|
2977
|
+
}
|
|
2978
|
+
static ɵfac = function ArToggleComponent_Factory(t) { return new (t || ArToggleComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
2979
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ArToggleComponent, selectors: [["app-ar-toggle"]], decls: 5, vars: 6, consts: [["arToggleOptions", ""], [4, "ngIf"], ["mat-menu-item", "", "disabled", "", 4, "ngIf"], ["icon", "ar", 3, "click", "matMenuTriggerFor", "disabled", "active", "tooltip"], ["mat-menu-item", "", 3, "click"], ["mat-menu-item", "", "disabled", ""]], template: function ArToggleComponent_Template(rf, ctx) { if (rf & 1) {
|
|
2980
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
2981
|
+
i0.ɵɵelementStart(0, "mat-menu", null, 0);
|
|
2982
|
+
i0.ɵɵtemplate(2, ArToggleComponent_ng_container_2_Template, 5, 0, "ng-container", 1)(3, ArToggleComponent_button_3_Template, 2, 0, "button", 2);
|
|
2983
|
+
i0.ɵɵelementEnd();
|
|
2984
|
+
i0.ɵɵelementStart(4, "app-menu-toggle", 3);
|
|
2985
|
+
i0.ɵɵlistener("click", function ArToggleComponent_Template_app_menu_toggle_click_4_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.arSupported && (ctx.arActive ? ctx.toggleAr() : null)); });
|
|
2986
|
+
i0.ɵɵelementEnd();
|
|
2987
|
+
} if (rf & 2) {
|
|
2988
|
+
const arToggleOptions_r4 = i0.ɵɵreference(1);
|
|
2989
|
+
i0.ɵɵadvance(2);
|
|
2990
|
+
i0.ɵɵproperty("ngIf", ctx.arSupported);
|
|
2991
|
+
i0.ɵɵadvance();
|
|
2992
|
+
i0.ɵɵproperty("ngIf", !ctx.arSupported);
|
|
2993
|
+
i0.ɵɵadvance();
|
|
2994
|
+
i0.ɵɵproperty("matMenuTriggerFor", arToggleOptions_r4)("disabled", !ctx.arSupported)("active", ctx.arActive)("tooltip", ctx.arSupported ? ctx.arActive ? "Exit AR" : "Enter AR" : "AR not supported");
|
|
2995
|
+
} }, dependencies: [i2.NgIf, i3$2.MatMenu, i3$2.MatMenuItem, i3$2.MatMenuTrigger, MenuToggleComponent] });
|
|
2996
|
+
}
|
|
2997
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ArToggleComponent, [{
|
|
2998
|
+
type: Component,
|
|
2999
|
+
args: [{ selector: 'app-ar-toggle', template: "<mat-menu #arToggleOptions>\n <ng-container *ngIf=\"arSupported\">\n <button mat-menu-item (click)=\"toggleAr(true)\">AR with overlays</button>\n <button mat-menu-item (click)=\"toggleAr(false)\">AR without overlays</button>\n </ng-container>\n <button *ngIf=\"!arSupported\" mat-menu-item disabled>AR not supported</button>\n</mat-menu>\n\n<app-menu-toggle\n [matMenuTriggerFor]=\"arToggleOptions\"\n (click)=\"arSupported && (arActive ? toggleAr() : null)\"\n [disabled]=\"!arSupported\"\n [active]=\"arActive\"\n icon=\"ar\"\n [tooltip]=\"\n arSupported ? (arActive ? 'Exit AR' : 'Enter AR') : 'AR not supported'\n \"\n>\n</app-menu-toggle>\n" }]
|
|
3000
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
3001
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ArToggleComponent, { className: "ArToggleComponent", filePath: "components/ui-menu/ar-toggle/ar-toggle.component.ts", lineNumber: 10 }); })();
|
|
3002
|
+
|
|
3003
|
+
/**
|
|
3004
|
+
* Component for adding zoom controls for the main and overlay cameras.
|
|
3005
|
+
*/
|
|
3006
|
+
class ZoomControlsComponent {
|
|
3007
|
+
eventDisplay;
|
|
3008
|
+
/** All camera being used by the scene. */
|
|
3009
|
+
allCameras;
|
|
3010
|
+
/** Factor to zoom by. */
|
|
3011
|
+
zoomFactor = 1.1;
|
|
3012
|
+
/** Timeout for clearing mouse hold. */
|
|
3013
|
+
zoomTimeout;
|
|
3014
|
+
/** The speed and time of zoom. */
|
|
3015
|
+
zoomTime = 200;
|
|
3016
|
+
constructor(eventDisplay) {
|
|
3017
|
+
this.eventDisplay = eventDisplay;
|
|
3018
|
+
}
|
|
3019
|
+
/**
|
|
3020
|
+
* Zoom all the cameras by a specific zoom factor.
|
|
3021
|
+
* The factor may either be greater (zoom in) or smaller (zoom out) than 1.
|
|
3022
|
+
* @param zoomFactor The factor to zoom by.
|
|
3023
|
+
*/
|
|
3024
|
+
zoomTo(zoomFactor) {
|
|
3025
|
+
this.zoomTime =
|
|
3026
|
+
this.zoomTime > 30 ? Math.floor(this.zoomTime / 1.1) : this.zoomTime;
|
|
3027
|
+
this.eventDisplay.zoomTo(zoomFactor, this.zoomTime);
|
|
3028
|
+
this.zoomTimeout = setTimeout(() => {
|
|
3029
|
+
this.zoomTo(zoomFactor);
|
|
3030
|
+
}, this.zoomTime);
|
|
3031
|
+
}
|
|
3032
|
+
/**
|
|
3033
|
+
* Zoom the camera in.
|
|
3034
|
+
* @param leftClick Whether the mouse click is left or not.
|
|
3035
|
+
*/
|
|
3036
|
+
zoomIn(leftClick) {
|
|
3037
|
+
if (leftClick) {
|
|
3038
|
+
this.zoomTo(1 / this.zoomFactor);
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
/**
|
|
3042
|
+
* Zoom the camera out.
|
|
3043
|
+
* @param leftClick Whether the mouse click is left or not.s
|
|
3044
|
+
*/
|
|
3045
|
+
zoomOut(leftClick) {
|
|
3046
|
+
if (leftClick) {
|
|
3047
|
+
this.zoomTo(this.zoomFactor);
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
/**
|
|
3051
|
+
* Reset the zoom time which decreases upon hold and clear the zoom timeout.
|
|
3052
|
+
*/
|
|
3053
|
+
clearZoom() {
|
|
3054
|
+
this.zoomTime = 200;
|
|
3055
|
+
clearTimeout(this.zoomTimeout);
|
|
3056
|
+
}
|
|
3057
|
+
static ɵfac = function ZoomControlsComponent_Factory(t) { return new (t || ZoomControlsComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
3058
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ZoomControlsComponent, selectors: [["app-zoom-controls"]], decls: 3, vars: 2, consts: [[1, "d-flex"], ["tooltip", "Zoom out (hold)", "icon", "zoom-out", 3, "click", "touchstart", "mousedown", "mouseup", "mouseleave", "touchend", "touchcancel", "touchmove", "active"], ["tooltip", "Zoom in (hold)", "icon", "zoom-in", 3, "click", "touchstart", "mousedown", "mouseup", "mouseleave", "touchend", "touchcancel", "touchmove", "active"]], template: function ZoomControlsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3059
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "app-menu-toggle", 1);
|
|
3060
|
+
i0.ɵɵlistener("click", function ZoomControlsComponent_Template_app_menu_toggle_click_1_listener() { ctx.zoomOut(true); return ctx.clearZoom(); })("touchstart", function ZoomControlsComponent_Template_app_menu_toggle_touchstart_1_listener() { return ctx.zoomOut(true); })("mousedown", function ZoomControlsComponent_Template_app_menu_toggle_mousedown_1_listener($event) { return ctx.zoomOut($event.button === 0); })("mouseup", function ZoomControlsComponent_Template_app_menu_toggle_mouseup_1_listener() { return ctx.clearZoom(); })("mouseleave", function ZoomControlsComponent_Template_app_menu_toggle_mouseleave_1_listener() { return ctx.clearZoom(); })("touchend", function ZoomControlsComponent_Template_app_menu_toggle_touchend_1_listener() { return ctx.clearZoom(); })("touchcancel", function ZoomControlsComponent_Template_app_menu_toggle_touchcancel_1_listener() { return ctx.clearZoom(); })("touchmove", function ZoomControlsComponent_Template_app_menu_toggle_touchmove_1_listener() { return ctx.clearZoom(); });
|
|
3061
|
+
i0.ɵɵelementEnd();
|
|
3062
|
+
i0.ɵɵelementStart(2, "app-menu-toggle", 2);
|
|
3063
|
+
i0.ɵɵlistener("click", function ZoomControlsComponent_Template_app_menu_toggle_click_2_listener() { ctx.zoomIn(true); return ctx.clearZoom(); })("touchstart", function ZoomControlsComponent_Template_app_menu_toggle_touchstart_2_listener() { return ctx.zoomIn(true); })("mousedown", function ZoomControlsComponent_Template_app_menu_toggle_mousedown_2_listener($event) { return ctx.zoomIn($event.button === 0); })("mouseup", function ZoomControlsComponent_Template_app_menu_toggle_mouseup_2_listener() { return ctx.clearZoom(); })("mouseleave", function ZoomControlsComponent_Template_app_menu_toggle_mouseleave_2_listener() { return ctx.clearZoom(); })("touchend", function ZoomControlsComponent_Template_app_menu_toggle_touchend_2_listener() { return ctx.clearZoom(); })("touchcancel", function ZoomControlsComponent_Template_app_menu_toggle_touchcancel_2_listener() { return ctx.clearZoom(); })("touchmove", function ZoomControlsComponent_Template_app_menu_toggle_touchmove_2_listener() { return ctx.clearZoom(); });
|
|
3064
|
+
i0.ɵɵelementEnd()();
|
|
3065
|
+
} if (rf & 2) {
|
|
3066
|
+
i0.ɵɵadvance();
|
|
3067
|
+
i0.ɵɵproperty("active", false);
|
|
3068
|
+
i0.ɵɵadvance();
|
|
3069
|
+
i0.ɵɵproperty("active", false);
|
|
3070
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
3071
|
+
}
|
|
3072
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ZoomControlsComponent, [{
|
|
3073
|
+
type: Component,
|
|
3074
|
+
args: [{ selector: 'app-zoom-controls', template: "<div class=\"d-flex\">\n <app-menu-toggle\n tooltip=\"Zoom out (hold)\"\n icon=\"zoom-out\"\n [active]=\"false\"\n (click)=\"zoomOut(true); clearZoom()\"\n (touchstart)=\"zoomOut(true)\"\n (mousedown)=\"zoomOut($event.button === 0)\"\n (mouseup)=\"clearZoom()\"\n (mouseleave)=\"clearZoom()\"\n (touchend)=\"clearZoom()\"\n (touchcancel)=\"clearZoom()\"\n (touchmove)=\"clearZoom()\"\n >\n </app-menu-toggle>\n <app-menu-toggle\n tooltip=\"Zoom in (hold)\"\n icon=\"zoom-in\"\n [active]=\"false\"\n (click)=\"zoomIn(true); clearZoom()\"\n (touchstart)=\"zoomIn(true)\"\n (mousedown)=\"zoomIn($event.button === 0)\"\n (mouseup)=\"clearZoom()\"\n (mouseleave)=\"clearZoom()\"\n (touchend)=\"clearZoom()\"\n (touchcancel)=\"clearZoom()\"\n (touchmove)=\"clearZoom()\"\n >\n </app-menu-toggle>\n</div>\n" }]
|
|
3075
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
3076
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ZoomControlsComponent, { className: "ZoomControlsComponent", filePath: "components/ui-menu/zoom-controls/zoom-controls.component.ts", lineNumber: 12 }); })();
|
|
3077
|
+
|
|
3078
|
+
class SSModeComponent {
|
|
3079
|
+
ssMode = false;
|
|
3080
|
+
ngOnInit() {
|
|
3081
|
+
document.onfullscreenchange = () => {
|
|
3082
|
+
if (!document.fullscreenElement) {
|
|
3083
|
+
this.toggleSSMode();
|
|
3084
|
+
}
|
|
3085
|
+
};
|
|
3086
|
+
}
|
|
3087
|
+
toggleSSMode() {
|
|
3088
|
+
this.ssMode = !this.ssMode;
|
|
3089
|
+
document.body.classList.toggle('ss-mode');
|
|
3090
|
+
if (this.ssMode) {
|
|
3091
|
+
// WORKAROUND - Adding the event listener directly somehow calls it on the first click
|
|
3092
|
+
setTimeout(() => {
|
|
3093
|
+
document.addEventListener('click', this.onDocumentClick);
|
|
3094
|
+
document.addEventListener('touchstart', this.onDocumentClick);
|
|
3095
|
+
}, 1);
|
|
3096
|
+
document.documentElement.requestFullscreen?.();
|
|
3097
|
+
}
|
|
3098
|
+
else {
|
|
3099
|
+
document.removeEventListener('click', this.onDocumentClick);
|
|
3100
|
+
document.removeEventListener('touchstart', this.onDocumentClick);
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
onDocumentClick = () => {
|
|
3104
|
+
document.exitFullscreen?.();
|
|
3105
|
+
};
|
|
3106
|
+
static ɵfac = function SSModeComponent_Factory(t) { return new (t || SSModeComponent)(); };
|
|
3107
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SSModeComponent, selectors: [["app-ss-mode"]], decls: 1, vars: 1, consts: [["tooltip", "Screenshot mode: phoenix will become fullscreen and the menu is suppressed", "icon", "ss-mode", 3, "click", "active"]], template: function SSModeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3108
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
3109
|
+
i0.ɵɵlistener("click", function SSModeComponent_Template_app_menu_toggle_click_0_listener() { return ctx.toggleSSMode(); });
|
|
3110
|
+
i0.ɵɵelementEnd();
|
|
3111
|
+
} if (rf & 2) {
|
|
3112
|
+
i0.ɵɵproperty("active", ctx.ssMode);
|
|
3113
|
+
} }, dependencies: [MenuToggleComponent], styles: ["#uiMenu,#phoenixMenu,#mainLogo,#statsElement{transition:opacity .4s}.ss-mode #uiMenu,.ss-mode #phoenixMenu,.ss-mode #mainLogo,.ss-mode #statsElement{visibility:hidden;opacity:0}\n"], encapsulation: 2 });
|
|
3114
|
+
}
|
|
3115
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SSModeComponent, [{
|
|
3116
|
+
type: Component,
|
|
3117
|
+
args: [{ selector: 'app-ss-mode', encapsulation: ViewEncapsulation.None, template: "<app-menu-toggle\n tooltip=\"Screenshot mode: phoenix will become fullscreen and the menu is suppressed\"\n [active]=\"ssMode\"\n icon=\"ss-mode\"\n (click)=\"toggleSSMode()\"\n>\n</app-menu-toggle>\n", styles: ["#uiMenu,#phoenixMenu,#mainLogo,#statsElement{transition:opacity .4s}.ss-mode #uiMenu,.ss-mode #phoenixMenu,.ss-mode #mainLogo,.ss-mode #statsElement{visibility:hidden;opacity:0}\n"] }]
|
|
3118
|
+
}], null, null); })();
|
|
3119
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(SSModeComponent, { className: "SSModeComponent", filePath: "components/ui-menu/ss-mode/ss-mode.component.ts", lineNumber: 10 }); })();
|
|
3120
|
+
|
|
3121
|
+
function MakePictureComponent_mat_radio_button_14_Template(rf, ctx) { if (rf & 1) {
|
|
3122
|
+
i0.ɵɵelementStart(0, "mat-radio-button", 12);
|
|
3123
|
+
i0.ɵɵtext(1);
|
|
3124
|
+
i0.ɵɵelementEnd();
|
|
3125
|
+
} if (rf & 2) {
|
|
3126
|
+
const fitting_r4 = ctx.$implicit;
|
|
3127
|
+
i0.ɵɵproperty("value", fitting_r4);
|
|
3128
|
+
i0.ɵɵadvance();
|
|
3129
|
+
i0.ɵɵtextInterpolate1("", fitting_r4, " ");
|
|
3130
|
+
} }
|
|
3131
|
+
class MakePictureComponent {
|
|
3132
|
+
eventDisplay;
|
|
3133
|
+
fittings = ['Crop', 'Stretch'];
|
|
3134
|
+
fitting = 'Crop';
|
|
3135
|
+
width = 3840;
|
|
3136
|
+
height = 2160;
|
|
3137
|
+
disabled = false;
|
|
3138
|
+
constructor(eventDisplay) {
|
|
3139
|
+
this.eventDisplay = eventDisplay;
|
|
3140
|
+
}
|
|
3141
|
+
ngOnInit() { }
|
|
3142
|
+
checkSize() {
|
|
3143
|
+
return this.eventDisplay
|
|
3144
|
+
.getThreeManager()
|
|
3145
|
+
.checkScreenShotCanvasSize(this.width, this.height, this.fitting);
|
|
3146
|
+
}
|
|
3147
|
+
setWidth(value) {
|
|
3148
|
+
this.width = value;
|
|
3149
|
+
this.disabled = !this.checkSize();
|
|
3150
|
+
}
|
|
3151
|
+
setHeight(value) {
|
|
3152
|
+
this.height = value;
|
|
3153
|
+
this.disabled = !this.checkSize();
|
|
3154
|
+
}
|
|
3155
|
+
buttonText() {
|
|
3156
|
+
return this.disabled ? 'Size too large' : 'Create picture';
|
|
3157
|
+
}
|
|
3158
|
+
makePicture() {
|
|
3159
|
+
this.eventDisplay
|
|
3160
|
+
.getThreeManager()
|
|
3161
|
+
.makeScreenShot(this.width, this.height, this.fitting);
|
|
3162
|
+
}
|
|
3163
|
+
static ɵfac = function MakePictureComponent_Factory(t) { return new (t || MakePictureComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
3164
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MakePictureComponent, selectors: [["app-make-picture"]], decls: 20, vars: 11, consts: [["menu", ""], ["width", ""], ["height", ""], [1, "mat-menu"], ["mat-menu-item", "", 1, "size-input", 3, "click"], ["mapInput", "", "type", "number", 3, "change", "click", "value"], ["mat-menu-item", "", 3, "click"], [1, "fitting-radios", 3, "ngModelChange", "ngModel"], [3, "value", 4, "ngFor", "ngForOf"], ["mat-menu-item", "", 1, "make-picture", 3, "click", "disabled"], ["tooltip", "Creates a picture from the current view: directly saves a png of arbitrary size from the current view", "icon", "png", 3, "matMenuTriggerFor"], ["hidden", "", "id", "screenshotCanvas"], [3, "value"]], template: function MakePictureComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3165
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
3166
|
+
i0.ɵɵelementStart(0, "mat-menu", 3, 0)(2, "button", 4);
|
|
3167
|
+
i0.ɵɵlistener("click", function MakePictureComponent_Template_button_click_2_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
3168
|
+
i0.ɵɵelementStart(3, "label");
|
|
3169
|
+
i0.ɵɵtext(4, "width");
|
|
3170
|
+
i0.ɵɵelementEnd();
|
|
3171
|
+
i0.ɵɵelementStart(5, "input", 5, 1);
|
|
3172
|
+
i0.ɵɵlistener("change", function MakePictureComponent_Template_input_change_5_listener() { i0.ɵɵrestoreView(_r1); const width_r2 = i0.ɵɵreference(6); return i0.ɵɵresetView(ctx.setWidth(width_r2.value)); })("click", function MakePictureComponent_Template_input_click_5_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
3173
|
+
i0.ɵɵelementEnd()();
|
|
3174
|
+
i0.ɵɵelementStart(7, "button", 4);
|
|
3175
|
+
i0.ɵɵlistener("click", function MakePictureComponent_Template_button_click_7_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
3176
|
+
i0.ɵɵelementStart(8, "label");
|
|
3177
|
+
i0.ɵɵtext(9, "height");
|
|
3178
|
+
i0.ɵɵelementEnd();
|
|
3179
|
+
i0.ɵɵelementStart(10, "input", 5, 2);
|
|
3180
|
+
i0.ɵɵlistener("change", function MakePictureComponent_Template_input_change_10_listener() { i0.ɵɵrestoreView(_r1); const height_r3 = i0.ɵɵreference(11); return i0.ɵɵresetView(ctx.setHeight(height_r3.value)); })("click", function MakePictureComponent_Template_input_click_10_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
3181
|
+
i0.ɵɵelementEnd()();
|
|
3182
|
+
i0.ɵɵelementStart(12, "button", 6);
|
|
3183
|
+
i0.ɵɵlistener("click", function MakePictureComponent_Template_button_click_12_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
3184
|
+
i0.ɵɵelementStart(13, "mat-radio-group", 7);
|
|
3185
|
+
i0.ɵɵtwoWayListener("ngModelChange", function MakePictureComponent_Template_mat_radio_group_ngModelChange_13_listener($event) { i0.ɵɵrestoreView(_r1); i0.ɵɵtwoWayBindingSet(ctx.fitting, $event) || (ctx.fitting = $event); return i0.ɵɵresetView($event); });
|
|
3186
|
+
i0.ɵɵtemplate(14, MakePictureComponent_mat_radio_button_14_Template, 2, 2, "mat-radio-button", 8);
|
|
3187
|
+
i0.ɵɵelementEnd()();
|
|
3188
|
+
i0.ɵɵelementStart(15, "button", 9);
|
|
3189
|
+
i0.ɵɵlistener("click", function MakePictureComponent_Template_button_click_15_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.makePicture()); });
|
|
3190
|
+
i0.ɵɵtext(16);
|
|
3191
|
+
i0.ɵɵelementEnd()();
|
|
3192
|
+
i0.ɵɵelement(17, "app-menu-toggle", 10);
|
|
3193
|
+
i0.ɵɵelementStart(18, "div");
|
|
3194
|
+
i0.ɵɵelement(19, "canvas", 11);
|
|
3195
|
+
i0.ɵɵelementEnd();
|
|
3196
|
+
} if (rf & 2) {
|
|
3197
|
+
const menu_r5 = i0.ɵɵreference(1);
|
|
3198
|
+
i0.ɵɵadvance(5);
|
|
3199
|
+
i0.ɵɵclassProp("badSize", ctx.disabled);
|
|
3200
|
+
i0.ɵɵproperty("value", 3840);
|
|
3201
|
+
i0.ɵɵadvance(5);
|
|
3202
|
+
i0.ɵɵclassProp("badSize", ctx.disabled);
|
|
3203
|
+
i0.ɵɵproperty("value", 2610);
|
|
3204
|
+
i0.ɵɵadvance(3);
|
|
3205
|
+
i0.ɵɵtwoWayProperty("ngModel", ctx.fitting);
|
|
3206
|
+
i0.ɵɵadvance();
|
|
3207
|
+
i0.ɵɵproperty("ngForOf", ctx.fittings);
|
|
3208
|
+
i0.ɵɵadvance();
|
|
3209
|
+
i0.ɵɵproperty("disabled", ctx.disabled);
|
|
3210
|
+
i0.ɵɵadvance();
|
|
3211
|
+
i0.ɵɵtextInterpolate1(" ", ctx.buttonText(), " ");
|
|
3212
|
+
i0.ɵɵadvance();
|
|
3213
|
+
i0.ɵɵproperty("matMenuTriggerFor", menu_r5);
|
|
3214
|
+
} }, dependencies: [i2.NgForOf, i4.NgControlStatus, i4.NgModel, i3$2.MatMenu, i3$2.MatMenuItem, i3$2.MatMenuTrigger, i5$1.MatRadioGroup, i5$1.MatRadioButton, MenuToggleComponent], styles: [".size-input{background:transparent;color:var(--phoenix-text-color);text-align:center}.size-input label{width:60px}.size-input input{background:transparent;color:var(--phoenix-text-color);width:80px}.badSize{border-color:red}.make-picture{text-align:center;display:block}.make-picture span{padding:5px 25px;border:2px solid var(--phoenix-text-color);border-radius:8px}\n"], encapsulation: 2 });
|
|
3215
|
+
}
|
|
3216
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MakePictureComponent, [{
|
|
3217
|
+
type: Component,
|
|
3218
|
+
args: [{ selector: 'app-make-picture', encapsulation: ViewEncapsulation.None, template: "<mat-menu class=\"mat-menu\" #menu>\n <button mat-menu-item (click)=\"$event.stopPropagation()\" class=\"size-input\">\n <label>width</label>\n <input\n #width\n mapInput\n type=\"number\"\n [value]=\"3840\"\n (change)=\"setWidth(width.value)\"\n (click)=\"$event.stopPropagation()\"\n [class.badSize]=\"disabled\"\n />\n </button>\n <button mat-menu-item (click)=\"$event.stopPropagation()\" class=\"size-input\">\n <label>height</label>\n <input\n #height\n mapInput\n type=\"number\"\n [value]=\"2610\"\n (change)=\"setHeight(height.value)\"\n (click)=\"$event.stopPropagation()\"\n [class.badSize]=\"disabled\"\n />\n </button>\n <button mat-menu-item (click)=\"$event.stopPropagation()\">\n <mat-radio-group [(ngModel)]=\"fitting\" class=\"fitting-radios\">\n <mat-radio-button *ngFor=\"let fitting of fittings\" [value]=\"fitting\"\n >{{ fitting }}\n </mat-radio-button>\n </mat-radio-group>\n </button>\n <button\n mat-menu-item\n [disabled]=\"disabled\"\n class=\"make-picture\"\n (click)=\"makePicture()\"\n >\n {{ buttonText() }}\n </button>\n</mat-menu>\n<app-menu-toggle\n [matMenuTriggerFor]=\"menu\"\n tooltip=\"Creates a picture from the current view: directly saves a png of arbitrary size from the current view\"\n icon=\"png\"\n>\n</app-menu-toggle>\n<div>\n <canvas hidden id=\"screenshotCanvas\"></canvas>\n</div>\n", styles: [".size-input{background:transparent;color:var(--phoenix-text-color);text-align:center}.size-input label{width:60px}.size-input input{background:transparent;color:var(--phoenix-text-color);width:80px}.badSize{border-color:red}.make-picture{text-align:center;display:block}.make-picture span{padding:5px 25px;border:2px solid var(--phoenix-text-color);border-radius:8px}\n"] }]
|
|
3219
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
3220
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MakePictureComponent, { className: "MakePictureComponent", filePath: "components/ui-menu/make-picture/make-picture.component.ts", lineNumber: 11 }); })();
|
|
3221
|
+
|
|
3222
|
+
class PerformanceToggleComponent {
|
|
3223
|
+
eventDisplay;
|
|
3224
|
+
performanceMode = false;
|
|
3225
|
+
constructor(eventDisplay) {
|
|
3226
|
+
this.eventDisplay = eventDisplay;
|
|
3227
|
+
}
|
|
3228
|
+
togglePerformance() {
|
|
3229
|
+
this.performanceMode = !this.performanceMode;
|
|
3230
|
+
this.eventDisplay.getThreeManager().setAntialiasing(!this.performanceMode);
|
|
3231
|
+
}
|
|
3232
|
+
static ɵfac = function PerformanceToggleComponent_Factory(t) { return new (t || PerformanceToggleComponent)(i0.ɵɵdirectiveInject(EventDisplayService)); };
|
|
3233
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PerformanceToggleComponent, selectors: [["app-performance-toggle"]], decls: 1, vars: 1, consts: [["tooltip", "Performance mode", "icon", "performance", 3, "click", "active"]], template: function PerformanceToggleComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3234
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
3235
|
+
i0.ɵɵlistener("click", function PerformanceToggleComponent_Template_app_menu_toggle_click_0_listener() { return ctx.togglePerformance(); });
|
|
3236
|
+
i0.ɵɵelementEnd();
|
|
3237
|
+
} if (rf & 2) {
|
|
3238
|
+
i0.ɵɵproperty("active", ctx.performanceMode);
|
|
3239
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
3240
|
+
}
|
|
3241
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PerformanceToggleComponent, [{
|
|
3242
|
+
type: Component,
|
|
3243
|
+
args: [{ selector: 'app-performance-toggle', template: "<app-menu-toggle\n tooltip=\"Performance mode\"\n [active]=\"performanceMode\"\n icon=\"performance\"\n (click)=\"togglePerformance()\"\n>\n</app-menu-toggle>\n" }]
|
|
3244
|
+
}], () => [{ type: EventDisplayService }], null); })();
|
|
3245
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(PerformanceToggleComponent, { className: "PerformanceToggleComponent", filePath: "components/ui-menu/performance-toggle/performance-toggle.component.ts", lineNumber: 9 }); })();
|
|
3246
|
+
|
|
3247
|
+
const _c0$4 = ["*"];
|
|
3248
|
+
const _c1$1 = a0 => ({ "ui-menu-hidden": a0 });
|
|
3249
|
+
class UiMenuWrapperComponent {
|
|
3250
|
+
hideUIMenu = false;
|
|
3251
|
+
static ɵfac = function UiMenuWrapperComponent_Factory(t) { return new (t || UiMenuWrapperComponent)(); };
|
|
3252
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UiMenuWrapperComponent, selectors: [["app-ui-menu-wrapper"]], ngContentSelectors: _c0$4, decls: 6, vars: 5, consts: [["id", "uiMenu"], ["id", "hideUIMenu", "matTooltipPosition", "above", 3, "click", "matTooltip", "ngClass"], ["href", "assets/icons/expand.svg#expand"], ["id", "optionsPanel", 3, "hidden"]], template: function UiMenuWrapperComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3253
|
+
i0.ɵɵprojectionDef();
|
|
3254
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "button", 1);
|
|
3255
|
+
i0.ɵɵlistener("click", function UiMenuWrapperComponent_Template_button_click_1_listener() { return ctx.hideUIMenu = !ctx.hideUIMenu; });
|
|
3256
|
+
i0.ɵɵnamespaceSVG();
|
|
3257
|
+
i0.ɵɵelementStart(2, "svg");
|
|
3258
|
+
i0.ɵɵelement(3, "use", 2);
|
|
3259
|
+
i0.ɵɵelementEnd()();
|
|
3260
|
+
i0.ɵɵnamespaceHTML();
|
|
3261
|
+
i0.ɵɵelementStart(4, "div", 3);
|
|
3262
|
+
i0.ɵɵprojection(5);
|
|
3263
|
+
i0.ɵɵelementEnd()();
|
|
3264
|
+
} if (rf & 2) {
|
|
3265
|
+
i0.ɵɵadvance();
|
|
3266
|
+
i0.ɵɵproperty("matTooltip", ctx.hideUIMenu ? "Show toolbar" : "Hide toolbar")("ngClass", i0.ɵɵpureFunction1(3, _c1$1, ctx.hideUIMenu));
|
|
3267
|
+
i0.ɵɵadvance(3);
|
|
3268
|
+
i0.ɵɵproperty("hidden", ctx.hideUIMenu);
|
|
3269
|
+
} }, dependencies: [i2.NgClass, i3$1.MatTooltip], styles: ["#uiMenu[_ngcontent-%COMP%]{position:absolute;bottom:1rem;width:100%;box-sizing:border-box;display:flex;flex-direction:column;align-items:center}#optionsPanel[_ngcontent-%COMP%]{display:flex;align-items:center;background:var(--phoenix-background-color-secondary);border:1px solid var(--phoenix-background-color-tertiary);box-shadow:var(--phoenix-box-shadow);border-radius:30px;max-width:95%;padding:.3rem 1rem;overflow-x:scroll;z-index:90}#hideUIMenu[_ngcontent-%COMP%]{background:var(--phoenix-background-color-secondary);height:1.2rem;width:3rem;border:1px solid var(--phoenix-border);border-bottom:none;box-shadow:var(--phoenix-box-shadow);border-top-left-radius:15px;border-top-right-radius:15px;padding:3px}#hideUIMenu[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{height:100%;width:100%;vertical-align:top;transition:all .3s}#hideUIMenu.ui-menu-hidden[_ngcontent-%COMP%] svg[_ngcontent-%COMP%]{transform:scaleY(-1);transition:all .3s}"] });
|
|
3270
|
+
}
|
|
3271
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UiMenuWrapperComponent, [{
|
|
3272
|
+
type: Component,
|
|
3273
|
+
args: [{ selector: 'app-ui-menu-wrapper', template: "<div id=\"uiMenu\">\n <button\n id=\"hideUIMenu\"\n [matTooltip]=\"hideUIMenu ? 'Show toolbar' : 'Hide toolbar'\"\n matTooltipPosition=\"above\"\n (click)=\"hideUIMenu = !hideUIMenu\"\n [ngClass]=\"{ 'ui-menu-hidden': hideUIMenu }\"\n >\n <svg>\n <use href=\"assets/icons/expand.svg#expand\"></use>\n </svg>\n </button>\n <div id=\"optionsPanel\" [hidden]=\"hideUIMenu\">\n <ng-content></ng-content>\n </div>\n</div>\n", styles: ["#uiMenu{position:absolute;bottom:1rem;width:100%;box-sizing:border-box;display:flex;flex-direction:column;align-items:center}#optionsPanel{display:flex;align-items:center;background:var(--phoenix-background-color-secondary);border:1px solid var(--phoenix-background-color-tertiary);box-shadow:var(--phoenix-box-shadow);border-radius:30px;max-width:95%;padding:.3rem 1rem;overflow-x:scroll;z-index:90}#hideUIMenu{background:var(--phoenix-background-color-secondary);height:1.2rem;width:3rem;border:1px solid var(--phoenix-border);border-bottom:none;box-shadow:var(--phoenix-box-shadow);border-top-left-radius:15px;border-top-right-radius:15px;padding:3px}#hideUIMenu svg{height:100%;width:100%;vertical-align:top;transition:all .3s}#hideUIMenu.ui-menu-hidden svg{transform:scaleY(-1);transition:all .3s}\n"] }]
|
|
3274
|
+
}], null, null); })();
|
|
3275
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UiMenuWrapperComponent, { className: "UiMenuWrapperComponent", filePath: "components/ui-menu/ui-menu-wrapper/ui-menu-wrapper.component.ts", lineNumber: 8 }); })();
|
|
3276
|
+
|
|
3277
|
+
const _c0$3 = ["qrcodeCanvas"];
|
|
3278
|
+
class ShareLinkDialogComponent {
|
|
3279
|
+
dialogRef;
|
|
3280
|
+
baseLink;
|
|
3281
|
+
shareLink;
|
|
3282
|
+
embedLink;
|
|
3283
|
+
urlOptions = Object.assign({}, phoenixURLOptions);
|
|
3284
|
+
qrcodeCanvas;
|
|
3285
|
+
constructor(dialogRef) {
|
|
3286
|
+
this.dialogRef = dialogRef;
|
|
3287
|
+
const locationHref = window.location.href;
|
|
3288
|
+
const lastIndex = locationHref.lastIndexOf('?') === -1
|
|
3289
|
+
? locationHref.length
|
|
3290
|
+
: locationHref.lastIndexOf('?');
|
|
3291
|
+
this.baseLink = locationHref.slice(0, lastIndex);
|
|
3292
|
+
this.shareLink = new ActiveVariable(this.baseLink);
|
|
3293
|
+
this.embedLink = this.getEmbedLink();
|
|
3294
|
+
}
|
|
3295
|
+
ngAfterViewInit() {
|
|
3296
|
+
this.updateQRCode(this.shareLink.value);
|
|
3297
|
+
this.shareLink.onUpdate(this.updateQRCode.bind(this));
|
|
3298
|
+
}
|
|
3299
|
+
onClose() {
|
|
3300
|
+
this.dialogRef.close();
|
|
3301
|
+
}
|
|
3302
|
+
getEmbedLink(urlParametersString = '') {
|
|
3303
|
+
return `<iframe src="${this.baseLink}?embed=true${urlParametersString ? '&' : ''}${urlParametersString}"></iframe>`;
|
|
3304
|
+
}
|
|
3305
|
+
setOptionValue(option, value) {
|
|
3306
|
+
this.urlOptions[option] = value;
|
|
3307
|
+
this.onOptionsChange();
|
|
3308
|
+
}
|
|
3309
|
+
onOptionsChange() {
|
|
3310
|
+
const urlParametersString = Object.getOwnPropertyNames(this.urlOptions)
|
|
3311
|
+
.reduce((filteredOptions, option) => {
|
|
3312
|
+
if (this.urlOptions[option]) {
|
|
3313
|
+
filteredOptions.push(`${option}=${encodeURI(this.urlOptions[option])}`);
|
|
3314
|
+
}
|
|
3315
|
+
return filteredOptions;
|
|
3316
|
+
}, [])
|
|
3317
|
+
.join('&');
|
|
3318
|
+
this.shareLink.update(this.baseLink + (urlParametersString ? '?' : '') + urlParametersString);
|
|
3319
|
+
this.embedLink = this.getEmbedLink(urlParametersString);
|
|
3320
|
+
}
|
|
3321
|
+
copyText(text, element) {
|
|
3322
|
+
const inputElement = document.createElement('input');
|
|
3323
|
+
document.body.appendChild(inputElement);
|
|
3324
|
+
inputElement.value = text;
|
|
3325
|
+
inputElement.select();
|
|
3326
|
+
document.execCommand('copy');
|
|
3327
|
+
document.body.removeChild(inputElement);
|
|
3328
|
+
element.focus();
|
|
3329
|
+
// Set text on copying
|
|
3330
|
+
element.innerText = 'COPIED';
|
|
3331
|
+
setTimeout(() => {
|
|
3332
|
+
element.innerText = 'COPY';
|
|
3333
|
+
}, 2000);
|
|
3334
|
+
}
|
|
3335
|
+
updateQRCode(link) {
|
|
3336
|
+
QRCode.toCanvas(this.qrcodeCanvas.nativeElement, link);
|
|
3337
|
+
}
|
|
3338
|
+
static ɵfac = function ShareLinkDialogComponent_Factory(t) { return new (t || ShareLinkDialogComponent)(i0.ɵɵdirectiveInject(i1$2.MatDialogRef)); };
|
|
3339
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShareLinkDialogComponent, selectors: [["app-share-link-dialog"]], viewQuery: function ShareLinkDialogComponent_Query(rf, ctx) { if (rf & 1) {
|
|
3340
|
+
i0.ɵɵviewQuery(_c0$3, 5);
|
|
3341
|
+
} if (rf & 2) {
|
|
3342
|
+
let _t;
|
|
3343
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.qrcodeCanvas = _t.first);
|
|
3344
|
+
} }, decls: 49, vars: 5, consts: [["qrcodeCanvas", ""], [1, "dialog"], ["mat-dialog-title", ""], ["mat-dialog-content", "", 1, "dialog-content"], [1, "form-group", "mt-2"], ["for", "eventDataFile"], ["type", "text", "id", "eventDataFile", "placeholder", "assets/files/event_data/atlaseventdump2.json", 1, "form-control", 3, "input", "value"], [1, "form-group"], ["for", "eventDataType"], ["id", "eventDataType", 1, "form-control", 3, "input"], ["selected", "", "value", ""], ["value", "jivexml"], ["value", "json"], ["for", "configuration"], ["type", "text", "id", "configuration", "placeholder", "assets/files/config/phoenix-config.json", 1, "form-control", 3, "input", "value"], [3, "change", "checked"], [1, "share-box", "my-2"], [1, "share-box-copy", 3, "click"], [1, "qrcode", "d-flex", "justify-content-center"], ["mat-dialog-actions", ""], ["mat-button", "", "cdkFocusInitial", "", 3, "click"]], template: function ShareLinkDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3345
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
3346
|
+
i0.ɵɵelementStart(0, "div", 1)(1, "h1", 2);
|
|
3347
|
+
i0.ɵɵtext(2, "Create shareable link");
|
|
3348
|
+
i0.ɵɵelementEnd();
|
|
3349
|
+
i0.ɵɵelementStart(3, "div", 3)(4, "h5");
|
|
3350
|
+
i0.ɵɵtext(5, "URL options");
|
|
3351
|
+
i0.ɵɵelementEnd();
|
|
3352
|
+
i0.ɵɵelementStart(6, "div", 4)(7, "label", 5);
|
|
3353
|
+
i0.ɵɵtext(8, "Event data file (URL or path)");
|
|
3354
|
+
i0.ɵɵelementEnd();
|
|
3355
|
+
i0.ɵɵelementStart(9, "input", 6);
|
|
3356
|
+
i0.ɵɵlistener("input", function ShareLinkDialogComponent_Template_input_input_9_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setOptionValue("file", $event.target.value)); });
|
|
3357
|
+
i0.ɵɵelementEnd()();
|
|
3358
|
+
i0.ɵɵelementStart(10, "div", 7)(11, "label", 8);
|
|
3359
|
+
i0.ɵɵtext(12, "Event data type");
|
|
3360
|
+
i0.ɵɵelementEnd();
|
|
3361
|
+
i0.ɵɵelementStart(13, "select", 9);
|
|
3362
|
+
i0.ɵɵlistener("input", function ShareLinkDialogComponent_Template_select_input_13_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setOptionValue("type", $event.target.value)); });
|
|
3363
|
+
i0.ɵɵelementStart(14, "option", 10);
|
|
3364
|
+
i0.ɵɵtext(15, "Select");
|
|
3365
|
+
i0.ɵɵelementEnd();
|
|
3366
|
+
i0.ɵɵelementStart(16, "option", 11);
|
|
3367
|
+
i0.ɵɵtext(17, "JiveXML");
|
|
3368
|
+
i0.ɵɵelementEnd();
|
|
3369
|
+
i0.ɵɵelementStart(18, "option", 12);
|
|
3370
|
+
i0.ɵɵtext(19, "JSON");
|
|
3371
|
+
i0.ɵɵelementEnd()()();
|
|
3372
|
+
i0.ɵɵelementStart(20, "div", 7)(21, "label", 13);
|
|
3373
|
+
i0.ɵɵtext(22, "Configuration (URL or path)");
|
|
3374
|
+
i0.ɵɵelementEnd();
|
|
3375
|
+
i0.ɵɵelementStart(23, "input", 14);
|
|
3376
|
+
i0.ɵɵlistener("input", function ShareLinkDialogComponent_Template_input_input_23_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setOptionValue("config", $event.target.value)); });
|
|
3377
|
+
i0.ɵɵelementEnd()();
|
|
3378
|
+
i0.ɵɵelementStart(24, "div", 7)(25, "mat-checkbox", 15);
|
|
3379
|
+
i0.ɵɵlistener("change", function ShareLinkDialogComponent_Template_mat_checkbox_change_25_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.setOptionValue("hideWidgets", $event.checked)); });
|
|
3380
|
+
i0.ɵɵtext(26, " Hide all widgets ");
|
|
3381
|
+
i0.ɵɵelementEnd()();
|
|
3382
|
+
i0.ɵɵelementStart(27, "h5");
|
|
3383
|
+
i0.ɵɵtext(28, "Share");
|
|
3384
|
+
i0.ɵɵelementEnd();
|
|
3385
|
+
i0.ɵɵelementStart(29, "div", 16)(30, "span");
|
|
3386
|
+
i0.ɵɵtext(31);
|
|
3387
|
+
i0.ɵɵelementEnd();
|
|
3388
|
+
i0.ɵɵelementStart(32, "button", 17);
|
|
3389
|
+
i0.ɵɵlistener("click", function ShareLinkDialogComponent_Template_button_click_32_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.copyText(ctx.shareLink.value, $event.target)); });
|
|
3390
|
+
i0.ɵɵtext(33, " COPY ");
|
|
3391
|
+
i0.ɵɵelementEnd()();
|
|
3392
|
+
i0.ɵɵelementStart(34, "h5");
|
|
3393
|
+
i0.ɵɵtext(35, "Embed");
|
|
3394
|
+
i0.ɵɵelementEnd();
|
|
3395
|
+
i0.ɵɵelementStart(36, "div", 16)(37, "span");
|
|
3396
|
+
i0.ɵɵtext(38);
|
|
3397
|
+
i0.ɵɵelementEnd();
|
|
3398
|
+
i0.ɵɵelementStart(39, "button", 17);
|
|
3399
|
+
i0.ɵɵlistener("click", function ShareLinkDialogComponent_Template_button_click_39_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.copyText(ctx.embedLink, $event.target)); });
|
|
3400
|
+
i0.ɵɵtext(40, " COPY ");
|
|
3401
|
+
i0.ɵɵelementEnd()();
|
|
3402
|
+
i0.ɵɵelementStart(41, "h5");
|
|
3403
|
+
i0.ɵɵtext(42, "QR Code");
|
|
3404
|
+
i0.ɵɵelementEnd();
|
|
3405
|
+
i0.ɵɵelementStart(43, "div", 18);
|
|
3406
|
+
i0.ɵɵelement(44, "canvas", null, 0);
|
|
3407
|
+
i0.ɵɵelementEnd()();
|
|
3408
|
+
i0.ɵɵelementStart(46, "div", 19)(47, "button", 20);
|
|
3409
|
+
i0.ɵɵlistener("click", function ShareLinkDialogComponent_Template_button_click_47_listener() { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView(ctx.onClose()); });
|
|
3410
|
+
i0.ɵɵtext(48, "Close");
|
|
3411
|
+
i0.ɵɵelementEnd()()();
|
|
3412
|
+
} if (rf & 2) {
|
|
3413
|
+
i0.ɵɵadvance(9);
|
|
3414
|
+
i0.ɵɵproperty("value", ctx.urlOptions.file);
|
|
3415
|
+
i0.ɵɵadvance(14);
|
|
3416
|
+
i0.ɵɵproperty("value", ctx.urlOptions.config);
|
|
3417
|
+
i0.ɵɵadvance(2);
|
|
3418
|
+
i0.ɵɵproperty("checked", ctx.urlOptions.hideWidgets);
|
|
3419
|
+
i0.ɵɵadvance(6);
|
|
3420
|
+
i0.ɵɵtextInterpolate(ctx.shareLink.value);
|
|
3421
|
+
i0.ɵɵadvance(7);
|
|
3422
|
+
i0.ɵɵtextInterpolate(ctx.embedLink);
|
|
3423
|
+
} }, dependencies: [i1$2.MatDialogTitle, i1$2.MatDialogActions, i1$2.MatDialogContent, i3.MatButton, i4.NgSelectOption, i4.ɵNgSelectMultipleOption, i5.MatCheckbox], styles: [".share-box[_ngcontent-%COMP%]{width:30rem;max-width:100%;position:relative;background:var(--phoenix-background-color-tertiary);border:1px solid var(--phoenix-border);border-radius:.5rem;padding:1.25rem;word-wrap:break-word}.share-box[_ngcontent-%COMP%] .share-box-copy[_ngcontent-%COMP%]{position:absolute;top:-1px;right:-1px;background:transparent;color:inherit;cursor:pointer;padding:.25rem .5rem;font-size:.75rem;border:1px solid var(--phoenix-border);border-radius:.5rem}.share-box[_ngcontent-%COMP%] .share-box-copy[_ngcontent-%COMP%]:hover{background:var(--phoenix-border)}"] });
|
|
3424
|
+
}
|
|
3425
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareLinkDialogComponent, [{
|
|
3426
|
+
type: Component,
|
|
3427
|
+
args: [{ selector: 'app-share-link-dialog', template: "<div class=\"dialog\">\n <h1 mat-dialog-title>Create shareable link</h1>\n <div mat-dialog-content class=\"dialog-content\">\n <h5>URL options</h5>\n <div class=\"form-group mt-2\">\n <label for=\"eventDataFile\">Event data file (URL or path)</label>\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"eventDataFile\"\n placeholder=\"assets/files/event_data/atlaseventdump2.json\"\n [value]=\"urlOptions.file\"\n (input)=\"setOptionValue('file', $event.target.value)\"\n />\n </div>\n <div class=\"form-group\">\n <label for=\"eventDataType\">Event data type</label>\n <select\n class=\"form-control\"\n id=\"eventDataType\"\n (input)=\"setOptionValue('type', $event.target.value)\"\n >\n <option selected value=\"\">Select</option>\n <option value=\"jivexml\">JiveXML</option>\n <option value=\"json\">JSON</option>\n </select>\n </div>\n <div class=\"form-group\">\n <label for=\"configuration\">Configuration (URL or path)</label>\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"configuration\"\n placeholder=\"assets/files/config/phoenix-config.json\"\n [value]=\"urlOptions.config\"\n (input)=\"setOptionValue('config', $event.target.value)\"\n />\n </div>\n <div class=\"form-group\">\n <mat-checkbox\n [checked]=\"urlOptions.hideWidgets\"\n (change)=\"setOptionValue('hideWidgets', $event.checked)\"\n >\n Hide all widgets\n </mat-checkbox>\n </div>\n\n <h5>Share</h5>\n <div class=\"share-box my-2\">\n <span>{{ shareLink.value }}</span>\n <button\n class=\"share-box-copy\"\n (click)=\"copyText(shareLink.value, $event.target)\"\n >\n COPY\n </button>\n </div>\n <h5>Embed</h5>\n <div class=\"share-box my-2\">\n <span>{{ embedLink }}</span>\n <button\n class=\"share-box-copy\"\n (click)=\"copyText(embedLink, $event.target)\"\n >\n COPY\n </button>\n </div>\n <h5>QR Code</h5>\n <div class=\"qrcode d-flex justify-content-center\">\n <canvas #qrcodeCanvas></canvas>\n </div>\n </div>\n <div mat-dialog-actions>\n <button mat-button (click)=\"onClose()\" cdkFocusInitial>Close</button>\n </div>\n</div>\n", styles: [".share-box{width:30rem;max-width:100%;position:relative;background:var(--phoenix-background-color-tertiary);border:1px solid var(--phoenix-border);border-radius:.5rem;padding:1.25rem;word-wrap:break-word}.share-box .share-box-copy{position:absolute;top:-1px;right:-1px;background:transparent;color:inherit;cursor:pointer;padding:.25rem .5rem;font-size:.75rem;border:1px solid var(--phoenix-border);border-radius:.5rem}.share-box .share-box-copy:hover{background:var(--phoenix-border)}\n"] }]
|
|
3428
|
+
}], () => [{ type: i1$2.MatDialogRef }], { qrcodeCanvas: [{
|
|
3429
|
+
type: ViewChild,
|
|
3430
|
+
args: ['qrcodeCanvas']
|
|
3431
|
+
}] }); })();
|
|
3432
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShareLinkDialogComponent, { className: "ShareLinkDialogComponent", filePath: "components/ui-menu/share-link/share-link-dialog/share-link-dialog.component.ts", lineNumber: 11 }); })();
|
|
3433
|
+
|
|
3434
|
+
class ShareLinkComponent {
|
|
3435
|
+
dialog;
|
|
3436
|
+
constructor(dialog) {
|
|
3437
|
+
this.dialog = dialog;
|
|
3438
|
+
}
|
|
3439
|
+
openShareLinkDialog() {
|
|
3440
|
+
this.dialog.open(ShareLinkDialogComponent);
|
|
3441
|
+
}
|
|
3442
|
+
static ɵfac = function ShareLinkComponent_Factory(t) { return new (t || ShareLinkComponent)(i0.ɵɵdirectiveInject(i1$2.MatDialog)); };
|
|
3443
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ShareLinkComponent, selectors: [["app-share-link"]], decls: 1, vars: 1, consts: [["tooltip", "Create shareable link", "icon", "share", 3, "click", "active"]], template: function ShareLinkComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3444
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
3445
|
+
i0.ɵɵlistener("click", function ShareLinkComponent_Template_app_menu_toggle_click_0_listener() { return ctx.openShareLinkDialog(); });
|
|
3446
|
+
i0.ɵɵelementEnd();
|
|
3447
|
+
} if (rf & 2) {
|
|
3448
|
+
i0.ɵɵproperty("active", false);
|
|
3449
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
3450
|
+
}
|
|
3451
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ShareLinkComponent, [{
|
|
3452
|
+
type: Component,
|
|
3453
|
+
args: [{ selector: 'app-share-link', template: "<app-menu-toggle\n tooltip=\"Create shareable link\"\n icon=\"share\"\n [active]=\"false\"\n (click)=\"openShareLinkDialog()\"\n>\n</app-menu-toggle>\n" }]
|
|
3454
|
+
}], () => [{ type: i1$2.MatDialog }], null); })();
|
|
3455
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ShareLinkComponent, { className: "ShareLinkComponent", filePath: "components/ui-menu/share-link/share-link.component.ts", lineNumber: 10 }); })();
|
|
3456
|
+
|
|
3457
|
+
const _c0$2 = ["*"];
|
|
3458
|
+
class UiMenuComponent {
|
|
3459
|
+
eventDataImportOptions = Object.values(EventDataFormat);
|
|
3460
|
+
animationPresets = defaultAnimationPresets;
|
|
3461
|
+
static ɵfac = function UiMenuComponent_Factory(t) { return new (t || UiMenuComponent)(); };
|
|
3462
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: UiMenuComponent, selectors: [["app-ui-menu"]], inputs: { eventDataImportOptions: "eventDataImportOptions", animationPresets: "animationPresets" }, ngContentSelectors: _c0$2, decls: 23, vars: 2, consts: [[3, "animationPresets"], [3, "eventDataImportOptions"]], template: function UiMenuComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3463
|
+
i0.ɵɵprojectionDef();
|
|
3464
|
+
i0.ɵɵelementStart(0, "app-ui-menu-wrapper");
|
|
3465
|
+
i0.ɵɵelement(1, "app-event-selector")(2, "app-zoom-controls")(3, "app-view-options")(4, "app-auto-rotate")(5, "app-dark-theme")(6, "app-object-clipping")(7, "app-main-view-toggle")(8, "app-overlay-view")(9, "app-object-selection")(10, "app-info-panel")(11, "app-animate-event")(12, "app-animate-camera", 0)(13, "app-collections-info")(14, "app-geometry-browser")(15, "app-performance-toggle")(16, "app-vr-toggle")(17, "app-ar-toggle")(18, "app-ss-mode")(19, "app-make-picture")(20, "app-io-options", 1)(21, "app-share-link");
|
|
3466
|
+
i0.ɵɵprojection(22);
|
|
3467
|
+
i0.ɵɵelementEnd();
|
|
3468
|
+
} if (rf & 2) {
|
|
3469
|
+
i0.ɵɵadvance(12);
|
|
3470
|
+
i0.ɵɵproperty("animationPresets", ctx.animationPresets);
|
|
3471
|
+
i0.ɵɵadvance(8);
|
|
3472
|
+
i0.ɵɵproperty("eventDataImportOptions", ctx.eventDataImportOptions);
|
|
3473
|
+
} }, dependencies: [UiMenuWrapperComponent, CollectionsInfoComponent, GeometryBrowserComponent, IoOptionsComponent, OverlayViewComponent, ObjectSelectionComponent, EventSelectorComponent, ObjectClippingComponent, DarkThemeComponent, AutoRotateComponent, ViewOptionsComponent, InfoPanelComponent, MainViewToggleComponent, ZoomControlsComponent, AnimateCameraComponent, AnimateEventComponent, VrToggleComponent, ArToggleComponent, SSModeComponent, MakePictureComponent, PerformanceToggleComponent, ShareLinkComponent] });
|
|
3474
|
+
}
|
|
3475
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(UiMenuComponent, [{
|
|
3476
|
+
type: Component,
|
|
3477
|
+
args: [{ selector: 'app-ui-menu', template: "<app-ui-menu-wrapper>\n <!-- Event selector -->\n <app-event-selector></app-event-selector>\n\n <!-- Zoom in and zoom out controls -->\n <app-zoom-controls></app-zoom-controls>\n\n <app-view-options></app-view-options>\n\n <app-auto-rotate></app-auto-rotate>\n\n <!-- Dark theme toggle -->\n <app-dark-theme></app-dark-theme>\n\n <!-- Toggle for clipping geometries -->\n <app-object-clipping></app-object-clipping>\n\n <!-- Main view toggle -->\n <app-main-view-toggle></app-main-view-toggle>\n\n <!-- Toggle for overlay panel -->\n <app-overlay-view></app-overlay-view>\n\n <!-- Toggle for selected object panel -->\n <app-object-selection></app-object-selection>\n\n <!-- Info panel -->\n <app-info-panel></app-info-panel>\n\n <!-- Toggle for animating the event data -->\n <app-animate-event></app-animate-event>\n\n <!-- Toggle for animating camera through event -->\n <app-animate-camera\n [animationPresets]=\"animationPresets\"\n ></app-animate-camera>\n\n <!-- Toggle for collections info -->\n <app-collections-info></app-collections-info>\n\n <!-- Toggle for geometry browser -->\n <app-geometry-browser></app-geometry-browser>\n\n <!-- Toggle for performance -->\n <app-performance-toggle></app-performance-toggle>\n\n <!-- Toggle for VR -->\n <app-vr-toggle></app-vr-toggle>\n\n <!-- Toggle for AR -->\n <app-ar-toggle></app-ar-toggle>\n\n <!-- Toggle for screenshot mode -->\n <app-ss-mode></app-ss-mode>\n\n <!-- Make pictures from scene -->\n <app-make-picture></app-make-picture>\n\n <!-- Toggle for loading geometries modal-->\n <app-io-options\n [eventDataImportOptions]=\"eventDataImportOptions\"\n ></app-io-options>\n\n <!-- Toggle for shareable link constructor modal-->\n <app-share-link></app-share-link>\n\n <!-- Extra options -->\n <ng-content></ng-content>\n</app-ui-menu-wrapper>\n" }]
|
|
3478
|
+
}], null, { eventDataImportOptions: [{
|
|
3479
|
+
type: Input
|
|
3480
|
+
}], animationPresets: [{
|
|
3481
|
+
type: Input
|
|
3482
|
+
}] }); })();
|
|
3483
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(UiMenuComponent, { className: "UiMenuComponent", filePath: "components/ui-menu/ui-menu.component.ts", lineNumber: 13 }); })();
|
|
3484
|
+
|
|
3485
|
+
function FileExplorerComponent_cdk_tree_node_1_Template(rf, ctx) { if (rf & 1) {
|
|
3486
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
3487
|
+
i0.ɵɵelementStart(0, "cdk-tree-node", 3)(1, "button", 4);
|
|
3488
|
+
i0.ɵɵlistener("click", function FileExplorerComponent_cdk_tree_node_1_Template_button_click_1_listener() { const node_r2 = i0.ɵɵrestoreView(_r1).$implicit; const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.onSelect(node_r2.url, node_r2.nocache)); });
|
|
3489
|
+
i0.ɵɵnamespaceSVG();
|
|
3490
|
+
i0.ɵɵelementStart(2, "svg", 5);
|
|
3491
|
+
i0.ɵɵelement(3, "use", 6);
|
|
3492
|
+
i0.ɵɵelementEnd();
|
|
3493
|
+
i0.ɵɵtext(4);
|
|
3494
|
+
i0.ɵɵelementEnd()();
|
|
3495
|
+
} if (rf & 2) {
|
|
3496
|
+
const node_r2 = ctx.$implicit;
|
|
3497
|
+
i0.ɵɵadvance(4);
|
|
3498
|
+
i0.ɵɵtextInterpolate1(" ", node_r2.name, " ");
|
|
3499
|
+
} }
|
|
3500
|
+
function FileExplorerComponent_cdk_nested_tree_node_2_Template(rf, ctx) { if (rf & 1) {
|
|
3501
|
+
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 3)(1, "button", 7);
|
|
3502
|
+
i0.ɵɵnamespaceSVG();
|
|
3503
|
+
i0.ɵɵelementStart(2, "svg", 5);
|
|
3504
|
+
i0.ɵɵelement(3, "use", 8);
|
|
3505
|
+
i0.ɵɵelementEnd();
|
|
3506
|
+
i0.ɵɵtext(4);
|
|
3507
|
+
i0.ɵɵelementEnd();
|
|
3508
|
+
i0.ɵɵnamespaceHTML();
|
|
3509
|
+
i0.ɵɵelementStart(5, "div");
|
|
3510
|
+
i0.ɵɵelementContainer(6, 9);
|
|
3511
|
+
i0.ɵɵelementEnd()();
|
|
3512
|
+
} if (rf & 2) {
|
|
3513
|
+
const node_r4 = ctx.$implicit;
|
|
3514
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
3515
|
+
i0.ɵɵadvance();
|
|
3516
|
+
i0.ɵɵattribute("aria-label", "Toggle " + node_r4.name);
|
|
3517
|
+
i0.ɵɵadvance();
|
|
3518
|
+
i0.ɵɵclassProp("node-icon-filled", !ctx_r2.treeControl.isExpanded(node_r4));
|
|
3519
|
+
i0.ɵɵadvance(2);
|
|
3520
|
+
i0.ɵɵtextInterpolate1(" ", node_r4.name, " ");
|
|
3521
|
+
i0.ɵɵadvance();
|
|
3522
|
+
i0.ɵɵclassProp("file-tree-invisible", !ctx_r2.treeControl.isExpanded(node_r4));
|
|
3523
|
+
} }
|
|
3524
|
+
class FileNode {
|
|
3525
|
+
name;
|
|
3526
|
+
url;
|
|
3527
|
+
nocache;
|
|
3528
|
+
children;
|
|
3529
|
+
constructor(name) {
|
|
3530
|
+
this.name = name;
|
|
3531
|
+
this.nocache = false;
|
|
3532
|
+
}
|
|
3533
|
+
}
|
|
3534
|
+
class FileEvent {
|
|
3535
|
+
url;
|
|
3536
|
+
nocache;
|
|
3537
|
+
constructor(url, nocache) {
|
|
3538
|
+
this.url = url;
|
|
3539
|
+
this.nocache = nocache;
|
|
3540
|
+
}
|
|
3541
|
+
}
|
|
3542
|
+
class FileExplorerComponent {
|
|
3543
|
+
rootFileNode;
|
|
3544
|
+
onFileSelect = new EventEmitter();
|
|
3545
|
+
treeControl = new NestedTreeControl(this.getSortedChildren.bind(this));
|
|
3546
|
+
dataSource = new MatTreeNestedDataSource();
|
|
3547
|
+
ngOnChanges(changes) {
|
|
3548
|
+
if (changes.rootFileNode?.currentValue) {
|
|
3549
|
+
this.dataSource.data = this.getSortedChildren(changes.rootFileNode.currentValue);
|
|
3550
|
+
}
|
|
3551
|
+
}
|
|
3552
|
+
hasChildren = (_, node) => !!node.children && Object.keys(node.children).length > 0;
|
|
3553
|
+
onSelect(url, nocache) {
|
|
3554
|
+
this.onFileSelect.emit(new FileEvent(url, nocache));
|
|
3555
|
+
}
|
|
3556
|
+
/**
|
|
3557
|
+
* Sort the FileNode's children with folders before files.
|
|
3558
|
+
* @param node FileNode whose children are to be sorted.
|
|
3559
|
+
* @returns An array of sorted FileNodes.
|
|
3560
|
+
*/
|
|
3561
|
+
getSortedChildren(node) {
|
|
3562
|
+
if (!node.children) {
|
|
3563
|
+
return [];
|
|
3564
|
+
}
|
|
3565
|
+
return Object.values(node.children).sort((a, b) => !a.url && b.url ? -1 : 1);
|
|
3566
|
+
}
|
|
3567
|
+
static ɵfac = function FileExplorerComponent_Factory(t) { return new (t || FileExplorerComponent)(); };
|
|
3568
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: FileExplorerComponent, selectors: [["app-file-explorer"]], inputs: { rootFileNode: "rootFileNode" }, outputs: { onFileSelect: "onFileSelect" }, features: [i0.ɵɵNgOnChangesFeature], decls: 3, vars: 3, consts: [[3, "dataSource", "treeControl"], ["class", "tree-node", 4, "cdkTreeNodeDef"], ["class", "tree-node", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "tree-node"], ["mat-button", "", "mat-stroked-button", "", 1, "tree-node-button", 3, "click"], [1, "node-icon"], ["href", "assets/icons/file.svg#file"], ["mat-button", "", "cdkTreeNodeToggle", "", 1, "tree-node-button"], ["href", "assets/icons/folder.svg#folder"], ["cdkTreeNodeOutlet", ""]], template: function FileExplorerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3569
|
+
i0.ɵɵelementStart(0, "cdk-tree", 0);
|
|
3570
|
+
i0.ɵɵtemplate(1, FileExplorerComponent_cdk_tree_node_1_Template, 5, 1, "cdk-tree-node", 1)(2, FileExplorerComponent_cdk_nested_tree_node_2_Template, 7, 6, "cdk-nested-tree-node", 2);
|
|
3571
|
+
i0.ɵɵelementEnd();
|
|
3572
|
+
} if (rf & 2) {
|
|
3573
|
+
i0.ɵɵproperty("dataSource", ctx.dataSource)("treeControl", ctx.treeControl);
|
|
3574
|
+
i0.ɵɵadvance(2);
|
|
3575
|
+
i0.ɵɵproperty("cdkTreeNodeDefWhen", ctx.hasChildren);
|
|
3576
|
+
} }, dependencies: [i3.MatButton, i2$3.CdkNestedTreeNode, i2$3.CdkTreeNodeDef, i2$3.CdkTreeNodeToggle, i2$3.CdkTree, i2$3.CdkTreeNode, i2$3.CdkTreeNodeOutlet], styles: [".file-tree-invisible[_ngcontent-%COMP%]{display:none}.tree-node[_ngcontent-%COMP%]{display:block;margin:.25rem 0}.tree-node[_ngcontent-%COMP%] .tree-node[_ngcontent-%COMP%]{padding-left:1rem}.tree-node-button[_ngcontent-%COMP%]{outline:none;padding:0 .75rem}.node-icon[_ngcontent-%COMP%]{width:1rem;height:1rem;margin-right:.25rem;margin-top:-2px}.node-icon.node-icon-filled[_ngcontent-%COMP%]{--icon-fill: var(--phoenix-options-icon-path, #fff)}"] });
|
|
3577
|
+
}
|
|
3578
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileExplorerComponent, [{
|
|
3579
|
+
type: Component,
|
|
3580
|
+
args: [{ selector: 'app-file-explorer', template: "<cdk-tree [dataSource]=\"dataSource\" [treeControl]=\"treeControl\">\n <!-- This is the tree node template for leaf nodes -->\n <cdk-tree-node *cdkTreeNodeDef=\"let node\" class=\"tree-node\">\n <button\n mat-button\n mat-stroked-button\n class=\"tree-node-button\"\n (click)=\"onSelect(node.url, node.nocache)\"\n >\n <svg class=\"node-icon\">\n <use href=\"assets/icons/file.svg#file\"></use>\n </svg>\n {{ node.name }}\n </button>\n </cdk-tree-node>\n <!-- This is the tree node template for expandable nodes -->\n <cdk-nested-tree-node\n *cdkTreeNodeDef=\"let node; when: hasChildren\"\n class=\"tree-node\"\n >\n <button\n mat-button\n cdkTreeNodeToggle\n class=\"tree-node-button\"\n [attr.aria-label]=\"'Toggle ' + node.name\"\n >\n <svg\n class=\"node-icon\"\n [class.node-icon-filled]=\"!treeControl.isExpanded(node)\"\n >\n <use href=\"assets/icons/folder.svg#folder\"></use>\n </svg>\n {{ node.name }}\n </button>\n <div [class.file-tree-invisible]=\"!treeControl.isExpanded(node)\">\n <ng-container cdkTreeNodeOutlet></ng-container>\n </div>\n </cdk-nested-tree-node>\n</cdk-tree>\n", styles: [".file-tree-invisible{display:none}.tree-node{display:block;margin:.25rem 0}.tree-node .tree-node{padding-left:1rem}.tree-node-button{outline:none;padding:0 .75rem}.node-icon{width:1rem;height:1rem;margin-right:.25rem;margin-top:-2px}.node-icon.node-icon-filled{--icon-fill: var(--phoenix-options-icon-path, #fff)}\n"] }]
|
|
3581
|
+
}], null, { rootFileNode: [{
|
|
3582
|
+
type: Input
|
|
3583
|
+
}], onFileSelect: [{
|
|
3584
|
+
type: Output
|
|
3585
|
+
}] }); })();
|
|
3586
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(FileExplorerComponent, { className: "FileExplorerComponent", filePath: "components/file-explorer/file-explorer.component.ts", lineNumber: 37 }); })();
|
|
3587
|
+
|
|
3588
|
+
/**
|
|
3589
|
+
* Service makeing file loading easier
|
|
3590
|
+
*/
|
|
3591
|
+
class FileLoaderService {
|
|
3592
|
+
lastEventsURL = '';
|
|
3593
|
+
lastEventsOptions = false;
|
|
3594
|
+
async unzip(data) {
|
|
3595
|
+
const archive = new JSZip();
|
|
3596
|
+
await archive.loadAsync(data);
|
|
3597
|
+
let fileData = '';
|
|
3598
|
+
let multiFile = false;
|
|
3599
|
+
for (const filePath in archive.files) {
|
|
3600
|
+
if (multiFile) {
|
|
3601
|
+
console.error('Zip archive contains more than one file. Ignoring all but first');
|
|
3602
|
+
break;
|
|
3603
|
+
}
|
|
3604
|
+
fileData = await archive.file(filePath).async('string');
|
|
3605
|
+
multiFile = true;
|
|
3606
|
+
}
|
|
3607
|
+
return fileData;
|
|
3608
|
+
}
|
|
3609
|
+
// returns whether an error was found
|
|
3610
|
+
makeRequest(urlPath, responseType, onData, options = {}) {
|
|
3611
|
+
fetch(urlPath, options)
|
|
3612
|
+
.then((res) => res[responseType]())
|
|
3613
|
+
.then((data) => {
|
|
3614
|
+
if (responseType === 'blob') {
|
|
3615
|
+
data
|
|
3616
|
+
.arrayBuffer()
|
|
3617
|
+
.then((buf) => this.unzip(buf))
|
|
3618
|
+
.then((d) => onData(d));
|
|
3619
|
+
}
|
|
3620
|
+
else {
|
|
3621
|
+
onData(data);
|
|
3622
|
+
}
|
|
3623
|
+
})
|
|
3624
|
+
.catch((error) => {
|
|
3625
|
+
console.error(error);
|
|
3626
|
+
return true;
|
|
3627
|
+
});
|
|
3628
|
+
return false;
|
|
3629
|
+
}
|
|
3630
|
+
loadJSONEvent(eventData, eventDisplay) {
|
|
3631
|
+
eventDisplay.parsePhoenixEvents(JSON.parse(eventData));
|
|
3632
|
+
}
|
|
3633
|
+
loadJiveXMLEvent(eventData, eventDisplay) {
|
|
3634
|
+
const jiveXMLLoader = new JiveXMLLoader();
|
|
3635
|
+
jiveXMLLoader.process(eventData);
|
|
3636
|
+
const processedEventData = jiveXMLLoader.getEventData();
|
|
3637
|
+
eventDisplay.buildEventDataFromJSON(processedEventData);
|
|
3638
|
+
}
|
|
3639
|
+
loadEvent(file, eventDisplay, options = {}) {
|
|
3640
|
+
this.lastEventsURL = file;
|
|
3641
|
+
this.lastEventsOptions = options;
|
|
3642
|
+
const isZip = file.split('.').pop() === 'zip';
|
|
3643
|
+
const rawfile = isZip ? file.substring(0, file.length - 4) : file;
|
|
3644
|
+
return this.makeRequest(file, isZip ? 'blob' : 'text', (eventData) => {
|
|
3645
|
+
switch (rawfile.split('.').pop()) {
|
|
3646
|
+
case 'xml':
|
|
3647
|
+
this.loadJiveXMLEvent(eventData, eventDisplay);
|
|
3648
|
+
break;
|
|
3649
|
+
case 'json':
|
|
3650
|
+
this.loadJSONEvent(eventData, eventDisplay);
|
|
3651
|
+
break;
|
|
3652
|
+
}
|
|
3653
|
+
}, options);
|
|
3654
|
+
}
|
|
3655
|
+
reloadLastEvents(eventDisplay) {
|
|
3656
|
+
if (this.lastEventsURL.length > 0) {
|
|
3657
|
+
this.loadEvent(this.lastEventsURL, eventDisplay, this.lastEventsOptions);
|
|
3658
|
+
}
|
|
3659
|
+
}
|
|
3660
|
+
static ɵfac = function FileLoaderService_Factory(t) { return new (t || FileLoaderService)(); };
|
|
3661
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: FileLoaderService, factory: FileLoaderService.ɵfac, providedIn: 'root' });
|
|
3662
|
+
}
|
|
3663
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FileLoaderService, [{
|
|
3664
|
+
type: Injectable,
|
|
3665
|
+
args: [{
|
|
3666
|
+
providedIn: 'root',
|
|
3667
|
+
}]
|
|
3668
|
+
}], null, null); })();
|
|
3669
|
+
|
|
3670
|
+
class RingLoaderComponent {
|
|
3671
|
+
static ɵfac = function RingLoaderComponent_Factory(t) { return new (t || RingLoaderComponent)(); };
|
|
3672
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: RingLoaderComponent, selectors: [["app-ring-loader"]], decls: 5, vars: 0, consts: [[1, "ring"]], template: function RingLoaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3673
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
3674
|
+
i0.ɵɵelement(1, "div")(2, "div")(3, "div")(4, "div");
|
|
3675
|
+
i0.ɵɵelementEnd();
|
|
3676
|
+
} }, styles: [".ring[_ngcontent-%COMP%]{display:inline-block;position:relative;width:1.5rem;height:1.5rem}.ring[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{box-sizing:border-box;display:block;position:absolute;width:1.5rem;height:1.5rem;margin:.25rem .5rem;border:.25rem solid var(--phoenix-text-color);border-radius:50%;animation:animate-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--phoenix-text-color) transparent transparent transparent}.ring[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(1){animation-delay:-.45s}.ring[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(2){animation-delay:-.3s}.ring[_ngcontent-%COMP%] div[_ngcontent-%COMP%]:nth-child(3){animation-delay:-.15s}@keyframes _ngcontent-%COMP%_app-ring-loader_animate-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}"] });
|
|
3677
|
+
}
|
|
3678
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RingLoaderComponent, [{
|
|
3679
|
+
type: Component,
|
|
3680
|
+
args: [{ selector: 'app-ring-loader', template: "<div class=\"ring\">\n <div></div>\n <div></div>\n <div></div>\n <div></div>\n</div>\n", styles: [".ring{display:inline-block;position:relative;width:1.5rem;height:1.5rem}.ring div{box-sizing:border-box;display:block;position:absolute;width:1.5rem;height:1.5rem;margin:.25rem .5rem;border:.25rem solid var(--phoenix-text-color);border-radius:50%;animation:animate-ring 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--phoenix-text-color) transparent transparent transparent}.ring div:nth-child(1){animation-delay:-.45s}.ring div:nth-child(2){animation-delay:-.3s}.ring div:nth-child(3){animation-delay:-.15s}@keyframes app-ring-loader_animate-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"] }]
|
|
3681
|
+
}], null, null); })();
|
|
3682
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(RingLoaderComponent, { className: "RingLoaderComponent", filePath: "components/ring-loader/ring-loader.component.ts", lineNumber: 8 }); })();
|
|
3683
|
+
|
|
3684
|
+
function EventDataExplorerDialogComponent_app_ring_loader_4_Template(rf, ctx) { if (rf & 1) {
|
|
3685
|
+
i0.ɵɵelement(0, "app-ring-loader");
|
|
3686
|
+
} }
|
|
3687
|
+
function EventDataExplorerDialogComponent_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
3688
|
+
i0.ɵɵelementStart(0, "div");
|
|
3689
|
+
i0.ɵɵtext(1, "Error processing request.");
|
|
3690
|
+
i0.ɵɵelementEnd();
|
|
3691
|
+
} }
|
|
3692
|
+
function EventDataExplorerDialogComponent_mat_tab_group_7_Template(rf, ctx) { if (rf & 1) {
|
|
3693
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
3694
|
+
i0.ɵɵelementStart(0, "mat-tab-group", 8)(1, "mat-tab", 9)(2, "div", 10)(3, "app-file-explorer", 11);
|
|
3695
|
+
i0.ɵɵlistener("onFileSelect", function EventDataExplorerDialogComponent_mat_tab_group_7_Template_app_file_explorer_onFileSelect_3_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.loadEvent($event)); });
|
|
3696
|
+
i0.ɵɵelementEnd()()();
|
|
3697
|
+
i0.ɵɵelementStart(4, "mat-tab", 12)(5, "div", 10)(6, "app-file-explorer", 11);
|
|
3698
|
+
i0.ɵɵlistener("onFileSelect", function EventDataExplorerDialogComponent_mat_tab_group_7_Template_app_file_explorer_onFileSelect_6_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.loadConfig($event)); });
|
|
3699
|
+
i0.ɵɵelementEnd()()()();
|
|
3700
|
+
} if (rf & 2) {
|
|
3701
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
3702
|
+
i0.ɵɵadvance(3);
|
|
3703
|
+
i0.ɵɵproperty("rootFileNode", ctx_r1.eventDataFileNode);
|
|
3704
|
+
i0.ɵɵadvance(3);
|
|
3705
|
+
i0.ɵɵproperty("rootFileNode", ctx_r1.configFileNode);
|
|
3706
|
+
} }
|
|
3707
|
+
const supportFileTypes = ['json', 'xml'];
|
|
3708
|
+
class EventDataExplorerDialogComponent {
|
|
3709
|
+
eventDisplay;
|
|
3710
|
+
fileLoader;
|
|
3711
|
+
dialogRef;
|
|
3712
|
+
dialogData;
|
|
3713
|
+
eventDataFileNode;
|
|
3714
|
+
configFileNode;
|
|
3715
|
+
loading = true;
|
|
3716
|
+
error = false;
|
|
3717
|
+
constructor(eventDisplay, fileLoader, dialogRef, dialogData) {
|
|
3718
|
+
this.eventDisplay = eventDisplay;
|
|
3719
|
+
this.fileLoader = fileLoader;
|
|
3720
|
+
this.dialogRef = dialogRef;
|
|
3721
|
+
this.dialogData = dialogData;
|
|
3722
|
+
// Event data
|
|
3723
|
+
fileLoader.makeRequest(this.dialogData.apiURL, 'json', (res) => {
|
|
3724
|
+
const filePaths = res.filter((file) => supportFileTypes.includes(file.name.split('.').pop()));
|
|
3725
|
+
this.eventDataFileNode = this.buildFileNode(filePaths);
|
|
3726
|
+
});
|
|
3727
|
+
// Config
|
|
3728
|
+
fileLoader.makeRequest(`${this.dialogData.apiURL}?type=config`, 'json', (res) => {
|
|
3729
|
+
const filePaths = res.filter((file) => file.name.split('.').pop() === 'json');
|
|
3730
|
+
this.configFileNode = this.buildFileNode(filePaths);
|
|
3731
|
+
});
|
|
3732
|
+
}
|
|
3733
|
+
loadEvent(file) {
|
|
3734
|
+
this.loading = true;
|
|
3735
|
+
this.error = this.fileLoader.loadEvent(file.url, this.eventDisplay, file.nocache ? { cache: 'no-cache' } : {});
|
|
3736
|
+
this.loading = false;
|
|
3737
|
+
if (!this.error)
|
|
3738
|
+
this.onClose();
|
|
3739
|
+
}
|
|
3740
|
+
loadConfig(file) {
|
|
3741
|
+
this.loading = true;
|
|
3742
|
+
this.error = this.fileLoader.makeRequest(`${this.dialogData.apiURL}?type=config&f=${file.url}`, 'text', (config) => {
|
|
3743
|
+
const stateManager = this.eventDisplay.getStateManager();
|
|
3744
|
+
stateManager.loadStateFromJSON(JSON.parse(config));
|
|
3745
|
+
this.onClose();
|
|
3746
|
+
});
|
|
3747
|
+
this.loading = false;
|
|
3748
|
+
}
|
|
3749
|
+
// Helpers
|
|
3750
|
+
onClose() {
|
|
3751
|
+
this.dialogRef.close();
|
|
3752
|
+
}
|
|
3753
|
+
buildFileNode(filePaths) {
|
|
3754
|
+
const rootNode = new FileNode();
|
|
3755
|
+
let fileNode = rootNode;
|
|
3756
|
+
for (const filePath of filePaths) {
|
|
3757
|
+
filePath.name.split('/').forEach((name) => {
|
|
3758
|
+
fileNode.children = fileNode.children ?? {};
|
|
3759
|
+
fileNode.children[name] = fileNode.children[name] ?? new FileNode(name);
|
|
3760
|
+
fileNode = fileNode.children[name];
|
|
3761
|
+
});
|
|
3762
|
+
fileNode.url = filePath.url;
|
|
3763
|
+
fileNode.nocache = filePath.nocache;
|
|
3764
|
+
fileNode = rootNode;
|
|
3765
|
+
}
|
|
3766
|
+
return rootNode;
|
|
3767
|
+
}
|
|
3768
|
+
static ɵfac = function EventDataExplorerDialogComponent_Factory(t) { return new (t || EventDataExplorerDialogComponent)(i0.ɵɵdirectiveInject(EventDisplayService), i0.ɵɵdirectiveInject(FileLoaderService), i0.ɵɵdirectiveInject(i1$2.MatDialogRef), i0.ɵɵdirectiveInject(MAT_DIALOG_DATA)); };
|
|
3769
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventDataExplorerDialogComponent, selectors: [["app-event-data-explorer-dialog"]], decls: 11, vars: 3, consts: [[1, "dialog"], [1, "d-flex"], ["mat-dialog-title", ""], [4, "ngIf"], ["mat-dialog-content", "", 1, "dialog-content"], ["mat-align-tabs", "start", "animationDuration", "0ms", "disableRipple", "", "opacity", "transparent", 4, "ngIf"], ["mat-dialog-actions", ""], ["mat-button", "", "cdkFocusInitial", "", 3, "click"], ["mat-align-tabs", "start", "animationDuration", "0ms", "disableRipple", "", "opacity", "transparent"], ["label", "Event data"], [1, "py-3"], [3, "onFileSelect", "rootFileNode"], ["label", "Config"]], template: function EventDataExplorerDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3770
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "h1", 2);
|
|
3771
|
+
i0.ɵɵtext(3, "Event data from directory");
|
|
3772
|
+
i0.ɵɵelementEnd();
|
|
3773
|
+
i0.ɵɵtemplate(4, EventDataExplorerDialogComponent_app_ring_loader_4_Template, 1, 0, "app-ring-loader", 3);
|
|
3774
|
+
i0.ɵɵelementEnd();
|
|
3775
|
+
i0.ɵɵelementStart(5, "div", 4);
|
|
3776
|
+
i0.ɵɵtemplate(6, EventDataExplorerDialogComponent_div_6_Template, 2, 0, "div", 3)(7, EventDataExplorerDialogComponent_mat_tab_group_7_Template, 7, 2, "mat-tab-group", 5);
|
|
3777
|
+
i0.ɵɵelementEnd();
|
|
3778
|
+
i0.ɵɵelementStart(8, "div", 6)(9, "button", 7);
|
|
3779
|
+
i0.ɵɵlistener("click", function EventDataExplorerDialogComponent_Template_button_click_9_listener() { return ctx.onClose(); });
|
|
3780
|
+
i0.ɵɵtext(10, "Close");
|
|
3781
|
+
i0.ɵɵelementEnd()()();
|
|
3782
|
+
} if (rf & 2) {
|
|
3783
|
+
i0.ɵɵadvance(4);
|
|
3784
|
+
i0.ɵɵproperty("ngIf", ctx.loading);
|
|
3785
|
+
i0.ɵɵadvance(2);
|
|
3786
|
+
i0.ɵɵproperty("ngIf", ctx.error);
|
|
3787
|
+
i0.ɵɵadvance();
|
|
3788
|
+
i0.ɵɵproperty("ngIf", !ctx.error);
|
|
3789
|
+
} }, dependencies: [i2.NgIf, i1$2.MatDialogTitle, i1$2.MatDialogActions, i1$2.MatDialogContent, i3.MatButton, i6.MatTab, i6.MatTabGroup, FileExplorerComponent, RingLoaderComponent], styles: [".dialog[_ngcontent-%COMP%]{width:30rem;max-width:95%}.file-path-button[_ngcontent-%COMP%]{width:100%;color:var(--phoenix-text-color);background:var(--phoenix-background-color-tertiary);text-align:left;border-radius:1rem;margin-bottom:.5rem;padding:.5rem 1rem}.file-path-button[_ngcontent-%COMP%]:last-child{margin-bottom:0}.file-path-button[_ngcontent-%COMP%]:hover{background:var(--phoenix-background-color-secondary)}.file-path-button[_ngcontent-%COMP%]:focus{border:1px solid var(--phoenix-text-color-secondary);box-shadow:none}"] });
|
|
3790
|
+
}
|
|
3791
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventDataExplorerDialogComponent, [{
|
|
3792
|
+
type: Component,
|
|
3793
|
+
args: [{ selector: 'app-event-data-explorer-dialog', template: "<div class=\"dialog\">\n <div class=\"d-flex\">\n <h1 mat-dialog-title>Event data from directory</h1>\n <app-ring-loader *ngIf=\"loading\"></app-ring-loader>\n </div>\n <div mat-dialog-content class=\"dialog-content\">\n <div *ngIf=\"error\">Error processing request.</div>\n <mat-tab-group\n *ngIf=\"!error\"\n mat-align-tabs=\"start\"\n animationDuration=\"0ms\"\n disableRipple\n opacity=\"transparent\"\n >\n <mat-tab label=\"Event data\">\n <div class=\"py-3\">\n <app-file-explorer\n [rootFileNode]=\"eventDataFileNode\"\n (onFileSelect)=\"loadEvent($event)\"\n ></app-file-explorer>\n </div>\n </mat-tab>\n <mat-tab label=\"Config\">\n <div class=\"py-3\">\n <app-file-explorer\n [rootFileNode]=\"configFileNode\"\n (onFileSelect)=\"loadConfig($event)\"\n ></app-file-explorer>\n </div>\n </mat-tab>\n </mat-tab-group>\n </div>\n <div mat-dialog-actions>\n <button mat-button (click)=\"onClose()\" cdkFocusInitial>Close</button>\n </div>\n</div>\n", styles: [".dialog{width:30rem;max-width:95%}.file-path-button{width:100%;color:var(--phoenix-text-color);background:var(--phoenix-background-color-tertiary);text-align:left;border-radius:1rem;margin-bottom:.5rem;padding:.5rem 1rem}.file-path-button:last-child{margin-bottom:0}.file-path-button:hover{background:var(--phoenix-background-color-secondary)}.file-path-button:focus{border:1px solid var(--phoenix-text-color-secondary);box-shadow:none}\n"] }]
|
|
3794
|
+
}], () => [{ type: EventDisplayService }, { type: FileLoaderService }, { type: i1$2.MatDialogRef }, { type: undefined, decorators: [{
|
|
3795
|
+
type: Inject,
|
|
3796
|
+
args: [MAT_DIALOG_DATA]
|
|
3797
|
+
}] }], null); })();
|
|
3798
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventDataExplorerDialogComponent, { className: "EventDataExplorerDialogComponent", filePath: "components/ui-menu/event-data-explorer/event-data-explorer-dialog/event-data-explorer-dialog.component.ts", lineNumber: 24 }); })();
|
|
3799
|
+
|
|
3800
|
+
class EventDataExplorerComponent {
|
|
3801
|
+
dialog;
|
|
3802
|
+
apiURL;
|
|
3803
|
+
constructor(dialog) {
|
|
3804
|
+
this.dialog = dialog;
|
|
3805
|
+
}
|
|
3806
|
+
openEventDataExplorerDialog() {
|
|
3807
|
+
this.dialog.open(EventDataExplorerDialogComponent, {
|
|
3808
|
+
data: {
|
|
3809
|
+
apiURL: this.apiURL,
|
|
3810
|
+
},
|
|
3811
|
+
});
|
|
3812
|
+
}
|
|
3813
|
+
static ɵfac = function EventDataExplorerComponent_Factory(t) { return new (t || EventDataExplorerComponent)(i0.ɵɵdirectiveInject(i1$2.MatDialog)); };
|
|
3814
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EventDataExplorerComponent, selectors: [["app-event-data-explorer"]], inputs: { apiURL: "apiURL" }, decls: 1, vars: 1, consts: [["tooltip", "Browse events in data directory", "icon", "server", 3, "click", "active"]], template: function EventDataExplorerComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3815
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
3816
|
+
i0.ɵɵlistener("click", function EventDataExplorerComponent_Template_app_menu_toggle_click_0_listener() { return ctx.openEventDataExplorerDialog(); });
|
|
3817
|
+
i0.ɵɵelementEnd();
|
|
3818
|
+
} if (rf & 2) {
|
|
3819
|
+
i0.ɵɵproperty("active", false);
|
|
3820
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
3821
|
+
}
|
|
3822
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventDataExplorerComponent, [{
|
|
3823
|
+
type: Component,
|
|
3824
|
+
args: [{ selector: 'app-event-data-explorer', template: "<app-menu-toggle\n tooltip=\"Browse events in data directory\"\n icon=\"server\"\n [active]=\"false\"\n (click)=\"openEventDataExplorerDialog()\"\n>\n</app-menu-toggle>\n" }]
|
|
3825
|
+
}], () => [{ type: i1$2.MatDialog }], { apiURL: [{
|
|
3826
|
+
type: Input
|
|
3827
|
+
}] }); })();
|
|
3828
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EventDataExplorerComponent, { className: "EventDataExplorerComponent", filePath: "components/ui-menu/event-data-explorer/event-data-explorer.component.ts", lineNumber: 14 }); })();
|
|
3829
|
+
|
|
3830
|
+
const _c0$1 = (a0, a1) => ({ "active-icon": a0, "reload-icon": a1 });
|
|
3831
|
+
class CycleEventsComponent {
|
|
3832
|
+
eventDisplay;
|
|
3833
|
+
fileLoader;
|
|
3834
|
+
interval;
|
|
3835
|
+
tooltip;
|
|
3836
|
+
icon;
|
|
3837
|
+
// There are actually 3 states we go through when clicking this component :
|
|
3838
|
+
// - not active : so we are not cycling throught events
|
|
3839
|
+
// - active and not reloading : cycling over the events stored in events
|
|
3840
|
+
// - active and reloading : cycling and reloading the events when reaching the end
|
|
3841
|
+
// Last state is useful e.g. for live feed of events
|
|
3842
|
+
active = false;
|
|
3843
|
+
reloading = false;
|
|
3844
|
+
intervalId;
|
|
3845
|
+
events;
|
|
3846
|
+
constructor(eventDisplay, fileLoader) {
|
|
3847
|
+
this.eventDisplay = eventDisplay;
|
|
3848
|
+
this.fileLoader = fileLoader;
|
|
3849
|
+
}
|
|
3850
|
+
ngOnInit() {
|
|
3851
|
+
this.eventDisplay.listenToLoadedEventsChange((events) => {
|
|
3852
|
+
this.events = events;
|
|
3853
|
+
if (this.active) {
|
|
3854
|
+
// restart cycling from first event
|
|
3855
|
+
clearInterval(this.intervalId);
|
|
3856
|
+
this.startCycleInterval();
|
|
3857
|
+
}
|
|
3858
|
+
});
|
|
3859
|
+
}
|
|
3860
|
+
toggleCycle() {
|
|
3861
|
+
this.reloading = this.active && !this.reloading;
|
|
3862
|
+
this.active = !this.active || this.reloading;
|
|
3863
|
+
console.log(this.active, this.reloading);
|
|
3864
|
+
clearInterval(this.intervalId);
|
|
3865
|
+
if (this.active) {
|
|
3866
|
+
this.startCycleInterval();
|
|
3867
|
+
}
|
|
3868
|
+
}
|
|
3869
|
+
startCycleInterval(startIndex = 0) {
|
|
3870
|
+
// load immediately first event
|
|
3871
|
+
let index = startIndex;
|
|
3872
|
+
this.eventDisplay.loadEvent(this.events[index]);
|
|
3873
|
+
index = index + 1 >= this.events.length ? -1 : index + 1;
|
|
3874
|
+
// launch automatic cycling
|
|
3875
|
+
this.intervalId = setInterval(() => {
|
|
3876
|
+
// special value -1 is used to denote wrapping of the current set of events
|
|
3877
|
+
if (index == -1) {
|
|
3878
|
+
if (this.reloading) {
|
|
3879
|
+
// reload the current events, ignoring caches
|
|
3880
|
+
this.fileLoader.reloadLastEvents(this.eventDisplay);
|
|
3881
|
+
}
|
|
3882
|
+
// put back index to 0 to start with first event anyway
|
|
3883
|
+
index = 0;
|
|
3884
|
+
}
|
|
3885
|
+
this.eventDisplay.loadEvent(this.events[index]);
|
|
3886
|
+
index = index + 1 >= this.events.length ? -1 : index + 1;
|
|
3887
|
+
}, this.interval);
|
|
3888
|
+
}
|
|
3889
|
+
static ɵfac = function CycleEventsComponent_Factory(t) { return new (t || CycleEventsComponent)(i0.ɵɵdirectiveInject(EventDisplayService), i0.ɵɵdirectiveInject(FileLoaderService)); };
|
|
3890
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CycleEventsComponent, selectors: [["app-cycle-events"]], inputs: { interval: "interval", tooltip: "tooltip", icon: "icon" }, decls: 3, vars: 4, consts: [["matTooltip", "Cycle (off/on/on+reload)", "matTooltipPosition", "above", "matTooltipTouchGestures", "off", 1, "cycle-events", 3, "click"], [1, "cycle-events-icon", 3, "ngClass"], ["href", "assets/icons/cycle-events.svg#cycle-events"]], template: function CycleEventsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3891
|
+
i0.ɵɵelementStart(0, "button", 0);
|
|
3892
|
+
i0.ɵɵlistener("click", function CycleEventsComponent_Template_button_click_0_listener() { return ctx.toggleCycle(); });
|
|
3893
|
+
i0.ɵɵnamespaceSVG();
|
|
3894
|
+
i0.ɵɵelementStart(1, "svg", 1);
|
|
3895
|
+
i0.ɵɵelement(2, "use", 2);
|
|
3896
|
+
i0.ɵɵelementEnd()();
|
|
3897
|
+
} if (rf & 2) {
|
|
3898
|
+
i0.ɵɵadvance();
|
|
3899
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction2(1, _c0$1, ctx.active, ctx.reloading));
|
|
3900
|
+
} }, dependencies: [i2.NgClass, i3$1.MatTooltip], styles: ["[_nghost-%COMP%]{display:flex;margin:0 .6rem}[_nghost-%COMP%] .cycle-events[_ngcontent-%COMP%]{display:flex;background:unset;border:none;height:2.5rem;width:2.5rem;min-height:2.5rem;min-width:2.5rem;padding:.65rem;cursor:pointer;align-self:center;transition:all .4s}[_nghost-%COMP%] .cycle-events-icon[_ngcontent-%COMP%]{width:100%;height:100%}[_nghost-%COMP%] .cycle-events-icon.active-icon[_ngcontent-%COMP%]{--phoenix-options-icon-path: #00bcd4}[_nghost-%COMP%] .cycle-events-icon.reload-icon[_ngcontent-%COMP%]{--phoenix-options-icon-path: #77dd77}[_nghost-%COMP%] .cycle-events[_ngcontent-%COMP%]:hover{background-color:var(--phoenix-options-icon-bg);border-radius:40%;transition:all .4s}[_nghost-%COMP%] .cycle-events.disabled[_ngcontent-%COMP%]{cursor:not-allowed;opacity:.4}"] });
|
|
3901
|
+
}
|
|
3902
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CycleEventsComponent, [{
|
|
3903
|
+
type: Component,
|
|
3904
|
+
args: [{ selector: 'app-cycle-events', template: "<button\n class=\"cycle-events\"\n matTooltip=\"Cycle (off/on/on+reload)\"\n matTooltipPosition=\"above\"\n matTooltipTouchGestures=\"off\"\n (click)=\"toggleCycle()\"\n>\n <svg\n class=\"cycle-events-icon\"\n [ngClass]=\"{ 'active-icon': active, 'reload-icon': reloading }\"\n >\n <use href=\"assets/icons/cycle-events.svg#cycle-events\"></use>\n </svg>\n</button>\n", styles: [":host{display:flex;margin:0 .6rem}:host .cycle-events{display:flex;background:unset;border:none;height:2.5rem;width:2.5rem;min-height:2.5rem;min-width:2.5rem;padding:.65rem;cursor:pointer;align-self:center;transition:all .4s}:host .cycle-events-icon{width:100%;height:100%}:host .cycle-events-icon.active-icon{--phoenix-options-icon-path: #00bcd4}:host .cycle-events-icon.reload-icon{--phoenix-options-icon-path: #77dd77}:host .cycle-events:hover{background-color:var(--phoenix-options-icon-bg);border-radius:40%;transition:all .4s}:host .cycle-events.disabled{cursor:not-allowed;opacity:.4}\n"] }]
|
|
3905
|
+
}], () => [{ type: EventDisplayService }, { type: FileLoaderService }], { interval: [{
|
|
3906
|
+
type: Input
|
|
3907
|
+
}], tooltip: [{
|
|
3908
|
+
type: Input
|
|
3909
|
+
}], icon: [{
|
|
3910
|
+
type: Input
|
|
3911
|
+
}] }); })();
|
|
3912
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(CycleEventsComponent, { className: "CycleEventsComponent", filePath: "components/ui-menu/cycle-events/cycle-events.component.ts", lineNumber: 10 }); })();
|
|
3913
|
+
|
|
3914
|
+
class ErrorMessageService {
|
|
3915
|
+
/** A variable that stores the latest error thrown. */
|
|
3916
|
+
error = new ActiveVariable();
|
|
3917
|
+
/**
|
|
3918
|
+
* Subscribe to when an error occurs.
|
|
3919
|
+
* @param callback A function called when an error occurs.
|
|
3920
|
+
*/
|
|
3921
|
+
subscribeToError(callback) {
|
|
3922
|
+
this.error.onUpdate(callback);
|
|
3923
|
+
}
|
|
3924
|
+
/**
|
|
3925
|
+
* Set the current error.
|
|
3926
|
+
* @param error The error that has occurred.
|
|
3927
|
+
*/
|
|
3928
|
+
setError(error) {
|
|
3929
|
+
this.error.update(error);
|
|
3930
|
+
}
|
|
3931
|
+
static ɵfac = function ErrorMessageService_Factory(t) { return new (t || ErrorMessageService)(); };
|
|
3932
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: ErrorMessageService, factory: ErrorMessageService.ɵfac, providedIn: 'root' });
|
|
3933
|
+
}
|
|
3934
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorMessageService, [{
|
|
3935
|
+
type: Injectable,
|
|
3936
|
+
args: [{
|
|
3937
|
+
providedIn: 'root',
|
|
3938
|
+
}]
|
|
3939
|
+
}], null, null); })();
|
|
3940
|
+
|
|
3941
|
+
const _c0 = a0 => ({ "load-complete": a0 });
|
|
3942
|
+
const _c1 = a0 => ({ width: a0 });
|
|
3943
|
+
function LoaderComponent_ng_container_1_div_7_Template(rf, ctx) { if (rf & 1) {
|
|
3944
|
+
i0.ɵɵelementStart(0, "div", 7);
|
|
3945
|
+
i0.ɵɵelement(1, "span");
|
|
3946
|
+
i0.ɵɵelementEnd();
|
|
3947
|
+
} if (rf & 2) {
|
|
3948
|
+
const ctx_r0 = i0.ɵɵnextContext(2);
|
|
3949
|
+
i0.ɵɵadvance();
|
|
3950
|
+
i0.ɵɵstyleMap(i0.ɵɵpureFunction1(2, _c1, ctx_r0.progress + "%"));
|
|
3951
|
+
} }
|
|
3952
|
+
function LoaderComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
3953
|
+
i0.ɵɵelementContainerStart(0);
|
|
3954
|
+
i0.ɵɵelement(1, "img", 3);
|
|
3955
|
+
i0.ɵɵelementStart(2, "p", 4);
|
|
3956
|
+
i0.ɵɵtext(3, " Loading...");
|
|
3957
|
+
i0.ɵɵelement(4, "br");
|
|
3958
|
+
i0.ɵɵelementStart(5, "small", 5);
|
|
3959
|
+
i0.ɵɵtext(6, "(This may take a while)");
|
|
3960
|
+
i0.ɵɵelementEnd()();
|
|
3961
|
+
i0.ɵɵtemplate(7, LoaderComponent_ng_container_1_div_7_Template, 2, 4, "div", 6);
|
|
3962
|
+
i0.ɵɵelementContainerEnd();
|
|
3963
|
+
} if (rf & 2) {
|
|
3964
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
3965
|
+
i0.ɵɵadvance(7);
|
|
3966
|
+
i0.ɵɵproperty("ngIf", ctx_r0.progress !== undefined);
|
|
3967
|
+
} }
|
|
3968
|
+
function LoaderComponent_ng_template_2_Template(rf, ctx) { if (rf & 1) {
|
|
3969
|
+
i0.ɵɵelementStart(0, "p");
|
|
3970
|
+
i0.ɵɵtext(1, " An error occurred while loading the application. Please try refreshing the page. ");
|
|
3971
|
+
i0.ɵɵelementEnd();
|
|
3972
|
+
} }
|
|
3973
|
+
class LoaderComponent {
|
|
3974
|
+
errorMessageService;
|
|
3975
|
+
loaded = false;
|
|
3976
|
+
progress;
|
|
3977
|
+
error;
|
|
3978
|
+
constructor(errorMessageService) {
|
|
3979
|
+
this.errorMessageService = errorMessageService;
|
|
3980
|
+
this.errorMessageService.subscribeToError((error) => {
|
|
3981
|
+
if (!this.loaded) {
|
|
3982
|
+
this.error = error;
|
|
3983
|
+
}
|
|
3984
|
+
});
|
|
3985
|
+
}
|
|
3986
|
+
static ɵfac = function LoaderComponent_Factory(t) { return new (t || LoaderComponent)(i0.ɵɵdirectiveInject(ErrorMessageService)); };
|
|
3987
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: LoaderComponent, selectors: [["app-loader"]], inputs: { loaded: "loaded", progress: "progress" }, decls: 4, vars: 5, consts: [["errorContainer", ""], [1, "loader-wrapper", "d-flex", "position-absolute", "flex-column", "justify-content-center", "align-items-center", "w-100", "h-100", "p-5", "text-center", 3, "ngClass"], [4, "ngIf", "ngIfElse"], ["src", "assets/images/logo-small.svg", "alt", "Loader"], [1, "mt-5"], [1, "text-muted"], ["class", "loading-bar", 4, "ngIf"], [1, "loading-bar"]], template: function LoaderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
3988
|
+
i0.ɵɵelementStart(0, "div", 1);
|
|
3989
|
+
i0.ɵɵtemplate(1, LoaderComponent_ng_container_1_Template, 8, 1, "ng-container", 2)(2, LoaderComponent_ng_template_2_Template, 2, 0, "ng-template", null, 0, i0.ɵɵtemplateRefExtractor);
|
|
3990
|
+
i0.ɵɵelementEnd();
|
|
3991
|
+
} if (rf & 2) {
|
|
3992
|
+
const errorContainer_r2 = i0.ɵɵreference(3);
|
|
3993
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(3, _c0, ctx.loaded));
|
|
3994
|
+
i0.ɵɵadvance();
|
|
3995
|
+
i0.ɵɵproperty("ngIf", ctx.error === undefined)("ngIfElse", errorContainer_r2);
|
|
3996
|
+
} }, dependencies: [i2.NgClass, i2.NgIf], styles: [".loader-wrapper[_ngcontent-%COMP%]{background:var(--phoenix-background-color);z-index:9998}.loader-wrapper.load-complete[_ngcontent-%COMP%]{display:none!important}.loader-wrapper[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{width:5rem;height:5rem;animation:loader 2s infinite}.loader-wrapper[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:var(--phoenix-text-color)}.loader-wrapper[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%]{width:15rem;max-width:90%;height:.5rem;background:var(--phoenix-background-color-tertiary);border-radius:2.5rem;overflow:hidden}.loader-wrapper[_ngcontent-%COMP%] .loading-bar[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{display:block;height:100%;border-radius:2.5rem;background:linear-gradient(to right,var(--phoenix-primary),var(--phoenix-secondary));transition:all .5s}@keyframes _ngcontent-%COMP%_app-loader_loader{0%,to{transform:scale(.1) rotate(0)}95%{transform:scale(1) rotate(15deg)}}"] });
|
|
3997
|
+
}
|
|
3998
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoaderComponent, [{
|
|
3999
|
+
type: Component,
|
|
4000
|
+
args: [{ selector: 'app-loader', template: "<div\n class=\"loader-wrapper d-flex position-absolute flex-column justify-content-center align-items-center w-100 h-100 p-5 text-center\"\n [ngClass]=\"{ 'load-complete': loaded }\"\n>\n <ng-container *ngIf=\"error === undefined; else errorContainer\">\n <img src=\"assets/images/logo-small.svg\" alt=\"Loader\" />\n <p class=\"mt-5\">\n Loading...<br />\n <small class=\"text-muted\">(This may take a while)</small>\n </p>\n <div class=\"loading-bar\" *ngIf=\"progress !== undefined\">\n <span [style]=\"{ width: progress + '%' }\"></span>\n </div>\n </ng-container>\n <ng-template #errorContainer>\n <p>\n An error occurred while loading the application. Please try refreshing the\n page.\n </p>\n </ng-template>\n</div>\n", styles: [".loader-wrapper{background:var(--phoenix-background-color);z-index:9998}.loader-wrapper.load-complete{display:none!important}.loader-wrapper img{width:5rem;height:5rem;animation:loader 2s infinite}.loader-wrapper p{color:var(--phoenix-text-color)}.loader-wrapper .loading-bar{width:15rem;max-width:90%;height:.5rem;background:var(--phoenix-background-color-tertiary);border-radius:2.5rem;overflow:hidden}.loader-wrapper .loading-bar span{display:block;height:100%;border-radius:2.5rem;background:linear-gradient(to right,var(--phoenix-primary),var(--phoenix-secondary));transition:all .5s}@keyframes app-loader_loader{0%,to{transform:scale(.1) rotate(0)}95%{transform:scale(1) rotate(15deg)}}\n"] }]
|
|
4001
|
+
}], () => [{ type: ErrorMessageService }], { loaded: [{
|
|
4002
|
+
type: Input
|
|
4003
|
+
}], progress: [{
|
|
4004
|
+
type: Input
|
|
4005
|
+
}] }); })();
|
|
4006
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(LoaderComponent, { className: "LoaderComponent", filePath: "components/loader/loader.component.ts", lineNumber: 9 }); })();
|
|
4007
|
+
|
|
4008
|
+
/**
|
|
4009
|
+
* Global handler for handling app/module wide errors.
|
|
4010
|
+
*/
|
|
4011
|
+
class GlobalErrorHandler {
|
|
4012
|
+
injector;
|
|
4013
|
+
/**
|
|
4014
|
+
* Instantiate the global error handler.
|
|
4015
|
+
* @param injector Injector for getting the error message service.
|
|
4016
|
+
*/
|
|
4017
|
+
constructor(injector) {
|
|
4018
|
+
this.injector = injector;
|
|
4019
|
+
}
|
|
4020
|
+
/**
|
|
4021
|
+
* A handler for handling the global error that occurs in the app.
|
|
4022
|
+
* @param error The error that occurred.
|
|
4023
|
+
*/
|
|
4024
|
+
handleError(error) {
|
|
4025
|
+
console.error('ERROR IN PHOENIX APP', '\n', error);
|
|
4026
|
+
this.injector.get(ErrorMessageService).setError(error);
|
|
4027
|
+
}
|
|
4028
|
+
static ɵfac = function GlobalErrorHandler_Factory(t) { return new (t || GlobalErrorHandler)(i0.ɵɵinject(i0.Injector)); };
|
|
4029
|
+
static ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: GlobalErrorHandler, factory: GlobalErrorHandler.ɵfac });
|
|
4030
|
+
}
|
|
4031
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GlobalErrorHandler, [{
|
|
4032
|
+
type: Injectable
|
|
4033
|
+
}], () => [{ type: i0.Injector }], null); })();
|
|
4034
|
+
|
|
4035
|
+
class ExperimentLinkComponent {
|
|
4036
|
+
experimentLink;
|
|
4037
|
+
ngOnInit() {
|
|
4038
|
+
// we just want to remove the "&embed=true" instruction here.
|
|
4039
|
+
const url = new URL(window.location.href);
|
|
4040
|
+
url.searchParams.delete('embed');
|
|
4041
|
+
this.experimentLink = url.toString();
|
|
4042
|
+
}
|
|
4043
|
+
goToExperiment() {
|
|
4044
|
+
window.open(this.experimentLink, '_blank');
|
|
4045
|
+
}
|
|
4046
|
+
static ɵfac = function ExperimentLinkComponent_Factory(t) { return new (t || ExperimentLinkComponent)(); };
|
|
4047
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ExperimentLinkComponent, selectors: [["app-experiment-link"]], decls: 1, vars: 0, consts: [["tooltip", "See full event display", "icon", "link", 3, "click"]], template: function ExperimentLinkComponent_Template(rf, ctx) { if (rf & 1) {
|
|
4048
|
+
i0.ɵɵelementStart(0, "app-menu-toggle", 0);
|
|
4049
|
+
i0.ɵɵlistener("click", function ExperimentLinkComponent_Template_app_menu_toggle_click_0_listener() { return ctx.goToExperiment(); });
|
|
4050
|
+
i0.ɵɵelementEnd();
|
|
4051
|
+
} }, dependencies: [MenuToggleComponent] });
|
|
4052
|
+
}
|
|
4053
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ExperimentLinkComponent, [{
|
|
4054
|
+
type: Component,
|
|
4055
|
+
args: [{ selector: 'app-experiment-link', template: "<app-menu-toggle\n tooltip=\"See full event display\"\n icon=\"link\"\n (click)=\"goToExperiment()\"\n></app-menu-toggle>\n" }]
|
|
4056
|
+
}], null, null); })();
|
|
4057
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(ExperimentLinkComponent, { className: "ExperimentLinkComponent", filePath: "components/embed-menu/experiment-link/experiment-link.component.ts", lineNumber: 8 }); })();
|
|
4058
|
+
|
|
4059
|
+
class EmbedMenuComponent {
|
|
4060
|
+
static ɵfac = function EmbedMenuComponent_Factory(t) { return new (t || EmbedMenuComponent)(); };
|
|
4061
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: EmbedMenuComponent, selectors: [["app-embed-menu"]], decls: 8, vars: 0, consts: [["id", "embedMenu"], ["id", "embedMenuInner"]], template: function EmbedMenuComponent_Template(rf, ctx) { if (rf & 1) {
|
|
4062
|
+
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);
|
|
4063
|
+
i0.ɵɵelement(2, "app-dark-theme")(3, "app-auto-rotate")(4, "app-main-view-toggle")(5, "app-animate-event")(6, "app-animate-camera")(7, "app-experiment-link");
|
|
4064
|
+
i0.ɵɵelementEnd()();
|
|
4065
|
+
} }, dependencies: [DarkThemeComponent, AutoRotateComponent, MainViewToggleComponent, AnimateCameraComponent, AnimateEventComponent, ExperimentLinkComponent], styles: ["#embedMenu[_ngcontent-%COMP%]{display:none}#embedMenu[_ngcontent-%COMP%] #embedMenuInner[_ngcontent-%COMP%]{display:flex;position:absolute;left:1rem;bottom:1rem;background:var(--phoenix-background-color-secondary);border:1px solid var(--phoenix-background-color-tertiary);box-shadow:var(--phoenix-box-shadow);border-radius:30px;padding:.25rem 0}"] });
|
|
4066
|
+
}
|
|
4067
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EmbedMenuComponent, [{
|
|
4068
|
+
type: Component,
|
|
4069
|
+
args: [{ selector: 'app-embed-menu', template: "<div id=\"embedMenu\">\n <div id=\"embedMenuInner\">\n <app-dark-theme></app-dark-theme>\n <app-auto-rotate></app-auto-rotate>\n <app-main-view-toggle></app-main-view-toggle>\n <app-animate-event></app-animate-event>\n <app-animate-camera></app-animate-camera>\n <app-experiment-link></app-experiment-link>\n </div>\n</div>\n", styles: ["#embedMenu{display:none}#embedMenu #embedMenuInner{display:flex;position:absolute;left:1rem;bottom:1rem;background:var(--phoenix-background-color-secondary);border:1px solid var(--phoenix-background-color-tertiary);box-shadow:var(--phoenix-box-shadow);border-radius:30px;padding:.25rem 0}\n"] }]
|
|
4070
|
+
}], null, null); })();
|
|
4071
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(EmbedMenuComponent, { className: "EmbedMenuComponent", filePath: "components/embed-menu/embed-menu.component.ts", lineNumber: 8 }); })();
|
|
4072
|
+
|
|
4073
|
+
const PHOENIX_COMPONENTS = [
|
|
4074
|
+
NavComponent,
|
|
4075
|
+
UiMenuWrapperComponent,
|
|
4076
|
+
UiMenuComponent,
|
|
4077
|
+
CollectionsInfoComponent,
|
|
4078
|
+
GeometryBrowserComponent,
|
|
4079
|
+
GeometryBrowserOverlayComponent,
|
|
4080
|
+
MenuToggleComponent,
|
|
4081
|
+
CollectionsInfoOverlayComponent,
|
|
4082
|
+
IoOptionsComponent,
|
|
4083
|
+
IOOptionsDialogComponent,
|
|
4084
|
+
OverlayViewComponent,
|
|
4085
|
+
AttributePipe,
|
|
4086
|
+
ObjectSelectionComponent,
|
|
4087
|
+
ObjectSelectionOverlayComponent,
|
|
4088
|
+
EventSelectorComponent,
|
|
4089
|
+
ObjectClippingComponent,
|
|
4090
|
+
DarkThemeComponent,
|
|
4091
|
+
AutoRotateComponent,
|
|
4092
|
+
ViewOptionsComponent,
|
|
4093
|
+
CartesianGridConfigComponent,
|
|
4094
|
+
OverlayViewWindowComponent,
|
|
4095
|
+
OverlayComponent,
|
|
4096
|
+
ExperimentInfoComponent,
|
|
4097
|
+
InfoPanelComponent,
|
|
4098
|
+
InfoPanelOverlayComponent,
|
|
4099
|
+
MainViewToggleComponent,
|
|
4100
|
+
ZoomControlsComponent,
|
|
4101
|
+
TreeMenuComponent,
|
|
4102
|
+
TreeMenuItemComponent,
|
|
4103
|
+
PhoenixMenuComponent,
|
|
4104
|
+
PhoenixMenuItemComponent,
|
|
4105
|
+
ConfigSliderComponent,
|
|
4106
|
+
AnimateCameraComponent,
|
|
4107
|
+
AnimateEventComponent,
|
|
4108
|
+
VrToggleComponent,
|
|
4109
|
+
ArToggleComponent,
|
|
4110
|
+
SSModeComponent,
|
|
4111
|
+
MakePictureComponent,
|
|
4112
|
+
PerformanceToggleComponent,
|
|
4113
|
+
LoaderComponent,
|
|
4114
|
+
ShareLinkComponent,
|
|
4115
|
+
ShareLinkDialogComponent,
|
|
4116
|
+
EmbedMenuComponent,
|
|
4117
|
+
ExperimentLinkComponent,
|
|
4118
|
+
EventDataExplorerComponent,
|
|
4119
|
+
EventDataExplorerDialogComponent,
|
|
4120
|
+
FileExplorerComponent,
|
|
4121
|
+
RingLoaderComponent,
|
|
4122
|
+
CycleEventsComponent,
|
|
4123
|
+
];
|
|
4124
|
+
class PhoenixUIModule {
|
|
4125
|
+
static ɵfac = function PhoenixUIModule_Factory(t) { return new (t || PhoenixUIModule)(); };
|
|
4126
|
+
static ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: PhoenixUIModule });
|
|
4127
|
+
static ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ providers: [
|
|
4128
|
+
EventDisplayService,
|
|
4129
|
+
ErrorMessageService,
|
|
4130
|
+
{
|
|
4131
|
+
provide: ErrorHandler,
|
|
4132
|
+
useClass: GlobalErrorHandler,
|
|
4133
|
+
},
|
|
4134
|
+
], imports: [CommonModule,
|
|
4135
|
+
RouterModule,
|
|
4136
|
+
DragDropModule,
|
|
4137
|
+
MatDialogModule,
|
|
4138
|
+
MatButtonModule,
|
|
4139
|
+
MatTooltipModule,
|
|
4140
|
+
OverlayModule,
|
|
4141
|
+
FormsModule,
|
|
4142
|
+
MatMenuModule,
|
|
4143
|
+
MatRadioModule,
|
|
4144
|
+
MatSliderModule,
|
|
4145
|
+
MatSlideToggleModule,
|
|
4146
|
+
MatCheckboxModule,
|
|
4147
|
+
MatIconModule,
|
|
4148
|
+
CdkTreeModule,
|
|
4149
|
+
MatTabsModule] });
|
|
4150
|
+
}
|
|
4151
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PhoenixUIModule, [{
|
|
4152
|
+
type: NgModule,
|
|
4153
|
+
args: [{
|
|
4154
|
+
declarations: PHOENIX_COMPONENTS,
|
|
4155
|
+
imports: [
|
|
4156
|
+
CommonModule,
|
|
4157
|
+
RouterModule,
|
|
4158
|
+
DragDropModule,
|
|
4159
|
+
MatDialogModule,
|
|
4160
|
+
MatButtonModule,
|
|
4161
|
+
MatTooltipModule,
|
|
4162
|
+
OverlayModule,
|
|
4163
|
+
FormsModule,
|
|
4164
|
+
MatMenuModule,
|
|
4165
|
+
MatRadioModule,
|
|
4166
|
+
MatSliderModule,
|
|
4167
|
+
MatSlideToggleModule,
|
|
4168
|
+
MatCheckboxModule,
|
|
4169
|
+
MatIconModule,
|
|
4170
|
+
CdkTreeModule,
|
|
4171
|
+
MatTabsModule,
|
|
4172
|
+
],
|
|
4173
|
+
exports: PHOENIX_COMPONENTS,
|
|
4174
|
+
providers: [
|
|
4175
|
+
EventDisplayService,
|
|
4176
|
+
ErrorMessageService,
|
|
4177
|
+
{
|
|
4178
|
+
provide: ErrorHandler,
|
|
4179
|
+
useClass: GlobalErrorHandler,
|
|
4180
|
+
},
|
|
4181
|
+
],
|
|
4182
|
+
}]
|
|
4183
|
+
}], null, null); })();
|
|
4184
|
+
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(PhoenixUIModule, { declarations: [NavComponent,
|
|
4185
|
+
UiMenuWrapperComponent,
|
|
4186
|
+
UiMenuComponent,
|
|
4187
|
+
CollectionsInfoComponent,
|
|
4188
|
+
GeometryBrowserComponent,
|
|
4189
|
+
GeometryBrowserOverlayComponent,
|
|
4190
|
+
MenuToggleComponent,
|
|
4191
|
+
CollectionsInfoOverlayComponent,
|
|
4192
|
+
IoOptionsComponent,
|
|
4193
|
+
IOOptionsDialogComponent,
|
|
4194
|
+
OverlayViewComponent,
|
|
4195
|
+
AttributePipe,
|
|
4196
|
+
ObjectSelectionComponent,
|
|
4197
|
+
ObjectSelectionOverlayComponent,
|
|
4198
|
+
EventSelectorComponent,
|
|
4199
|
+
ObjectClippingComponent,
|
|
4200
|
+
DarkThemeComponent,
|
|
4201
|
+
AutoRotateComponent,
|
|
4202
|
+
ViewOptionsComponent,
|
|
4203
|
+
CartesianGridConfigComponent,
|
|
4204
|
+
OverlayViewWindowComponent,
|
|
4205
|
+
OverlayComponent,
|
|
4206
|
+
ExperimentInfoComponent,
|
|
4207
|
+
InfoPanelComponent,
|
|
4208
|
+
InfoPanelOverlayComponent,
|
|
4209
|
+
MainViewToggleComponent,
|
|
4210
|
+
ZoomControlsComponent,
|
|
4211
|
+
TreeMenuComponent,
|
|
4212
|
+
TreeMenuItemComponent,
|
|
4213
|
+
PhoenixMenuComponent,
|
|
4214
|
+
PhoenixMenuItemComponent,
|
|
4215
|
+
ConfigSliderComponent,
|
|
4216
|
+
AnimateCameraComponent,
|
|
4217
|
+
AnimateEventComponent,
|
|
4218
|
+
VrToggleComponent,
|
|
4219
|
+
ArToggleComponent,
|
|
4220
|
+
SSModeComponent,
|
|
4221
|
+
MakePictureComponent,
|
|
4222
|
+
PerformanceToggleComponent,
|
|
4223
|
+
LoaderComponent,
|
|
4224
|
+
ShareLinkComponent,
|
|
4225
|
+
ShareLinkDialogComponent,
|
|
4226
|
+
EmbedMenuComponent,
|
|
4227
|
+
ExperimentLinkComponent,
|
|
4228
|
+
EventDataExplorerComponent,
|
|
4229
|
+
EventDataExplorerDialogComponent,
|
|
4230
|
+
FileExplorerComponent,
|
|
4231
|
+
RingLoaderComponent,
|
|
4232
|
+
CycleEventsComponent], imports: [CommonModule,
|
|
4233
|
+
RouterModule,
|
|
4234
|
+
DragDropModule,
|
|
4235
|
+
MatDialogModule,
|
|
4236
|
+
MatButtonModule,
|
|
4237
|
+
MatTooltipModule,
|
|
4238
|
+
OverlayModule,
|
|
4239
|
+
FormsModule,
|
|
4240
|
+
MatMenuModule,
|
|
4241
|
+
MatRadioModule,
|
|
4242
|
+
MatSliderModule,
|
|
4243
|
+
MatSlideToggleModule,
|
|
4244
|
+
MatCheckboxModule,
|
|
4245
|
+
MatIconModule,
|
|
4246
|
+
CdkTreeModule,
|
|
4247
|
+
MatTabsModule], exports: [NavComponent,
|
|
4248
|
+
UiMenuWrapperComponent,
|
|
4249
|
+
UiMenuComponent,
|
|
4250
|
+
CollectionsInfoComponent,
|
|
4251
|
+
GeometryBrowserComponent,
|
|
4252
|
+
GeometryBrowserOverlayComponent,
|
|
4253
|
+
MenuToggleComponent,
|
|
4254
|
+
CollectionsInfoOverlayComponent,
|
|
4255
|
+
IoOptionsComponent,
|
|
4256
|
+
IOOptionsDialogComponent,
|
|
4257
|
+
OverlayViewComponent,
|
|
4258
|
+
AttributePipe,
|
|
4259
|
+
ObjectSelectionComponent,
|
|
4260
|
+
ObjectSelectionOverlayComponent,
|
|
4261
|
+
EventSelectorComponent,
|
|
4262
|
+
ObjectClippingComponent,
|
|
4263
|
+
DarkThemeComponent,
|
|
4264
|
+
AutoRotateComponent,
|
|
4265
|
+
ViewOptionsComponent,
|
|
4266
|
+
CartesianGridConfigComponent,
|
|
4267
|
+
OverlayViewWindowComponent,
|
|
4268
|
+
OverlayComponent,
|
|
4269
|
+
ExperimentInfoComponent,
|
|
4270
|
+
InfoPanelComponent,
|
|
4271
|
+
InfoPanelOverlayComponent,
|
|
4272
|
+
MainViewToggleComponent,
|
|
4273
|
+
ZoomControlsComponent,
|
|
4274
|
+
TreeMenuComponent,
|
|
4275
|
+
TreeMenuItemComponent,
|
|
4276
|
+
PhoenixMenuComponent,
|
|
4277
|
+
PhoenixMenuItemComponent,
|
|
4278
|
+
ConfigSliderComponent,
|
|
4279
|
+
AnimateCameraComponent,
|
|
4280
|
+
AnimateEventComponent,
|
|
4281
|
+
VrToggleComponent,
|
|
4282
|
+
ArToggleComponent,
|
|
4283
|
+
SSModeComponent,
|
|
4284
|
+
MakePictureComponent,
|
|
4285
|
+
PerformanceToggleComponent,
|
|
4286
|
+
LoaderComponent,
|
|
4287
|
+
ShareLinkComponent,
|
|
4288
|
+
ShareLinkDialogComponent,
|
|
4289
|
+
EmbedMenuComponent,
|
|
4290
|
+
ExperimentLinkComponent,
|
|
4291
|
+
EventDataExplorerComponent,
|
|
4292
|
+
EventDataExplorerDialogComponent,
|
|
4293
|
+
FileExplorerComponent,
|
|
4294
|
+
RingLoaderComponent,
|
|
4295
|
+
CycleEventsComponent] }); })();
|
|
4296
|
+
|
|
4297
|
+
/**
|
|
4298
|
+
* Generated bundle index. Do not edit.
|
|
4299
|
+
*/
|
|
4300
|
+
|
|
4301
|
+
export { AnimateCameraComponent, AnimateEventComponent, ArToggleComponent, AttributePipe, AutoRotateComponent, CartesianGridConfigComponent, CollectionsInfoComponent, CollectionsInfoOverlayComponent, ConfigSliderComponent, CycleEventsComponent, DarkThemeComponent, EmbedMenuComponent, EventDataExplorerComponent, EventDataExplorerDialogComponent, EventDataFormat, EventDisplayService, EventSelectorComponent, ExperimentInfoComponent, ExperimentLinkComponent, FileEvent, FileExplorerComponent, FileNode, GeometryBrowserComponent, GeometryBrowserOverlayComponent, IOOptionsDialogComponent, ImportOption, InfoPanelComponent, InfoPanelOverlayComponent, IoOptionsComponent, LoaderComponent, MainViewToggleComponent, MakePictureComponent, MenuToggleComponent, NavComponent, ObjectClippingComponent, ObjectSelectionComponent, ObjectSelectionOverlayComponent, OverlayComponent, OverlayViewComponent, OverlayViewWindowComponent, PerformanceToggleComponent, PhoenixMenuComponent, PhoenixMenuItemComponent, PhoenixUIModule, RingLoaderComponent, SSModeComponent, ShareLinkComponent, ShareLinkDialogComponent, TreeMenuComponent, TreeMenuItemComponent, UiMenuComponent, UiMenuWrapperComponent, ViewOptionsComponent, VrToggleComponent, ZoomControlsComponent, defaultAnimationPresets };
|
|
4302
|
+
//# sourceMappingURL=phoenix-ui-components.mjs.map
|