@rxap/window-system 21.0.1 → 22.0.0-dev.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/CHANGELOG.md +8 -0
- package/compodoc/changelog.html +7 -0
- package/compodoc/components/DefaultWindowComponent.html +2 -2
- package/compodoc/components/WindowTaskBarContainerComponent.html +9 -4
- package/compodoc/components/WindowToolBarComponent.html +2 -2
- package/compodoc/dependencies.html +8 -8
- package/compodoc/injectables/WindowService.html +17 -18
- package/compodoc/interfaces/WindowActions.html +0 -3
- package/compodoc/interfaces/WindowConfig.html +0 -48
- package/compodoc/interfaces/WindowSettings.html +0 -3
- package/compodoc/interfaces/WindowTaskBarContainerSettings.html +2 -1
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/miscellaneous/variables.html +0 -1
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +1238 -1278
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/DefaultWindowComponent.html +2 -2
- package/docs/html/classes/WindowActionBarComponent.html +2 -2
- package/docs/html/classes/WindowContainerComponent.html +2 -2
- package/docs/html/classes/WindowContentComponent.html +2 -2
- package/docs/html/classes/WindowFooterDirective.html +3 -3
- package/docs/html/classes/WindowInstanceService.html +3 -3
- package/docs/html/classes/WindowRef.html +11 -11
- package/docs/html/classes/WindowResizerComponent.html +4 -4
- package/docs/html/classes/WindowService.html +2 -2
- package/docs/html/classes/WindowTaskBarComponent.html +2 -2
- package/docs/html/classes/WindowTaskBarContainerComponent.html +2 -2
- package/docs/html/classes/WindowTaskComponent.html +2 -2
- package/docs/html/classes/WindowTitleDirective.html +3 -3
- package/docs/html/classes/WindowToolBarComponent.html +2 -2
- package/docs/html/functions/GetWindowStartPos.html +1 -1
- package/docs/html/hierarchy.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/WindowActions.html +2 -2
- package/docs/html/interfaces/WindowConfig.html +2 -3
- package/docs/html/interfaces/WindowContainerContext.html +2 -2
- package/docs/html/interfaces/WindowContext.html +2 -2
- package/docs/html/interfaces/WindowFooterTemplateContext.html +2 -2
- package/docs/html/interfaces/WindowSettings.html +2 -2
- package/docs/html/interfaces/WindowTaskBarContainerSettings.html +2 -2
- package/docs/html/interfaces/WindowTitleTemplateContext.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/html/variables/DEFAULT_WINDOW_CONFIG.html +1 -1
- package/docs/html/variables/RXAP_WINDOW_CONTAINER_CONTEXT.html +1 -1
- package/docs/html/variables/RXAP_WINDOW_CONTEXT.html +1 -1
- package/docs/html/variables/RXAP_WINDOW_DATA.html +1 -1
- package/docs/html/variables/RXAP_WINDOW_DEFAULT_SETTINGS.html +1 -1
- package/docs/html/variables/RXAP_WINDOW_REF.html +1 -1
- package/docs/html/variables/RXAP_WINDOW_SETTINGS.html +1 -1
- package/docs/html/variables/RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/DefaultWindowComponent.md +2 -2
- package/docs/markdown/classes/WindowActionBarComponent.md +6 -6
- package/docs/markdown/classes/WindowContainerComponent.md +14 -14
- package/docs/markdown/classes/WindowContentComponent.md +6 -6
- package/docs/markdown/classes/WindowFooterDirective.md +4 -4
- package/docs/markdown/classes/WindowInstanceService.md +5 -5
- package/docs/markdown/classes/WindowRef.md +36 -36
- package/docs/markdown/classes/WindowResizerComponent.md +11 -11
- package/docs/markdown/classes/WindowService.md +12 -12
- package/docs/markdown/classes/WindowTaskBarComponent.md +4 -4
- package/docs/markdown/classes/WindowTaskBarContainerComponent.md +5 -5
- package/docs/markdown/classes/WindowTaskComponent.md +5 -5
- package/docs/markdown/classes/WindowTitleDirective.md +4 -4
- package/docs/markdown/classes/WindowToolBarComponent.md +4 -4
- package/docs/markdown/functions/GetWindowStartPos.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/WindowActions.md +4 -4
- package/docs/markdown/interfaces/WindowConfig.md +23 -31
- package/docs/markdown/interfaces/WindowContainerContext.md +4 -4
- package/docs/markdown/interfaces/WindowContext.md +6 -6
- package/docs/markdown/interfaces/WindowFooterTemplateContext.md +3 -3
- package/docs/markdown/interfaces/WindowSettings.md +17 -17
- package/docs/markdown/interfaces/WindowTaskBarContainerSettings.md +3 -3
- package/docs/markdown/interfaces/WindowTitleTemplateContext.md +3 -3
- package/docs/markdown/variables/DEFAULT_WINDOW_CONFIG.md +2 -2
- package/docs/markdown/variables/RXAP_WINDOW_CONTAINER_CONTEXT.md +2 -2
- package/docs/markdown/variables/RXAP_WINDOW_CONTEXT.md +2 -2
- package/docs/markdown/variables/RXAP_WINDOW_DATA.md +2 -2
- package/docs/markdown/variables/RXAP_WINDOW_DEFAULT_SETTINGS.md +2 -2
- package/docs/markdown/variables/RXAP_WINDOW_REF.md +2 -2
- package/docs/markdown/variables/RXAP_WINDOW_SETTINGS.md +2 -2
- package/docs/markdown/variables/RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS.md +2 -2
- package/docs/wiki/Class.DefaultWindowComponent.md +1 -1
- package/docs/wiki/Class.WindowActionBarComponent.md +5 -5
- package/docs/wiki/Class.WindowContainerComponent.md +13 -13
- package/docs/wiki/Class.WindowContentComponent.md +5 -5
- package/docs/wiki/Class.WindowFooterDirective.md +3 -3
- package/docs/wiki/Class.WindowInstanceService.md +4 -4
- package/docs/wiki/Class.WindowRef.md +35 -35
- package/docs/wiki/Class.WindowResizerComponent.md +10 -10
- package/docs/wiki/Class.WindowService.md +11 -11
- package/docs/wiki/Class.WindowTaskBarComponent.md +3 -3
- package/docs/wiki/Class.WindowTaskBarContainerComponent.md +4 -4
- package/docs/wiki/Class.WindowTaskComponent.md +4 -4
- package/docs/wiki/Class.WindowTitleDirective.md +3 -3
- package/docs/wiki/Class.WindowToolBarComponent.md +3 -3
- package/docs/wiki/Function.GetWindowStartPos.md +1 -1
- package/docs/wiki/Interface.WindowActions.md +3 -3
- package/docs/wiki/Interface.WindowConfig.md +22 -30
- package/docs/wiki/Interface.WindowContainerContext.md +3 -3
- package/docs/wiki/Interface.WindowContext.md +5 -5
- package/docs/wiki/Interface.WindowFooterTemplateContext.md +2 -2
- package/docs/wiki/Interface.WindowSettings.md +16 -16
- package/docs/wiki/Interface.WindowTaskBarContainerSettings.md +2 -2
- package/docs/wiki/Interface.WindowTitleTemplateContext.md +2 -2
- package/docs/wiki/Variable.DEFAULT_WINDOW_CONFIG.md +1 -1
- package/docs/wiki/Variable.RXAP_WINDOW_CONTAINER_CONTEXT.md +1 -1
- package/docs/wiki/Variable.RXAP_WINDOW_CONTEXT.md +1 -1
- package/docs/wiki/Variable.RXAP_WINDOW_DATA.md +1 -1
- package/docs/wiki/Variable.RXAP_WINDOW_DEFAULT_SETTINGS.md +1 -1
- package/docs/wiki/Variable.RXAP_WINDOW_REF.md +1 -1
- package/docs/wiki/Variable.RXAP_WINDOW_SETTINGS.md +1 -1
- package/docs/wiki/Variable.RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-window-system.mjs +1082 -342
- package/fesm2022/rxap-window-system.mjs.map +1 -1
- package/package.json +19 -19
- package/types/rxap-window-system.d.ts +278 -283
|
@@ -1,123 +1,263 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as i4 from
|
|
4
|
-
import { MatButtonModule } from
|
|
5
|
-
import { IconDirective } from
|
|
6
|
-
import * as
|
|
7
|
-
import { MatIconModule } from
|
|
8
|
-
import * as i2 from
|
|
9
|
-
import {
|
|
10
|
-
import { AsyncPipe, NgClass, NgStyle } from
|
|
11
|
-
import * as i1 from
|
|
12
|
-
import { MatToolbarModule } from
|
|
13
|
-
import { Overlay, OverlayConfig } from
|
|
14
|
-
import { LoadingIndicatorService } from
|
|
15
|
-
import { GenerateRandomString } from
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { CdkDrag, CdkDragHandle } from
|
|
20
|
-
import { takeUntilDestroyed, toSignal } from
|
|
21
|
-
import * as i3 from
|
|
22
|
-
import { MatProgressBarModule } from
|
|
23
|
-
import { __decorate } from
|
|
24
|
-
import { StopPropagationDirective } from
|
|
25
|
-
import * as i2
|
|
26
|
-
import { MatBadgeModule } from
|
|
27
|
-
const RXAP_WINDOW_CONTEXT = new InjectionToken(
|
|
28
|
-
const RXAP_WINDOW_DATA = new InjectionToken(
|
|
29
|
-
const RXAP_WINDOW_CONTAINER_CONTEXT = new InjectionToken(
|
|
30
|
-
const RXAP_WINDOW_REF = new InjectionToken(
|
|
31
|
-
const RXAP_WINDOW_SETTINGS = new InjectionToken(
|
|
32
|
-
const RXAP_WINDOW_DEFAULT_SETTINGS = new InjectionToken(
|
|
33
|
-
class WindowToolBarComponent {
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, ComponentRef, Directive, Injectable, InjectionToken, Injector, TemplateRef, ViewContainerRef, afterNextRender, contentChild, inject, input, isDevMode, output, signal, viewChild } from "@angular/core";
|
|
3
|
+
import * as i4 from "@angular/material/button";
|
|
4
|
+
import { MatButtonModule } from "@angular/material/button";
|
|
5
|
+
import { IconDirective } from "@rxap/material-directives/icon";
|
|
6
|
+
import * as i3$1 from "@angular/material/icon";
|
|
7
|
+
import { MatIconModule } from "@angular/material/icon";
|
|
8
|
+
import * as i2$1 from "@angular/cdk/portal";
|
|
9
|
+
import { CdkPortalOutlet, ComponentPortal, PortalModule, TemplatePortal } from "@angular/cdk/portal";
|
|
10
|
+
import { AsyncPipe, NgClass, NgStyle } from "@angular/common";
|
|
11
|
+
import * as i1 from "@angular/material/toolbar";
|
|
12
|
+
import { MatToolbarModule } from "@angular/material/toolbar";
|
|
13
|
+
import { Overlay, OverlayConfig } from "@angular/cdk/overlay";
|
|
14
|
+
import { LoadingIndicatorService } from "@rxap/services";
|
|
15
|
+
import { GenerateRandomString } from "@rxap/utilities";
|
|
16
|
+
import { BehaviorSubject, ReplaySubject, Subject, Subscription, TimeoutError, fromEvent, isObservable, throwError } from "rxjs";
|
|
17
|
+
import { catchError, delay, filter, finalize, map, startWith, switchMap, take, takeUntil, tap, timeout } from "rxjs/operators";
|
|
18
|
+
import { ToggleSubject, isDefined } from "@rxap/rxjs";
|
|
19
|
+
import { CdkDrag, CdkDragHandle } from "@angular/cdk/drag-drop";
|
|
20
|
+
import { takeUntilDestroyed, toSignal } from "@angular/core/rxjs-interop";
|
|
21
|
+
import * as i3 from "@angular/material/progress-bar";
|
|
22
|
+
import { MatProgressBarModule } from "@angular/material/progress-bar";
|
|
23
|
+
import { __decorate } from "tslib";
|
|
24
|
+
import { StopPropagationDirective } from "@rxap/directives";
|
|
25
|
+
import * as i2 from "@angular/material/badge";
|
|
26
|
+
import { MatBadgeModule } from "@angular/material/badge";
|
|
27
|
+
const RXAP_WINDOW_CONTEXT = new InjectionToken("rxap/core/window/WINDOW_CONTEXT");
|
|
28
|
+
const RXAP_WINDOW_DATA = new InjectionToken("rxap/core/window/WINDOW_DATA");
|
|
29
|
+
const RXAP_WINDOW_CONTAINER_CONTEXT = new InjectionToken("rxap/core/window/WINDOW_CONTAINER_CONTEXT");
|
|
30
|
+
const RXAP_WINDOW_REF = new InjectionToken("rxap/window-system/WINDOW_REF");
|
|
31
|
+
const RXAP_WINDOW_SETTINGS = new InjectionToken("rxap/window-system/window-settings");
|
|
32
|
+
const RXAP_WINDOW_DEFAULT_SETTINGS = new InjectionToken("rxap/window-system/default-window-settings");
|
|
33
|
+
var WindowToolBarComponent = class WindowToolBarComponent {
|
|
34
34
|
constructor() {
|
|
35
35
|
const context = inject(RXAP_WINDOW_CONTEXT);
|
|
36
36
|
this.windowRef = context.windowRef;
|
|
37
37
|
}
|
|
38
|
-
static {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
static {
|
|
39
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
40
|
+
minVersion: "12.0.0",
|
|
41
|
+
version: "22.3.0",
|
|
42
|
+
ngImport: i0,
|
|
43
|
+
type: WindowToolBarComponent,
|
|
44
|
+
deps: [],
|
|
45
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
static {
|
|
49
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
50
|
+
minVersion: "17.0.0",
|
|
51
|
+
version: "22.3.0",
|
|
52
|
+
type: WindowToolBarComponent,
|
|
53
|
+
isStandalone: true,
|
|
54
|
+
selector: "rxap-window-tool-bar",
|
|
55
|
+
ngImport: i0,
|
|
56
|
+
template: "<mat-toolbar class=\"header flex flex-row items-center justify-between gap-x-4\">\n <div class=\"flex flex-row justify-end items-center gap-x-3\">\n @if (windowRef.titlePortal$ | async; as titlePortal) {\n <ng-template [cdkPortalOutlet]=\"titlePortal\"></ng-template>\n } @else {\n @if (windowRef.settings$ | async; as settings) {\n @if (settings.icon) {\n <mat-icon [rxapIcon]=\"settings.icon\"></mat-icon>\n }\n @if (settings.title) {\n <h3>{{settings.title}}</h3>\n }\n }\n }\n </div>\n <div class=\"flex flex-row justify-end items-center\">\n @if (windowRef.minimizable !== false) {\n <button (click)=\"windowRef.minimize()\"\n mat-icon-button type=\"button\">\n <mat-icon>minimize</mat-icon>\n </button>\n }\n <button (click)=\"windowRef.fullScreen()\" mat-icon-button type=\"button\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button (click)=\"windowRef.complete()\" mat-icon-button type=\"button\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n</mat-toolbar>\n",
|
|
57
|
+
styles: [":host{width:100%}.header{height:64px}\n"],
|
|
58
|
+
dependencies: [
|
|
59
|
+
{
|
|
60
|
+
kind: "ngmodule",
|
|
61
|
+
type: MatToolbarModule
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
kind: "component",
|
|
65
|
+
type: i1.MatToolbar,
|
|
66
|
+
selector: "mat-toolbar",
|
|
67
|
+
inputs: ["color"],
|
|
68
|
+
exportAs: ["matToolbar"]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
kind: "ngmodule",
|
|
72
|
+
type: PortalModule
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
kind: "directive",
|
|
76
|
+
type: i2$1.CdkPortalOutlet,
|
|
77
|
+
selector: "[cdkPortalOutlet]",
|
|
78
|
+
inputs: ["cdkPortalOutlet"],
|
|
79
|
+
outputs: ["attached"],
|
|
80
|
+
exportAs: ["cdkPortalOutlet"]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
kind: "ngmodule",
|
|
84
|
+
type: MatIconModule
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
kind: "component",
|
|
88
|
+
type: i3$1.MatIcon,
|
|
89
|
+
selector: "mat-icon",
|
|
90
|
+
inputs: [
|
|
91
|
+
"color",
|
|
92
|
+
"inline",
|
|
93
|
+
"svgIcon",
|
|
94
|
+
"fontSet",
|
|
95
|
+
"fontIcon"
|
|
96
|
+
],
|
|
97
|
+
exportAs: ["matIcon"]
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
kind: "directive",
|
|
101
|
+
type: IconDirective,
|
|
102
|
+
selector: "mat-icon[rxapIcon]",
|
|
103
|
+
inputs: ["rxapIcon"]
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
kind: "ngmodule",
|
|
107
|
+
type: MatButtonModule
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
kind: "component",
|
|
111
|
+
type: i4.MatIconButton,
|
|
112
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
113
|
+
exportAs: ["matButton", "matAnchor"]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
kind: "pipe",
|
|
117
|
+
type: AsyncPipe,
|
|
118
|
+
name: "async"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
126
|
+
minVersion: "12.0.0",
|
|
127
|
+
version: "22.3.0",
|
|
128
|
+
ngImport: i0,
|
|
129
|
+
type: WindowToolBarComponent,
|
|
130
|
+
decorators: [{
|
|
42
131
|
type: Component,
|
|
43
|
-
args: [{
|
|
132
|
+
args: [{
|
|
133
|
+
selector: "rxap-window-tool-bar",
|
|
134
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
135
|
+
imports: [
|
|
44
136
|
MatToolbarModule,
|
|
45
137
|
PortalModule,
|
|
46
138
|
MatIconModule,
|
|
47
139
|
IconDirective,
|
|
48
140
|
MatButtonModule,
|
|
49
141
|
AsyncPipe
|
|
50
|
-
],
|
|
51
|
-
|
|
52
|
-
|
|
142
|
+
],
|
|
143
|
+
template: "<mat-toolbar class=\"header flex flex-row items-center justify-between gap-x-4\">\n <div class=\"flex flex-row justify-end items-center gap-x-3\">\n @if (windowRef.titlePortal$ | async; as titlePortal) {\n <ng-template [cdkPortalOutlet]=\"titlePortal\"></ng-template>\n } @else {\n @if (windowRef.settings$ | async; as settings) {\n @if (settings.icon) {\n <mat-icon [rxapIcon]=\"settings.icon\"></mat-icon>\n }\n @if (settings.title) {\n <h3>{{settings.title}}</h3>\n }\n }\n }\n </div>\n <div class=\"flex flex-row justify-end items-center\">\n @if (windowRef.minimizable !== false) {\n <button (click)=\"windowRef.minimize()\"\n mat-icon-button type=\"button\">\n <mat-icon>minimize</mat-icon>\n </button>\n }\n <button (click)=\"windowRef.fullScreen()\" mat-icon-button type=\"button\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button (click)=\"windowRef.complete()\" mat-icon-button type=\"button\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n</mat-toolbar>\n",
|
|
144
|
+
styles: [":host{width:100%}.header{height:64px}\n"]
|
|
145
|
+
}]
|
|
146
|
+
}],
|
|
147
|
+
ctorParameters: () => []
|
|
148
|
+
});
|
|
149
|
+
var WindowContentComponent = class WindowContentComponent {
|
|
53
150
|
constructor() {
|
|
54
151
|
this.windowRef = inject(RXAP_WINDOW_REF);
|
|
55
152
|
this.injector = inject(Injector);
|
|
56
153
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
57
154
|
this.loadingIndicatorService = inject(LoadingIndicatorService);
|
|
58
155
|
this.portal = null;
|
|
59
|
-
this.portalOutlet = viewChild.required(CdkPortalOutlet);
|
|
156
|
+
this.portalOutlet = viewChild.required(CdkPortalOutlet, ...ngDevMode ? [{ debugName: "portalOutlet" }] : /* istanbul ignore next */ []);
|
|
60
157
|
const context = inject(RXAP_WINDOW_CONTAINER_CONTEXT);
|
|
61
158
|
this.context = context;
|
|
62
|
-
if (this.context.template)
|
|
159
|
+
if (this.context.template)
|
|
63
160
|
this.portal = new TemplatePortal(this.context.template, this.viewContainerRef);
|
|
64
|
-
|
|
65
|
-
else if (this.context.component) {
|
|
161
|
+
else if (this.context.component)
|
|
66
162
|
this.portal = new ComponentPortal(this.context.component, this.viewContainerRef, this.injector);
|
|
67
|
-
}
|
|
68
163
|
afterNextRender(() => this.attach());
|
|
69
164
|
}
|
|
70
165
|
attach() {
|
|
71
|
-
this.portalOutlet().attached.pipe(startWith(this.portalOutlet().attachedRef), isDefined(), take(1), tap(attachedRef => this.windowRef.setAttachedRef(attachedRef)), tap(attachedRef => {
|
|
166
|
+
this.portalOutlet().attached.pipe(startWith(this.portalOutlet().attachedRef), isDefined(), take(1), tap((attachedRef) => this.windowRef.setAttachedRef(attachedRef)), tap((attachedRef) => {
|
|
72
167
|
const promise = [];
|
|
73
168
|
if (attachedRef instanceof ComponentRef) {
|
|
74
169
|
attachedRef.changeDetectorRef.detectChanges();
|
|
75
170
|
const loading$ = attachedRef.instance.loading$;
|
|
76
171
|
if (loading$ && isObservable(loading$)) {
|
|
77
|
-
if (isDevMode())
|
|
78
|
-
console.warn(
|
|
79
|
-
}
|
|
172
|
+
if (isDevMode())
|
|
173
|
+
console.warn("The component has a loading indicator member");
|
|
80
174
|
this.loadingIndicatorService.attachLoading(loading$);
|
|
81
175
|
promise.push(loading$.pipe(filter(Boolean), take(1), delay(100), tap(() => attachedRef.changeDetectorRef.detectChanges())).toPromise());
|
|
82
176
|
}
|
|
83
|
-
else
|
|
177
|
+
else
|
|
84
178
|
this.loadingIndicatorService.disable();
|
|
85
|
-
}
|
|
86
179
|
}
|
|
87
|
-
else
|
|
180
|
+
else
|
|
88
181
|
this.loadingIndicatorService.disable();
|
|
89
|
-
}
|
|
90
182
|
return Promise.all(promise);
|
|
91
|
-
}), timeout(
|
|
183
|
+
}), timeout(1e4), catchError((error) => {
|
|
92
184
|
if (error instanceof TimeoutError) {
|
|
93
|
-
if (isDevMode())
|
|
94
|
-
console.warn(
|
|
95
|
-
}
|
|
185
|
+
if (isDevMode())
|
|
186
|
+
console.warn("The window content never resolved the attached ref");
|
|
96
187
|
}
|
|
97
188
|
return throwError(error);
|
|
98
189
|
})).subscribe();
|
|
99
190
|
}
|
|
100
|
-
static {
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
191
|
+
static {
|
|
192
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
193
|
+
minVersion: "12.0.0",
|
|
194
|
+
version: "22.3.0",
|
|
195
|
+
ngImport: i0,
|
|
196
|
+
type: WindowContentComponent,
|
|
197
|
+
deps: [],
|
|
198
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
static {
|
|
202
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
203
|
+
minVersion: "17.2.0",
|
|
204
|
+
version: "22.3.0",
|
|
205
|
+
type: WindowContentComponent,
|
|
206
|
+
isStandalone: true,
|
|
207
|
+
selector: "rxap-window-content",
|
|
208
|
+
viewQueries: [{
|
|
209
|
+
propertyName: "portalOutlet",
|
|
210
|
+
first: true,
|
|
211
|
+
predicate: CdkPortalOutlet,
|
|
212
|
+
descendants: true,
|
|
213
|
+
isSignal: true
|
|
214
|
+
}],
|
|
215
|
+
ngImport: i0,
|
|
216
|
+
template: "<div class=\"p-4\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n",
|
|
217
|
+
styles: [""],
|
|
218
|
+
dependencies: [{
|
|
219
|
+
kind: "ngmodule",
|
|
220
|
+
type: PortalModule
|
|
221
|
+
}, {
|
|
222
|
+
kind: "directive",
|
|
223
|
+
type: i2$1.CdkPortalOutlet,
|
|
224
|
+
selector: "[cdkPortalOutlet]",
|
|
225
|
+
inputs: ["cdkPortalOutlet"],
|
|
226
|
+
outputs: ["attached"],
|
|
227
|
+
exportAs: ["cdkPortalOutlet"]
|
|
228
|
+
}],
|
|
229
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
234
|
+
minVersion: "12.0.0",
|
|
235
|
+
version: "22.3.0",
|
|
236
|
+
ngImport: i0,
|
|
237
|
+
type: WindowContentComponent,
|
|
238
|
+
decorators: [{
|
|
104
239
|
type: Component,
|
|
105
|
-
args: [{
|
|
106
|
-
|
|
107
|
-
|
|
240
|
+
args: [{
|
|
241
|
+
selector: "rxap-window-content",
|
|
242
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
243
|
+
imports: [PortalModule],
|
|
244
|
+
template: "<div class=\"p-4\">\n <ng-template [cdkPortalOutlet]=\"portal\"></ng-template>\n</div>\n"
|
|
245
|
+
}]
|
|
246
|
+
}],
|
|
247
|
+
ctorParameters: () => [],
|
|
248
|
+
propDecorators: { portalOutlet: [{
|
|
249
|
+
type: i0.ViewChild,
|
|
250
|
+
args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }]
|
|
251
|
+
}] }
|
|
252
|
+
});
|
|
253
|
+
var WindowResizerComponent = class WindowResizerComponent {
|
|
108
254
|
constructor() {
|
|
109
|
-
this.containerRef = input.required(...
|
|
110
|
-
this.resizerRef = viewChild.required(
|
|
111
|
-
|
|
112
|
-
this.
|
|
113
|
-
|
|
114
|
-
this.
|
|
115
|
-
// eslint-disable-next-line @angular-eslint/no-output-rename
|
|
116
|
-
this.resizing$ = output({ alias: 'resizing' });
|
|
117
|
-
/**
|
|
118
|
-
* null until the first resize action has started
|
|
119
|
-
*/
|
|
120
|
-
this.resizing = signal(null, ...(ngDevMode ? [{ debugName: "resizing" }] : /* istanbul ignore next */ []));
|
|
255
|
+
this.containerRef = input.required(...ngDevMode ? [{ debugName: "containerRef" }] : /* istanbul ignore next */ []);
|
|
256
|
+
this.resizerRef = viewChild.required("resizer", ...ngDevMode ? [{ debugName: "resizerRef" }] : /* istanbul ignore next */ []);
|
|
257
|
+
this.width$ = output({ alias: "width" });
|
|
258
|
+
this.height$ = output({ alias: "height" });
|
|
259
|
+
this.resizing$ = output({ alias: "resizing" });
|
|
260
|
+
this.resizing = signal(null, ...ngDevMode ? [{ debugName: "resizing" }] : /* istanbul ignore next */ []);
|
|
121
261
|
this._subscription = new Subscription();
|
|
122
262
|
const context = inject(RXAP_WINDOW_CONTEXT);
|
|
123
263
|
this.windowRef = context.windowRef;
|
|
@@ -131,30 +271,23 @@ class WindowResizerComponent {
|
|
|
131
271
|
let originalMouseY = 0;
|
|
132
272
|
let originalWidth = 0;
|
|
133
273
|
let originalHeight = 0;
|
|
134
|
-
this._subscription.add(fromEvent(this.resizerRef().nativeElement,
|
|
274
|
+
this._subscription.add(fromEvent(this.resizerRef().nativeElement, "mousedown").pipe(tap((event) => {
|
|
135
275
|
this.resizing.set(true);
|
|
136
276
|
this.resizing$.emit(true);
|
|
137
277
|
originalMouseX = event.pageX;
|
|
138
278
|
originalMouseY = event.pageY;
|
|
139
|
-
originalWidth = parseFloat(getComputedStyle(this.containerRef().nativeElement, null)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
originalHeight = parseFloat(getComputedStyle(this.containerRef().nativeElement, null)
|
|
143
|
-
.getPropertyValue('height')
|
|
144
|
-
.replace('px', ''));
|
|
145
|
-
}), switchMap(() => fromEvent(window, 'mousemove').pipe(takeUntil(fromEvent(window, 'mouseup')), map((event) => ({
|
|
279
|
+
originalWidth = parseFloat(getComputedStyle(this.containerRef().nativeElement, null).getPropertyValue("width").replace("px", ""));
|
|
280
|
+
originalHeight = parseFloat(getComputedStyle(this.containerRef().nativeElement, null).getPropertyValue("height").replace("px", ""));
|
|
281
|
+
}), switchMap(() => fromEvent(window, "mousemove").pipe(takeUntil(fromEvent(window, "mouseup")), map((event) => ({
|
|
146
282
|
width: originalWidth + (event.pageX - originalMouseX),
|
|
147
|
-
height: originalHeight + (event.pageY - originalMouseY)
|
|
148
|
-
})), filter(size => (Number(this.windowRef.getSizeConfig().minHeight) || 0) <=
|
|
149
|
-
size.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
width: size.width + 'px',
|
|
153
|
-
height: size.height + 'px',
|
|
154
|
-
})), tap(size => {
|
|
283
|
+
height: originalHeight + (event.pageY - originalMouseY)
|
|
284
|
+
})), filter((size) => (Number(this.windowRef.getSizeConfig().minHeight) || 0) <= size.height && (Number(this.windowRef.getSizeConfig().minWidth) || 0) <= size.width), map((size) => ({
|
|
285
|
+
width: size.width + "px",
|
|
286
|
+
height: size.height + "px"
|
|
287
|
+
})), tap((size) => {
|
|
155
288
|
this.width$.emit(size.width);
|
|
156
289
|
this.height$.emit(size.height);
|
|
157
|
-
}), tap(size => {
|
|
290
|
+
}), tap((size) => {
|
|
158
291
|
this.windowRef.setHeight(size.height);
|
|
159
292
|
this.windowRef.setWidth(size.width);
|
|
160
293
|
}), finalize(() => {
|
|
@@ -162,51 +295,309 @@ class WindowResizerComponent {
|
|
|
162
295
|
this.resizing$.emit(false);
|
|
163
296
|
})))).subscribe());
|
|
164
297
|
}
|
|
165
|
-
static {
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
298
|
+
static {
|
|
299
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
300
|
+
minVersion: "12.0.0",
|
|
301
|
+
version: "22.3.0",
|
|
302
|
+
ngImport: i0,
|
|
303
|
+
type: WindowResizerComponent,
|
|
304
|
+
deps: [],
|
|
305
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
static {
|
|
309
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
310
|
+
minVersion: "17.2.0",
|
|
311
|
+
version: "22.3.0",
|
|
312
|
+
type: WindowResizerComponent,
|
|
313
|
+
isStandalone: true,
|
|
314
|
+
selector: "rxap-window-resizer",
|
|
315
|
+
inputs: { containerRef: {
|
|
316
|
+
classPropertyName: "containerRef",
|
|
317
|
+
publicName: "containerRef",
|
|
318
|
+
isSignal: true,
|
|
319
|
+
isRequired: true,
|
|
320
|
+
transformFunction: null
|
|
321
|
+
} },
|
|
322
|
+
outputs: {
|
|
323
|
+
width$: "width",
|
|
324
|
+
height$: "height",
|
|
325
|
+
resizing$: "resizing"
|
|
326
|
+
},
|
|
327
|
+
viewQueries: [{
|
|
328
|
+
propertyName: "resizerRef",
|
|
329
|
+
first: true,
|
|
330
|
+
predicate: ["resizer"],
|
|
331
|
+
descendants: true,
|
|
332
|
+
isSignal: true
|
|
333
|
+
}],
|
|
334
|
+
ngImport: i0,
|
|
335
|
+
template: "<div #resizer class=\"resizer\">\n <mat-icon [ngClass]=\"{ hidden: resizing() === false }\">texture</mat-icon>\n</div>\n",
|
|
336
|
+
styles: [":host,.resizer{position:absolute;inset:auto 0 0 auto;width:24px;height:24px;cursor:nwse-resize;z-index:100}\n"],
|
|
337
|
+
dependencies: [
|
|
338
|
+
{
|
|
339
|
+
kind: "ngmodule",
|
|
340
|
+
type: MatIconModule
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
kind: "component",
|
|
344
|
+
type: i3$1.MatIcon,
|
|
345
|
+
selector: "mat-icon",
|
|
346
|
+
inputs: [
|
|
347
|
+
"color",
|
|
348
|
+
"inline",
|
|
349
|
+
"svgIcon",
|
|
350
|
+
"fontSet",
|
|
351
|
+
"fontIcon"
|
|
352
|
+
],
|
|
353
|
+
exportAs: ["matIcon"]
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
kind: "directive",
|
|
357
|
+
type: NgClass,
|
|
358
|
+
selector: "[ngClass]",
|
|
359
|
+
inputs: ["class", "ngClass"]
|
|
360
|
+
}
|
|
361
|
+
],
|
|
362
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
367
|
+
minVersion: "12.0.0",
|
|
368
|
+
version: "22.3.0",
|
|
369
|
+
ngImport: i0,
|
|
370
|
+
type: WindowResizerComponent,
|
|
371
|
+
decorators: [{
|
|
169
372
|
type: Component,
|
|
170
|
-
args: [{
|
|
171
|
-
|
|
172
|
-
|
|
373
|
+
args: [{
|
|
374
|
+
selector: "rxap-window-resizer",
|
|
375
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
376
|
+
imports: [MatIconModule, NgClass],
|
|
377
|
+
template: "<div #resizer class=\"resizer\">\n <mat-icon [ngClass]=\"{ hidden: resizing() === false }\">texture</mat-icon>\n</div>\n",
|
|
378
|
+
styles: [":host,.resizer{position:absolute;inset:auto 0 0 auto;width:24px;height:24px;cursor:nwse-resize;z-index:100}\n"]
|
|
379
|
+
}]
|
|
380
|
+
}],
|
|
381
|
+
ctorParameters: () => [],
|
|
382
|
+
propDecorators: {
|
|
383
|
+
containerRef: [{
|
|
384
|
+
type: i0.Input,
|
|
385
|
+
args: [{
|
|
386
|
+
isSignal: true,
|
|
387
|
+
alias: "containerRef",
|
|
388
|
+
required: true
|
|
389
|
+
}]
|
|
390
|
+
}],
|
|
391
|
+
resizerRef: [{
|
|
392
|
+
type: i0.ViewChild,
|
|
393
|
+
args: ["resizer", { isSignal: true }]
|
|
394
|
+
}],
|
|
395
|
+
width$: [{
|
|
396
|
+
type: i0.Output,
|
|
397
|
+
args: ["width"]
|
|
398
|
+
}],
|
|
399
|
+
height$: [{
|
|
400
|
+
type: i0.Output,
|
|
401
|
+
args: ["height"]
|
|
402
|
+
}],
|
|
403
|
+
resizing$: [{
|
|
404
|
+
type: i0.Output,
|
|
405
|
+
args: ["resizing"]
|
|
406
|
+
}]
|
|
407
|
+
}
|
|
408
|
+
});
|
|
409
|
+
var WindowContainerComponent = class WindowContainerComponent {
|
|
173
410
|
constructor() {
|
|
174
|
-
this.footerContent = contentChild.required(
|
|
175
|
-
this.containerRef = viewChild.required(
|
|
176
|
-
this.windowContainerResizer = viewChild.required(WindowResizerComponent);
|
|
177
|
-
this.width = signal(
|
|
178
|
-
this.height = signal(
|
|
411
|
+
this.footerContent = contentChild.required("[footer]", ...ngDevMode ? [{ debugName: "footerContent" }] : /* istanbul ignore next */ []);
|
|
412
|
+
this.containerRef = viewChild.required("container", ...ngDevMode ? [{ debugName: "containerRef" }] : /* istanbul ignore next */ []);
|
|
413
|
+
this.windowContainerResizer = viewChild.required(WindowResizerComponent, ...ngDevMode ? [{ debugName: "windowContainerResizer" }] : /* istanbul ignore next */ []);
|
|
414
|
+
this.width = signal("100%", ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
|
|
415
|
+
this.height = signal("100%", ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
|
|
179
416
|
this.context = inject(RXAP_WINDOW_CONTEXT);
|
|
180
417
|
this.windowRef = inject(RXAP_WINDOW_REF);
|
|
181
418
|
this.windowInstance = inject(LoadingIndicatorService);
|
|
182
|
-
this.windowRef.width$.pipe(isDefined(), filter(value => !!value?.match(/^\d+/)), takeUntilDestroyed()).subscribe(value => this.width.set(value));
|
|
183
|
-
this.windowRef.height$.pipe(isDefined(), filter(value => !!value?.match(/^\d+/)), takeUntilDestroyed()).subscribe(value => this.height.set(value));
|
|
419
|
+
this.windowRef.width$.pipe(isDefined(), filter((value) => !!value?.match(/^\d+/)), takeUntilDestroyed()).subscribe((value) => this.width.set(value));
|
|
420
|
+
this.windowRef.height$.pipe(isDefined(), filter((value) => !!value?.match(/^\d+/)), takeUntilDestroyed()).subscribe((value) => this.height.set(value));
|
|
184
421
|
}
|
|
185
422
|
onResizerWidth(value) {
|
|
186
|
-
if (value?.match(/^\d+/))
|
|
423
|
+
if (value?.match(/^\d+/))
|
|
187
424
|
this.width.set(value);
|
|
188
|
-
}
|
|
189
425
|
}
|
|
190
426
|
onResizerHeight(value) {
|
|
191
|
-
if (value?.match(/^\d+/))
|
|
427
|
+
if (value?.match(/^\d+/))
|
|
192
428
|
this.height.set(value);
|
|
193
|
-
}
|
|
194
429
|
}
|
|
195
430
|
onDragEnded($event) {
|
|
196
|
-
const
|
|
197
|
-
const pos = nativeElement.getBoundingClientRect();
|
|
431
|
+
const pos = $event.source.element.nativeElement.getBoundingClientRect();
|
|
198
432
|
$event.source.reset();
|
|
199
|
-
this.windowRef.setPos(pos.left +
|
|
433
|
+
this.windowRef.setPos(pos.left + "px", pos.top + "px");
|
|
200
434
|
}
|
|
201
|
-
static {
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
435
|
+
static {
|
|
436
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
437
|
+
minVersion: "12.0.0",
|
|
438
|
+
version: "22.3.0",
|
|
439
|
+
ngImport: i0,
|
|
440
|
+
type: WindowContainerComponent,
|
|
441
|
+
deps: [],
|
|
442
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
443
|
+
});
|
|
444
|
+
}
|
|
445
|
+
static {
|
|
446
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
447
|
+
minVersion: "17.0.0",
|
|
448
|
+
version: "22.3.0",
|
|
449
|
+
type: WindowContainerComponent,
|
|
450
|
+
isStandalone: true,
|
|
451
|
+
selector: "rxap-window-container",
|
|
452
|
+
host: {
|
|
453
|
+
properties: { "attr.data-id": "context.id" },
|
|
454
|
+
classAttribute: "rxap-window-container"
|
|
455
|
+
},
|
|
456
|
+
queries: [{
|
|
457
|
+
propertyName: "footerContent",
|
|
458
|
+
first: true,
|
|
459
|
+
predicate: ["[footer]"],
|
|
460
|
+
descendants: true,
|
|
461
|
+
isSignal: true
|
|
462
|
+
}],
|
|
463
|
+
viewQueries: [{
|
|
464
|
+
propertyName: "containerRef",
|
|
465
|
+
first: true,
|
|
466
|
+
predicate: ["container"],
|
|
467
|
+
descendants: true,
|
|
468
|
+
isSignal: true
|
|
469
|
+
}, {
|
|
470
|
+
propertyName: "windowContainerResizer",
|
|
471
|
+
first: true,
|
|
472
|
+
predicate: WindowResizerComponent,
|
|
473
|
+
descendants: true,
|
|
474
|
+
isSignal: true
|
|
475
|
+
}],
|
|
476
|
+
ngImport: i0,
|
|
477
|
+
template: "<div #container\n (cdkDragEnded)=\"onDragEnded($event)\"\n [cdkDragDisabled]=\"windowRef.draggable === false\"\n [ngStyle]=\"{\n 'width': width(),\n 'height': height(),\n 'minWidth': windowRef.minWidth,\n 'minHeight': windowRef.minHeight,\n 'maxWidth': windowRef.maxWidth,\n 'maxHeight': windowRef.maxHeight\n }\"\n cdkDrag\n cdkDragBoundary=\".cdk-overlay-container\"\n class=\"drop-shadow-2xl bg-white dark:bg-black border-2 border-gray-400 dark:border-gray-800 rounded-xl overflow-hidden\">\n <div class=\"flex flex-col h-full max-h-full\">\n\n <div cdkDragHandle class=\"grow-0 w-full h-[64px] min-h-[64px] cursor-move\">\n <rxap-window-tool-bar></rxap-window-tool-bar>\n </div>\n\n <div class=\"grow overflow-auto w-full\">\n <ng-content></ng-content>\n </div>\n\n @if (windowRef.footerPortal$ | async; as footerPortal) {\n <mat-toolbar class=\"mat-elevation-z1 grow-0 w-full h-[64px] min-h-[64px]\">\n <ng-template [cdkPortalOutlet]=\"footerPortal\"></ng-template>\n </mat-toolbar>\n }\n\n @if (windowInstance.isLoading$ | async) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n\n <rxap-window-resizer [containerRef]=\"containerRef()\"\n (width)=\"onResizerWidth($event)\"\n (height)=\"onResizerHeight($event)\"></rxap-window-resizer>\n </div>\n</div>\n",
|
|
478
|
+
styles: [""],
|
|
479
|
+
dependencies: [
|
|
480
|
+
{
|
|
481
|
+
kind: "directive",
|
|
482
|
+
type: CdkDrag,
|
|
483
|
+
selector: "[cdkDrag]",
|
|
484
|
+
inputs: [
|
|
485
|
+
"cdkDragData",
|
|
486
|
+
"cdkDragLockAxis",
|
|
487
|
+
"cdkDragRootElement",
|
|
488
|
+
"cdkDragBoundary",
|
|
489
|
+
"cdkDragStartDelay",
|
|
490
|
+
"cdkDragFreeDragPosition",
|
|
491
|
+
"cdkDragDisabled",
|
|
492
|
+
"cdkDragConstrainPosition",
|
|
493
|
+
"cdkDragPreviewClass",
|
|
494
|
+
"cdkDragPreviewContainer",
|
|
495
|
+
"cdkDragScale"
|
|
496
|
+
],
|
|
497
|
+
outputs: [
|
|
498
|
+
"cdkDragStarted",
|
|
499
|
+
"cdkDragReleased",
|
|
500
|
+
"cdkDragEnded",
|
|
501
|
+
"cdkDragEntered",
|
|
502
|
+
"cdkDragExited",
|
|
503
|
+
"cdkDragDropped",
|
|
504
|
+
"cdkDragMoved"
|
|
505
|
+
],
|
|
506
|
+
exportAs: ["cdkDrag"]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
kind: "directive",
|
|
510
|
+
type: NgStyle,
|
|
511
|
+
selector: "[ngStyle]",
|
|
512
|
+
inputs: ["ngStyle"]
|
|
513
|
+
},
|
|
514
|
+
{
|
|
515
|
+
kind: "directive",
|
|
516
|
+
type: CdkDragHandle,
|
|
517
|
+
selector: "[cdkDragHandle]",
|
|
518
|
+
inputs: ["cdkDragHandleDisabled"]
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
kind: "component",
|
|
522
|
+
type: WindowToolBarComponent,
|
|
523
|
+
selector: "rxap-window-tool-bar"
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
kind: "ngmodule",
|
|
527
|
+
type: MatToolbarModule
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
kind: "component",
|
|
531
|
+
type: i1.MatToolbar,
|
|
532
|
+
selector: "mat-toolbar",
|
|
533
|
+
inputs: ["color"],
|
|
534
|
+
exportAs: ["matToolbar"]
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
kind: "ngmodule",
|
|
538
|
+
type: PortalModule
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
kind: "directive",
|
|
542
|
+
type: i2$1.CdkPortalOutlet,
|
|
543
|
+
selector: "[cdkPortalOutlet]",
|
|
544
|
+
inputs: ["cdkPortalOutlet"],
|
|
545
|
+
outputs: ["attached"],
|
|
546
|
+
exportAs: ["cdkPortalOutlet"]
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
kind: "ngmodule",
|
|
550
|
+
type: MatProgressBarModule
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
kind: "component",
|
|
554
|
+
type: i3.MatProgressBar,
|
|
555
|
+
selector: "mat-progress-bar",
|
|
556
|
+
inputs: [
|
|
557
|
+
"color",
|
|
558
|
+
"value",
|
|
559
|
+
"bufferValue",
|
|
560
|
+
"mode"
|
|
561
|
+
],
|
|
562
|
+
outputs: ["animationEnd"],
|
|
563
|
+
exportAs: ["matProgressBar"]
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
kind: "component",
|
|
567
|
+
type: WindowResizerComponent,
|
|
568
|
+
selector: "rxap-window-resizer",
|
|
569
|
+
inputs: ["containerRef"],
|
|
570
|
+
outputs: [
|
|
571
|
+
"width",
|
|
572
|
+
"height",
|
|
573
|
+
"resizing"
|
|
574
|
+
]
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
kind: "pipe",
|
|
578
|
+
type: AsyncPipe,
|
|
579
|
+
name: "async"
|
|
580
|
+
}
|
|
581
|
+
],
|
|
582
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
587
|
+
minVersion: "12.0.0",
|
|
588
|
+
version: "22.3.0",
|
|
589
|
+
ngImport: i0,
|
|
590
|
+
type: WindowContainerComponent,
|
|
591
|
+
decorators: [{
|
|
205
592
|
type: Component,
|
|
206
|
-
args: [{
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
593
|
+
args: [{
|
|
594
|
+
selector: "rxap-window-container",
|
|
595
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
596
|
+
host: {
|
|
597
|
+
class: "rxap-window-container",
|
|
598
|
+
"[attr.data-id]": "context.id"
|
|
599
|
+
},
|
|
600
|
+
imports: [
|
|
210
601
|
CdkDrag,
|
|
211
602
|
NgStyle,
|
|
212
603
|
CdkDragHandle,
|
|
@@ -215,55 +606,110 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
215
606
|
PortalModule,
|
|
216
607
|
MatProgressBarModule,
|
|
217
608
|
WindowResizerComponent,
|
|
218
|
-
AsyncPipe
|
|
219
|
-
],
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
609
|
+
AsyncPipe
|
|
610
|
+
],
|
|
611
|
+
template: "<div #container\n (cdkDragEnded)=\"onDragEnded($event)\"\n [cdkDragDisabled]=\"windowRef.draggable === false\"\n [ngStyle]=\"{\n 'width': width(),\n 'height': height(),\n 'minWidth': windowRef.minWidth,\n 'minHeight': windowRef.minHeight,\n 'maxWidth': windowRef.maxWidth,\n 'maxHeight': windowRef.maxHeight\n }\"\n cdkDrag\n cdkDragBoundary=\".cdk-overlay-container\"\n class=\"drop-shadow-2xl bg-white dark:bg-black border-2 border-gray-400 dark:border-gray-800 rounded-xl overflow-hidden\">\n <div class=\"flex flex-col h-full max-h-full\">\n\n <div cdkDragHandle class=\"grow-0 w-full h-[64px] min-h-[64px] cursor-move\">\n <rxap-window-tool-bar></rxap-window-tool-bar>\n </div>\n\n <div class=\"grow overflow-auto w-full\">\n <ng-content></ng-content>\n </div>\n\n @if (windowRef.footerPortal$ | async; as footerPortal) {\n <mat-toolbar class=\"mat-elevation-z1 grow-0 w-full h-[64px] min-h-[64px]\">\n <ng-template [cdkPortalOutlet]=\"footerPortal\"></ng-template>\n </mat-toolbar>\n }\n\n @if (windowInstance.isLoading$ | async) {\n <mat-progress-bar mode=\"indeterminate\"></mat-progress-bar>\n }\n\n <rxap-window-resizer [containerRef]=\"containerRef()\"\n (width)=\"onResizerWidth($event)\"\n (height)=\"onResizerHeight($event)\"></rxap-window-resizer>\n </div>\n</div>\n"
|
|
612
|
+
}]
|
|
613
|
+
}],
|
|
614
|
+
ctorParameters: () => [],
|
|
615
|
+
propDecorators: {
|
|
616
|
+
footerContent: [{
|
|
617
|
+
type: i0.ContentChild,
|
|
618
|
+
args: ["[footer]", { isSignal: true }]
|
|
619
|
+
}],
|
|
620
|
+
containerRef: [{
|
|
621
|
+
type: i0.ViewChild,
|
|
622
|
+
args: ["container", { isSignal: true }]
|
|
623
|
+
}],
|
|
624
|
+
windowContainerResizer: [{
|
|
625
|
+
type: i0.ViewChild,
|
|
626
|
+
args: [i0.forwardRef(() => WindowResizerComponent), { isSignal: true }]
|
|
627
|
+
}]
|
|
628
|
+
}
|
|
629
|
+
});
|
|
630
|
+
var DefaultWindowComponent = class DefaultWindowComponent {
|
|
631
|
+
static {
|
|
632
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
633
|
+
minVersion: "12.0.0",
|
|
634
|
+
version: "22.3.0",
|
|
635
|
+
ngImport: i0,
|
|
636
|
+
type: DefaultWindowComponent,
|
|
637
|
+
deps: [],
|
|
638
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
static {
|
|
642
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
643
|
+
minVersion: "14.0.0",
|
|
644
|
+
version: "22.3.0",
|
|
645
|
+
type: DefaultWindowComponent,
|
|
646
|
+
isStandalone: true,
|
|
647
|
+
selector: "rxap-default-window",
|
|
648
|
+
ngImport: i0,
|
|
649
|
+
template: "<rxap-window-container>\n <rxap-window-content></rxap-window-content>\n</rxap-window-container>\n",
|
|
650
|
+
styles: [""],
|
|
651
|
+
dependencies: [{
|
|
652
|
+
kind: "component",
|
|
653
|
+
type: WindowContainerComponent,
|
|
654
|
+
selector: "rxap-window-container"
|
|
655
|
+
}, {
|
|
656
|
+
kind: "component",
|
|
657
|
+
type: WindowContentComponent,
|
|
658
|
+
selector: "rxap-window-content"
|
|
659
|
+
}],
|
|
660
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
};
|
|
664
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
665
|
+
minVersion: "12.0.0",
|
|
666
|
+
version: "22.3.0",
|
|
667
|
+
ngImport: i0,
|
|
668
|
+
type: DefaultWindowComponent,
|
|
669
|
+
decorators: [{
|
|
226
670
|
type: Component,
|
|
227
|
-
args: [{
|
|
228
|
-
|
|
671
|
+
args: [{
|
|
672
|
+
selector: "rxap-default-window",
|
|
673
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
674
|
+
imports: [WindowContainerComponent, WindowContentComponent],
|
|
675
|
+
template: "<rxap-window-container>\n <rxap-window-content></rxap-window-content>\n</rxap-window-container>\n"
|
|
676
|
+
}]
|
|
677
|
+
}]
|
|
678
|
+
});
|
|
229
679
|
function GetWindowStartPos() {
|
|
230
|
-
let top =
|
|
231
|
-
let left =
|
|
232
|
-
|
|
233
|
-
const rxapLayoutHeaderElements = document.getElementsByClassName('rxap-layout-header');
|
|
680
|
+
let top = "16px";
|
|
681
|
+
let left = "16px";
|
|
682
|
+
const rxapLayoutHeaderElements = document.getElementsByClassName("rxap-layout-header");
|
|
234
683
|
if (rxapLayoutHeaderElements) {
|
|
235
684
|
const rxapLayoutHeaderElement = rxapLayoutHeaderElements.item(0);
|
|
236
|
-
if (rxapLayoutHeaderElement && rxapLayoutHeaderElement instanceof HTMLElement)
|
|
237
|
-
top =
|
|
238
|
-
}
|
|
685
|
+
if (rxapLayoutHeaderElement && rxapLayoutHeaderElement instanceof HTMLElement)
|
|
686
|
+
top = rxapLayoutHeaderElement.offsetHeight + 16 + "px";
|
|
239
687
|
}
|
|
240
|
-
const rxapLayoutSidenavs = document.getElementsByClassName(
|
|
688
|
+
const rxapLayoutSidenavs = document.getElementsByClassName("rxap-layout-sidenav");
|
|
241
689
|
if (rxapLayoutSidenavs) {
|
|
242
690
|
const rxapLayoutSidenav = rxapLayoutSidenavs.item(0);
|
|
243
691
|
if (rxapLayoutSidenav && rxapLayoutSidenav instanceof HTMLElement) {
|
|
244
692
|
const container = rxapLayoutSidenav.firstElementChild;
|
|
245
|
-
if (container && container instanceof HTMLElement)
|
|
246
|
-
left =
|
|
247
|
-
}
|
|
693
|
+
if (container && container instanceof HTMLElement)
|
|
694
|
+
left = container.offsetWidth + 16 + "px";
|
|
248
695
|
}
|
|
249
696
|
}
|
|
250
697
|
return {
|
|
251
698
|
top,
|
|
252
|
-
left
|
|
699
|
+
left
|
|
253
700
|
};
|
|
254
701
|
}
|
|
255
702
|
const DEFAULT_WINDOW_CONFIG = {
|
|
256
703
|
resizeable: true,
|
|
257
704
|
draggable: true,
|
|
258
705
|
injector: null,
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
minimizable: false,
|
|
706
|
+
minWidth: "384px",
|
|
707
|
+
minHeight: "192px",
|
|
708
|
+
maxWidth: "100vw",
|
|
709
|
+
maxHeight: "100vh",
|
|
710
|
+
minimizable: false
|
|
265
711
|
};
|
|
266
|
-
|
|
712
|
+
var WindowRef = class extends Subject {
|
|
267
713
|
constructor(overlayRef, overlay, settings) {
|
|
268
714
|
super();
|
|
269
715
|
this.overlayRef = overlayRef;
|
|
@@ -271,24 +717,11 @@ class WindowRef extends Subject {
|
|
|
271
717
|
this.settings = settings;
|
|
272
718
|
this.width$ = new BehaviorSubject(this.getWidth());
|
|
273
719
|
this.height$ = new BehaviorSubject(this.getHeight());
|
|
274
|
-
/**
|
|
275
|
-
* @deprecated removed. use the subscribe method and wait for the resolve event
|
|
276
|
-
*/
|
|
277
720
|
this.closed$ = new Subject();
|
|
278
721
|
this.attachedRef$ = new ReplaySubject(1);
|
|
279
|
-
/**
|
|
280
|
-
* @internal
|
|
281
|
-
*/
|
|
282
722
|
this.footerPortal$ = new ReplaySubject(1);
|
|
283
|
-
/**
|
|
284
|
-
* @internal
|
|
285
|
-
*/
|
|
286
723
|
this.titlePortal$ = new ReplaySubject(1);
|
|
287
724
|
this.settings$ = new ReplaySubject(1);
|
|
288
|
-
/**
|
|
289
|
-
* stores the window size before fullScreen
|
|
290
|
-
* @internal
|
|
291
|
-
*/
|
|
292
725
|
this.oldSizes = null;
|
|
293
726
|
}
|
|
294
727
|
get id() {
|
|
@@ -313,17 +746,12 @@ class WindowRef extends Subject {
|
|
|
313
746
|
return this.settings.maxHeight;
|
|
314
747
|
}
|
|
315
748
|
get isMinimized() {
|
|
316
|
-
return this.overlayRef.hostElement.style.display ===
|
|
749
|
+
return this.overlayRef.hostElement.style.display === "none";
|
|
317
750
|
}
|
|
318
|
-
/**
|
|
319
|
-
* @deprecated removed. use the complete method
|
|
320
|
-
* @param result
|
|
321
|
-
*/
|
|
322
751
|
close(result) {
|
|
323
752
|
this.closed$.next(result);
|
|
324
|
-
if (result !==
|
|
753
|
+
if (result !== void 0)
|
|
325
754
|
this.next(result);
|
|
326
|
-
}
|
|
327
755
|
this.complete();
|
|
328
756
|
}
|
|
329
757
|
complete() {
|
|
@@ -331,12 +759,12 @@ class WindowRef extends Subject {
|
|
|
331
759
|
super.complete();
|
|
332
760
|
}
|
|
333
761
|
minimize() {
|
|
334
|
-
this.overlayRef.hostElement.style.display =
|
|
762
|
+
this.overlayRef.hostElement.style.display = "none";
|
|
335
763
|
}
|
|
336
764
|
reopen() {
|
|
337
765
|
const startPos = GetWindowStartPos();
|
|
338
766
|
this.setPos(startPos.left, startPos.top);
|
|
339
|
-
this.overlayRef.hostElement.style.display =
|
|
767
|
+
this.overlayRef.hostElement.style.display = "flex";
|
|
340
768
|
}
|
|
341
769
|
getSizeConfig() {
|
|
342
770
|
const config = this.overlayRef.getConfig();
|
|
@@ -346,57 +774,50 @@ class WindowRef extends Subject {
|
|
|
346
774
|
minHeight: config.minHeight,
|
|
347
775
|
minWidth: config.minWidth,
|
|
348
776
|
maxHeight: config.maxHeight,
|
|
349
|
-
maxWidth: config.maxWidth
|
|
777
|
+
maxWidth: config.maxWidth
|
|
350
778
|
};
|
|
351
779
|
}
|
|
352
780
|
setWidth(width) {
|
|
353
781
|
this.overlayRef.updateSize({
|
|
354
782
|
...this.getSizeConfig(),
|
|
355
|
-
width
|
|
783
|
+
width
|
|
356
784
|
});
|
|
357
785
|
this.width$.next(width);
|
|
358
786
|
}
|
|
359
787
|
setHeight(height) {
|
|
360
788
|
this.overlayRef.updateSize({
|
|
361
789
|
...this.getSizeConfig(),
|
|
362
|
-
height
|
|
790
|
+
height
|
|
363
791
|
});
|
|
364
792
|
this.height$.next(height);
|
|
365
793
|
}
|
|
366
794
|
getWidth() {
|
|
367
|
-
return this.getSizeConfig().width +
|
|
368
|
-
// return this.overlayRef.overlayElement.offsetWidth + 'px'
|
|
795
|
+
return this.getSizeConfig().width + "";
|
|
369
796
|
}
|
|
370
797
|
getHeight() {
|
|
371
|
-
return this.getSizeConfig().height +
|
|
372
|
-
// return this.overlayRef.overlayElement.offsetHeight + 'px';
|
|
798
|
+
return this.getSizeConfig().height + "";
|
|
373
799
|
}
|
|
374
800
|
setPos(x, y) {
|
|
375
|
-
this.overlayRef.updatePositionStrategy(this
|
|
376
|
-
.overlay
|
|
377
|
-
.position()
|
|
378
|
-
.global()
|
|
379
|
-
.top(y)
|
|
380
|
-
.left(x));
|
|
801
|
+
this.overlayRef.updatePositionStrategy(this.overlay.position().global().top(y).left(x));
|
|
381
802
|
this.overlayRef.updatePosition();
|
|
382
803
|
}
|
|
383
804
|
getPos() {
|
|
384
805
|
const pos = this.overlayRef.overlayElement.getBoundingClientRect();
|
|
385
806
|
return {
|
|
386
|
-
x: pos.left +
|
|
387
|
-
y: pos.top +
|
|
807
|
+
x: pos.left + "px",
|
|
808
|
+
y: pos.top + "px"
|
|
388
809
|
};
|
|
389
810
|
}
|
|
390
811
|
fullScreen() {
|
|
391
812
|
if (this.oldSizes === null) {
|
|
392
813
|
this.oldSizes = {
|
|
393
|
-
width: this.overlayRef.overlayElement.offsetWidth +
|
|
394
|
-
height: this.overlayRef.overlayElement.offsetHeight +
|
|
395
|
-
pos: this.getPos()
|
|
814
|
+
width: this.overlayRef.overlayElement.offsetWidth + "px",
|
|
815
|
+
height: this.overlayRef.overlayElement.offsetHeight + "px",
|
|
816
|
+
pos: this.getPos()
|
|
396
817
|
};
|
|
397
|
-
this.setWidth(
|
|
398
|
-
this.setHeight(
|
|
399
|
-
this.setPos(
|
|
818
|
+
this.setWidth("100vw");
|
|
819
|
+
this.setHeight("100vh");
|
|
820
|
+
this.setPos("0px", "0px");
|
|
400
821
|
}
|
|
401
822
|
else {
|
|
402
823
|
this.setWidth(this.oldSizes.width);
|
|
@@ -405,9 +826,6 @@ class WindowRef extends Subject {
|
|
|
405
826
|
this.oldSizes = null;
|
|
406
827
|
}
|
|
407
828
|
}
|
|
408
|
-
/**
|
|
409
|
-
* @param portal
|
|
410
|
-
*/
|
|
411
829
|
setFooterPortal(portal) {
|
|
412
830
|
setTimeout(() => {
|
|
413
831
|
this.footerPortal$.next(portal);
|
|
@@ -419,37 +837,27 @@ class WindowRef extends Subject {
|
|
|
419
837
|
});
|
|
420
838
|
}
|
|
421
839
|
setAttachedRef(attachedRef) {
|
|
422
|
-
if (attachedRef instanceof ComponentRef)
|
|
840
|
+
if (attachedRef instanceof ComponentRef)
|
|
423
841
|
this.updateWindowSettings(attachedRef);
|
|
424
|
-
|
|
425
|
-
else {
|
|
842
|
+
else
|
|
426
843
|
this.updateWindowSettings();
|
|
427
|
-
}
|
|
428
844
|
this.attachedRef$.next(attachedRef);
|
|
429
845
|
}
|
|
430
|
-
/**
|
|
431
|
-
* Injects the window settings from the component ref injector and overwrites
|
|
432
|
-
* the settings
|
|
433
|
-
* @private
|
|
434
|
-
*/
|
|
435
846
|
updateWindowSettings(componentRef) {
|
|
436
847
|
const settings = componentRef?.injector.get(RXAP_WINDOW_SETTINGS, null, { optional: true }) ?? this.settings;
|
|
437
|
-
if (settings)
|
|
438
|
-
// prevent change diction error: ExpressionChangedAfterItHasBeenCheckedError
|
|
848
|
+
if (settings)
|
|
439
849
|
setTimeout(() => {
|
|
440
850
|
this.settings$.next(Object.assign({}, this.settings, settings));
|
|
441
851
|
});
|
|
442
|
-
}
|
|
443
852
|
}
|
|
444
|
-
}
|
|
445
|
-
class WindowService {
|
|
853
|
+
};
|
|
854
|
+
var WindowService = class WindowService {
|
|
446
855
|
constructor() {
|
|
447
856
|
this.injector = inject(Injector);
|
|
448
857
|
this.overlay = inject(Overlay);
|
|
449
|
-
this.componentFactoryResolver = inject(ComponentFactoryResolver);
|
|
450
858
|
this.defaultWindowSettings = inject(RXAP_WINDOW_DEFAULT_SETTINGS, { optional: true });
|
|
451
859
|
this.activeCount$ = new Subject();
|
|
452
|
-
this.active = new Map();
|
|
860
|
+
this.active = /* @__PURE__ */ new Map();
|
|
453
861
|
}
|
|
454
862
|
get hasActiveWindows() {
|
|
455
863
|
return this.active.size !== 0;
|
|
@@ -461,77 +869,66 @@ class WindowService {
|
|
|
461
869
|
return Array.from(this.active.values());
|
|
462
870
|
}
|
|
463
871
|
get(id) {
|
|
464
|
-
if (!this.has(id))
|
|
872
|
+
if (!this.has(id))
|
|
465
873
|
throw new Error(`Active Window with id '${id}' not found`);
|
|
466
|
-
}
|
|
467
874
|
return this.active.get(id);
|
|
468
875
|
}
|
|
469
876
|
close(id) {
|
|
470
|
-
|
|
471
|
-
windowRef.complete();
|
|
877
|
+
this.get(id).complete();
|
|
472
878
|
}
|
|
473
879
|
has(id) {
|
|
474
880
|
return this.active.has(id);
|
|
475
881
|
}
|
|
476
882
|
open(config) {
|
|
477
|
-
// Override default configuration
|
|
478
883
|
const windowConfig = {
|
|
479
884
|
id: GenerateRandomString(),
|
|
480
885
|
...DEFAULT_WINDOW_CONFIG,
|
|
481
|
-
...
|
|
482
|
-
...config
|
|
886
|
+
...this.defaultWindowSettings ?? {},
|
|
887
|
+
...config
|
|
483
888
|
};
|
|
484
|
-
if (this.has(windowConfig.id))
|
|
889
|
+
if (this.has(windowConfig.id))
|
|
485
890
|
return this.get(windowConfig.id);
|
|
486
|
-
}
|
|
487
|
-
// Returns an OverlayRef which is a PortalHost
|
|
488
891
|
const overlayRef = this.createOverlay(windowConfig);
|
|
489
|
-
// Instantiate remote control
|
|
490
892
|
const windowRef = new WindowRef(overlayRef, this.overlay, windowConfig);
|
|
491
893
|
const context = {
|
|
492
894
|
id: windowConfig.id,
|
|
493
895
|
overlayRef,
|
|
494
896
|
windowRef,
|
|
495
|
-
data: windowConfig.data
|
|
897
|
+
data: windowConfig.data
|
|
496
898
|
};
|
|
497
899
|
const containerContext = {
|
|
498
900
|
template: windowConfig.template,
|
|
499
|
-
component: windowConfig.component
|
|
901
|
+
component: windowConfig.component
|
|
500
902
|
};
|
|
501
903
|
const injector = Injector.create({
|
|
502
904
|
parent: windowConfig.injector ?? this.injector,
|
|
503
905
|
providers: [
|
|
504
906
|
{
|
|
505
907
|
provide: RXAP_WINDOW_CONTAINER_CONTEXT,
|
|
506
|
-
useValue: containerContext
|
|
908
|
+
useValue: containerContext
|
|
507
909
|
},
|
|
508
910
|
{
|
|
509
911
|
provide: RXAP_WINDOW_CONTEXT,
|
|
510
|
-
useValue: context
|
|
912
|
+
useValue: context
|
|
511
913
|
},
|
|
512
914
|
{
|
|
513
915
|
provide: RXAP_WINDOW_DATA,
|
|
514
|
-
useValue: windowConfig.data
|
|
916
|
+
useValue: windowConfig.data
|
|
515
917
|
},
|
|
516
918
|
{
|
|
517
919
|
provide: RXAP_WINDOW_REF,
|
|
518
|
-
useValue: windowRef
|
|
920
|
+
useValue: windowRef
|
|
519
921
|
},
|
|
520
922
|
{
|
|
521
923
|
provide: LoadingIndicatorService,
|
|
522
|
-
useClass: LoadingIndicatorService
|
|
523
|
-
}
|
|
924
|
+
useClass: LoadingIndicatorService
|
|
925
|
+
}
|
|
524
926
|
],
|
|
525
|
-
name: windowConfig?.injectorName ??
|
|
927
|
+
name: windowConfig?.injectorName ?? "WindowService"
|
|
526
928
|
});
|
|
527
|
-
const containerPortal = new ComponentPortal(windowConfig.windowComponent ?? DefaultWindowComponent, injector.get(ViewContainerRef, null, { optional: true }) ??
|
|
528
|
-
windowConfig.viewContainerRef ??
|
|
529
|
-
null, injector);
|
|
929
|
+
const containerPortal = new ComponentPortal(windowConfig.windowComponent ?? DefaultWindowComponent, injector.get(ViewContainerRef, null, { optional: true }) ?? windowConfig.viewContainerRef ?? null, injector);
|
|
530
930
|
overlayRef.attach(containerPortal);
|
|
531
|
-
overlayRef
|
|
532
|
-
.backdropClick()
|
|
533
|
-
.pipe(take(1), tap(() => windowRef.complete()))
|
|
534
|
-
.subscribe();
|
|
931
|
+
overlayRef.backdropClick().pipe(take(1), tap(() => windowRef.complete())).subscribe();
|
|
535
932
|
windowRef.pipe(finalize(() => this.remove(windowConfig.id))).subscribe();
|
|
536
933
|
this.add(windowRef);
|
|
537
934
|
return windowRef;
|
|
@@ -545,37 +942,56 @@ class WindowService {
|
|
|
545
942
|
this.active.set(windowRef.id, windowRef);
|
|
546
943
|
this.activeCount$.next(this.active.size);
|
|
547
944
|
}
|
|
548
|
-
createOverlay({ panelClass, width, height, minHeight, minWidth, maxHeight, maxWidth
|
|
945
|
+
createOverlay({ panelClass, width, height, minHeight, minWidth, maxHeight, maxWidth }) {
|
|
549
946
|
const startPos = GetWindowStartPos();
|
|
550
|
-
const positionStrategy = this.overlay
|
|
551
|
-
.position()
|
|
552
|
-
.global()
|
|
553
|
-
.top(startPos.top)
|
|
554
|
-
.left(startPos.left);
|
|
947
|
+
const positionStrategy = this.overlay.position().global().top(startPos.top).left(startPos.left);
|
|
555
948
|
const overlayConfig = new OverlayConfig({
|
|
556
949
|
hasBackdrop: false,
|
|
557
950
|
panelClass,
|
|
558
951
|
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
559
952
|
width,
|
|
560
953
|
height,
|
|
561
|
-
maxWidth: maxWidth ?? this.defaultWindowSettings?.maxWidth ??
|
|
562
|
-
maxHeight: maxHeight ?? this.defaultWindowSettings?.maxHeight ??
|
|
563
|
-
minWidth: minWidth ?? this.defaultWindowSettings?.minWidth ??
|
|
564
|
-
minHeight: minHeight ?? this.defaultWindowSettings?.minHeight ??
|
|
565
|
-
positionStrategy
|
|
954
|
+
maxWidth: maxWidth ?? this.defaultWindowSettings?.maxWidth ?? "100vw",
|
|
955
|
+
maxHeight: maxHeight ?? this.defaultWindowSettings?.maxHeight ?? "100vh",
|
|
956
|
+
minWidth: minWidth ?? this.defaultWindowSettings?.minWidth ?? "384px",
|
|
957
|
+
minHeight: minHeight ?? this.defaultWindowSettings?.minHeight ?? "192px",
|
|
958
|
+
positionStrategy
|
|
566
959
|
});
|
|
567
960
|
return this.overlay.create(overlayConfig);
|
|
568
961
|
}
|
|
569
|
-
static {
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
962
|
+
static {
|
|
963
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
964
|
+
minVersion: "12.0.0",
|
|
965
|
+
version: "22.3.0",
|
|
966
|
+
ngImport: i0,
|
|
967
|
+
type: WindowService,
|
|
968
|
+
deps: [],
|
|
969
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
970
|
+
});
|
|
971
|
+
}
|
|
972
|
+
static {
|
|
973
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
974
|
+
minVersion: "12.0.0",
|
|
975
|
+
version: "22.3.0",
|
|
976
|
+
ngImport: i0,
|
|
977
|
+
type: WindowService,
|
|
978
|
+
providedIn: "root"
|
|
979
|
+
});
|
|
980
|
+
}
|
|
981
|
+
};
|
|
982
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
983
|
+
minVersion: "12.0.0",
|
|
984
|
+
version: "22.3.0",
|
|
985
|
+
ngImport: i0,
|
|
986
|
+
type: WindowService,
|
|
987
|
+
decorators: [{
|
|
573
988
|
type: Injectable,
|
|
574
|
-
args: [{ providedIn:
|
|
575
|
-
}]
|
|
576
|
-
|
|
989
|
+
args: [{ providedIn: "root" }]
|
|
990
|
+
}]
|
|
991
|
+
});
|
|
992
|
+
var WindowTaskComponent = class WindowTaskComponent {
|
|
577
993
|
constructor() {
|
|
578
|
-
this.window = input.required(...
|
|
994
|
+
this.window = input.required(...ngDevMode ? [{ debugName: "window" }] : /* istanbul ignore next */ []);
|
|
579
995
|
}
|
|
580
996
|
close() {
|
|
581
997
|
this.window().complete();
|
|
@@ -583,112 +999,405 @@ class WindowTaskComponent {
|
|
|
583
999
|
reopen() {
|
|
584
1000
|
this.window().reopen();
|
|
585
1001
|
}
|
|
586
|
-
static {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
1002
|
+
static {
|
|
1003
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1004
|
+
minVersion: "12.0.0",
|
|
1005
|
+
version: "22.3.0",
|
|
1006
|
+
ngImport: i0,
|
|
1007
|
+
type: WindowTaskComponent,
|
|
1008
|
+
deps: [],
|
|
1009
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1010
|
+
});
|
|
1011
|
+
}
|
|
1012
|
+
static {
|
|
1013
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1014
|
+
minVersion: "17.0.0",
|
|
1015
|
+
version: "22.3.0",
|
|
1016
|
+
type: WindowTaskComponent,
|
|
1017
|
+
isStandalone: true,
|
|
1018
|
+
selector: "rxap-window-task",
|
|
1019
|
+
inputs: { window: {
|
|
1020
|
+
classPropertyName: "window",
|
|
1021
|
+
publicName: "window",
|
|
1022
|
+
isSignal: true,
|
|
1023
|
+
isRequired: true,
|
|
1024
|
+
transformFunction: null
|
|
1025
|
+
} },
|
|
1026
|
+
ngImport: i0,
|
|
1027
|
+
template: "<div (click)=\"reopen()\" [ngClass]=\"{ minimized: window().isMinimized }\"\n class=\"rxap-container mat-elevation-z2 flex flex-row justify-start items-center gap-2\">\n @if (window().settings$ | async; as settings) {\n @if (settings.icon) {\n <mat-icon [rxapIcon]=\"settings.icon\"></mat-icon>\n }\n @if (settings.title) {\n <h3 class=\"grow\">{{settings.title}}</h3>\n }\n }\n <button (click)=\"close()\" mat-icon-button rxapStopPropagation type=\"button\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n",
|
|
1028
|
+
styles: [".rxap-container{padding:5px;cursor:pointer}.rxap-container.minimized{opacity:.5}\n"],
|
|
1029
|
+
dependencies: [
|
|
1030
|
+
{
|
|
1031
|
+
kind: "directive",
|
|
1032
|
+
type: NgClass,
|
|
1033
|
+
selector: "[ngClass]",
|
|
1034
|
+
inputs: ["class", "ngClass"]
|
|
1035
|
+
},
|
|
1036
|
+
{
|
|
1037
|
+
kind: "ngmodule",
|
|
1038
|
+
type: MatIconModule
|
|
1039
|
+
},
|
|
1040
|
+
{
|
|
1041
|
+
kind: "component",
|
|
1042
|
+
type: i3$1.MatIcon,
|
|
1043
|
+
selector: "mat-icon",
|
|
1044
|
+
inputs: [
|
|
1045
|
+
"color",
|
|
1046
|
+
"inline",
|
|
1047
|
+
"svgIcon",
|
|
1048
|
+
"fontSet",
|
|
1049
|
+
"fontIcon"
|
|
1050
|
+
],
|
|
1051
|
+
exportAs: ["matIcon"]
|
|
1052
|
+
},
|
|
1053
|
+
{
|
|
1054
|
+
kind: "directive",
|
|
1055
|
+
type: IconDirective,
|
|
1056
|
+
selector: "mat-icon[rxapIcon]",
|
|
1057
|
+
inputs: ["rxapIcon"]
|
|
1058
|
+
},
|
|
1059
|
+
{
|
|
1060
|
+
kind: "ngmodule",
|
|
1061
|
+
type: MatButtonModule
|
|
1062
|
+
},
|
|
1063
|
+
{
|
|
1064
|
+
kind: "component",
|
|
1065
|
+
type: i4.MatIconButton,
|
|
1066
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
1067
|
+
exportAs: ["matButton", "matAnchor"]
|
|
1068
|
+
},
|
|
1069
|
+
{
|
|
1070
|
+
kind: "directive",
|
|
1071
|
+
type: StopPropagationDirective,
|
|
1072
|
+
selector: "[rxapStopPropagation]"
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
kind: "pipe",
|
|
1076
|
+
type: AsyncPipe,
|
|
1077
|
+
name: "async"
|
|
1078
|
+
}
|
|
1079
|
+
],
|
|
1080
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1081
|
+
});
|
|
1082
|
+
}
|
|
1083
|
+
};
|
|
1084
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1085
|
+
minVersion: "12.0.0",
|
|
1086
|
+
version: "22.3.0",
|
|
1087
|
+
ngImport: i0,
|
|
1088
|
+
type: WindowTaskComponent,
|
|
1089
|
+
decorators: [{
|
|
590
1090
|
type: Component,
|
|
591
|
-
args: [{
|
|
1091
|
+
args: [{
|
|
1092
|
+
selector: "rxap-window-task",
|
|
1093
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1094
|
+
imports: [
|
|
592
1095
|
NgClass,
|
|
593
1096
|
MatIconModule,
|
|
594
1097
|
IconDirective,
|
|
595
1098
|
MatButtonModule,
|
|
596
1099
|
StopPropagationDirective,
|
|
597
1100
|
AsyncPipe
|
|
598
|
-
],
|
|
599
|
-
|
|
1101
|
+
],
|
|
1102
|
+
template: "<div (click)=\"reopen()\" [ngClass]=\"{ minimized: window().isMinimized }\"\n class=\"rxap-container mat-elevation-z2 flex flex-row justify-start items-center gap-2\">\n @if (window().settings$ | async; as settings) {\n @if (settings.icon) {\n <mat-icon [rxapIcon]=\"settings.icon\"></mat-icon>\n }\n @if (settings.title) {\n <h3 class=\"grow\">{{settings.title}}</h3>\n }\n }\n <button (click)=\"close()\" mat-icon-button rxapStopPropagation type=\"button\">\n <mat-icon>close</mat-icon>\n </button>\n</div>\n",
|
|
1103
|
+
styles: [".rxap-container{padding:5px;cursor:pointer}.rxap-container.minimized{opacity:.5}\n"]
|
|
1104
|
+
}]
|
|
1105
|
+
}],
|
|
1106
|
+
propDecorators: { window: [{
|
|
1107
|
+
type: i0.Input,
|
|
1108
|
+
args: [{
|
|
1109
|
+
isSignal: true,
|
|
1110
|
+
alias: "window",
|
|
1111
|
+
required: true
|
|
1112
|
+
}]
|
|
1113
|
+
}] }
|
|
1114
|
+
});
|
|
600
1115
|
let WindowTaskBarComponent = class WindowTaskBarComponent {
|
|
601
1116
|
constructor() {
|
|
602
1117
|
this.windowService = inject(WindowService);
|
|
603
|
-
/**
|
|
604
|
-
* Emits whenever the number of active windows changes. Reading the signal in the template
|
|
605
|
-
* marks the component dirty so the window list is re-evaluated.
|
|
606
|
-
*/
|
|
607
1118
|
this.activeCount = toSignal(this.windowService.activeCount$);
|
|
608
1119
|
}
|
|
609
|
-
static {
|
|
610
|
-
|
|
1120
|
+
static {
|
|
1121
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1122
|
+
minVersion: "12.0.0",
|
|
1123
|
+
version: "22.3.0",
|
|
1124
|
+
ngImport: i0,
|
|
1125
|
+
type: WindowTaskBarComponent,
|
|
1126
|
+
deps: [],
|
|
1127
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1128
|
+
});
|
|
1129
|
+
}
|
|
1130
|
+
static {
|
|
1131
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1132
|
+
minVersion: "17.0.0",
|
|
1133
|
+
version: "22.3.0",
|
|
1134
|
+
type: WindowTaskBarComponent,
|
|
1135
|
+
isStandalone: true,
|
|
1136
|
+
selector: "rxap-window-task-bar",
|
|
1137
|
+
ngImport: i0,
|
|
1138
|
+
template: "@let _activeCount = activeCount();\n<div class=\"tasks grow-0 flex flex-row flex-wrap\">\n @for (window of windowService.allActiveWindows; track window) {\n <rxap-window-task\n [window]=\"window\"\n class=\"grow-0\">\n </rxap-window-task>\n }\n</div>\n",
|
|
1139
|
+
styles: [""],
|
|
1140
|
+
dependencies: [{
|
|
1141
|
+
kind: "component",
|
|
1142
|
+
type: WindowTaskComponent,
|
|
1143
|
+
selector: "rxap-window-task",
|
|
1144
|
+
inputs: ["window"]
|
|
1145
|
+
}],
|
|
1146
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1147
|
+
});
|
|
1148
|
+
}
|
|
611
1149
|
};
|
|
612
|
-
i0.ɵɵngDeclareClassMetadata({
|
|
1150
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1151
|
+
minVersion: "12.0.0",
|
|
1152
|
+
version: "22.3.0",
|
|
1153
|
+
ngImport: i0,
|
|
1154
|
+
type: WindowTaskBarComponent,
|
|
1155
|
+
decorators: [{
|
|
613
1156
|
type: Component,
|
|
614
|
-
args: [{
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
1157
|
+
args: [{
|
|
1158
|
+
selector: "rxap-window-task-bar",
|
|
1159
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1160
|
+
imports: [WindowTaskComponent],
|
|
1161
|
+
template: "@let _activeCount = activeCount();\n<div class=\"tasks grow-0 flex flex-row flex-wrap\">\n @for (window of windowService.allActiveWindows; track window) {\n <rxap-window-task\n [window]=\"window\"\n class=\"grow-0\">\n </rxap-window-task>\n }\n</div>\n"
|
|
1162
|
+
}]
|
|
1163
|
+
}]
|
|
1164
|
+
});
|
|
1165
|
+
const RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS = new InjectionToken("rxap/window-system/task-bar-container");
|
|
1166
|
+
var WindowTaskBarContainerComponent = class WindowTaskBarContainerComponent {
|
|
618
1167
|
constructor() {
|
|
619
1168
|
this.windowService = inject(WindowService);
|
|
620
1169
|
this.expand = true;
|
|
621
1170
|
const settings = inject(RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS, { optional: true }) ?? null;
|
|
622
1171
|
if (settings) {
|
|
623
|
-
if (settings.expand !==
|
|
1172
|
+
if (settings.expand !== void 0)
|
|
624
1173
|
this.expand = settings.expand;
|
|
625
|
-
}
|
|
626
1174
|
}
|
|
627
1175
|
}
|
|
628
|
-
static {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
1176
|
+
static {
|
|
1177
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1178
|
+
minVersion: "12.0.0",
|
|
1179
|
+
version: "22.3.0",
|
|
1180
|
+
ngImport: i0,
|
|
1181
|
+
type: WindowTaskBarContainerComponent,
|
|
1182
|
+
deps: [],
|
|
1183
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1184
|
+
});
|
|
1185
|
+
}
|
|
1186
|
+
static {
|
|
1187
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1188
|
+
minVersion: "17.0.0",
|
|
1189
|
+
version: "22.3.0",
|
|
1190
|
+
type: WindowTaskBarContainerComponent,
|
|
1191
|
+
isStandalone: true,
|
|
1192
|
+
selector: "rxap-window-task-bar-container",
|
|
1193
|
+
ngImport: i0,
|
|
1194
|
+
template: "@if (windowService.hasActiveWindows) {\n <div class=\"rxap-container flex flex-col\">\n <div class=\"flex flex-row justify-end items-end\">\n <button (click)=\"expand = !expand\"\n [matBadgeHidden]=\"!windowService.hasActiveWindows\"\n [matBadge]=\"windowService.activeWindowCount.toFixed(0)\"\n class=\"pin\"\n color=\"primary\"\n mat-icon-button\n matBadgePosition=\"above before\"\n type=\"button\">\n @if (!expand) {\n <mat-icon>keyboard_arrow_up</mat-icon>\n }\n @if (expand) {\n <mat-icon>keyboard_arrow_down</mat-icon>\n }\n </button>\n </div>\n <mat-toolbar [ngClass]=\"{ hidden: !expand }\" class=\"tasks\">\n <rxap-window-task-bar></rxap-window-task-bar>\n </mat-toolbar>\n </div>\n}\n",
|
|
1195
|
+
styles: [".rxap-container .pin{border:none;border-radius:50% 50% 0 0;cursor:pointer}.rxap-container .tasks{height:auto;padding:16px}\n"],
|
|
1196
|
+
dependencies: [
|
|
1197
|
+
{
|
|
1198
|
+
kind: "ngmodule",
|
|
1199
|
+
type: MatButtonModule
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
kind: "component",
|
|
1203
|
+
type: i4.MatIconButton,
|
|
1204
|
+
selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]",
|
|
1205
|
+
exportAs: ["matButton", "matAnchor"]
|
|
1206
|
+
},
|
|
1207
|
+
{
|
|
1208
|
+
kind: "ngmodule",
|
|
1209
|
+
type: MatBadgeModule
|
|
1210
|
+
},
|
|
1211
|
+
{
|
|
1212
|
+
kind: "directive",
|
|
1213
|
+
type: i2.MatBadge,
|
|
1214
|
+
selector: "[matBadge]",
|
|
1215
|
+
inputs: [
|
|
1216
|
+
"matBadgeColor",
|
|
1217
|
+
"matBadgeOverlap",
|
|
1218
|
+
"matBadgeDisabled",
|
|
1219
|
+
"matBadgePosition",
|
|
1220
|
+
"matBadge",
|
|
1221
|
+
"matBadgeDescription",
|
|
1222
|
+
"matBadgeSize",
|
|
1223
|
+
"matBadgeHidden"
|
|
1224
|
+
]
|
|
1225
|
+
},
|
|
1226
|
+
{
|
|
1227
|
+
kind: "ngmodule",
|
|
1228
|
+
type: MatIconModule
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
kind: "component",
|
|
1232
|
+
type: i3$1.MatIcon,
|
|
1233
|
+
selector: "mat-icon",
|
|
1234
|
+
inputs: [
|
|
1235
|
+
"color",
|
|
1236
|
+
"inline",
|
|
1237
|
+
"svgIcon",
|
|
1238
|
+
"fontSet",
|
|
1239
|
+
"fontIcon"
|
|
1240
|
+
],
|
|
1241
|
+
exportAs: ["matIcon"]
|
|
1242
|
+
},
|
|
1243
|
+
{
|
|
1244
|
+
kind: "ngmodule",
|
|
1245
|
+
type: MatToolbarModule
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
kind: "component",
|
|
1249
|
+
type: i1.MatToolbar,
|
|
1250
|
+
selector: "mat-toolbar",
|
|
1251
|
+
inputs: ["color"],
|
|
1252
|
+
exportAs: ["matToolbar"]
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
kind: "component",
|
|
1256
|
+
type: WindowTaskBarComponent,
|
|
1257
|
+
selector: "rxap-window-task-bar"
|
|
1258
|
+
},
|
|
1259
|
+
{
|
|
1260
|
+
kind: "directive",
|
|
1261
|
+
type: NgClass,
|
|
1262
|
+
selector: "[ngClass]",
|
|
1263
|
+
inputs: ["class", "ngClass"]
|
|
1264
|
+
}
|
|
1265
|
+
],
|
|
1266
|
+
changeDetection: i0.ChangeDetectionStrategy.Eager
|
|
1267
|
+
});
|
|
1268
|
+
}
|
|
1269
|
+
};
|
|
1270
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1271
|
+
minVersion: "12.0.0",
|
|
1272
|
+
version: "22.3.0",
|
|
1273
|
+
ngImport: i0,
|
|
1274
|
+
type: WindowTaskBarContainerComponent,
|
|
1275
|
+
decorators: [{
|
|
632
1276
|
type: Component,
|
|
633
|
-
args: [{
|
|
1277
|
+
args: [{
|
|
1278
|
+
selector: "rxap-window-task-bar-container",
|
|
1279
|
+
changeDetection: ChangeDetectionStrategy.Eager,
|
|
1280
|
+
imports: [
|
|
634
1281
|
MatButtonModule,
|
|
635
1282
|
MatBadgeModule,
|
|
636
1283
|
MatIconModule,
|
|
637
1284
|
MatToolbarModule,
|
|
638
1285
|
WindowTaskBarComponent,
|
|
639
1286
|
NgClass
|
|
640
|
-
],
|
|
641
|
-
|
|
642
|
-
|
|
1287
|
+
],
|
|
1288
|
+
template: "@if (windowService.hasActiveWindows) {\n <div class=\"rxap-container flex flex-col\">\n <div class=\"flex flex-row justify-end items-end\">\n <button (click)=\"expand = !expand\"\n [matBadgeHidden]=\"!windowService.hasActiveWindows\"\n [matBadge]=\"windowService.activeWindowCount.toFixed(0)\"\n class=\"pin\"\n color=\"primary\"\n mat-icon-button\n matBadgePosition=\"above before\"\n type=\"button\">\n @if (!expand) {\n <mat-icon>keyboard_arrow_up</mat-icon>\n }\n @if (expand) {\n <mat-icon>keyboard_arrow_down</mat-icon>\n }\n </button>\n </div>\n <mat-toolbar [ngClass]=\"{ hidden: !expand }\" class=\"tasks\">\n <rxap-window-task-bar></rxap-window-task-bar>\n </mat-toolbar>\n </div>\n}\n",
|
|
1289
|
+
styles: [".rxap-container .pin{border:none;border-radius:50% 50% 0 0;cursor:pointer}.rxap-container .tasks{height:auto;padding:16px}\n"]
|
|
1290
|
+
}]
|
|
1291
|
+
}],
|
|
1292
|
+
ctorParameters: () => []
|
|
1293
|
+
});
|
|
1294
|
+
var WindowActionBarComponent = class WindowActionBarComponent {
|
|
643
1295
|
constructor() {
|
|
644
1296
|
this.injector = inject(Injector);
|
|
645
1297
|
this.definitions = null;
|
|
646
|
-
this.position =
|
|
647
|
-
// the removed actions feature accesses the protected window settings
|
|
1298
|
+
this.position = "start";
|
|
648
1299
|
const context = inject(RXAP_WINDOW_CONTEXT);
|
|
649
1300
|
if (context.windowRef.settings.actions) {
|
|
650
1301
|
this.definitions = context.windowRef.settings.actions.definitions;
|
|
651
1302
|
this.position = context.windowRef.settings.actions.position || this.position;
|
|
652
1303
|
}
|
|
653
1304
|
}
|
|
654
|
-
static {
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
1305
|
+
static {
|
|
1306
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1307
|
+
minVersion: "12.0.0",
|
|
1308
|
+
version: "22.3.0",
|
|
1309
|
+
ngImport: i0,
|
|
1310
|
+
type: WindowActionBarComponent,
|
|
1311
|
+
deps: [],
|
|
1312
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
1313
|
+
});
|
|
1314
|
+
}
|
|
1315
|
+
static {
|
|
1316
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
1317
|
+
minVersion: "17.0.0",
|
|
1318
|
+
version: "22.3.0",
|
|
1319
|
+
type: WindowActionBarComponent,
|
|
1320
|
+
isStandalone: true,
|
|
1321
|
+
selector: "rxap-window-action-bar",
|
|
1322
|
+
ngImport: i0,
|
|
1323
|
+
template: "@if (definitions) {\n <mat-toolbar-row class=\"p-2 flex flex-row gap-2 justify-{{position}} items-center\">\n <span>this feature is removed</span>\n </mat-toolbar-row>\n}\n",
|
|
1324
|
+
styles: [""],
|
|
1325
|
+
dependencies: [{
|
|
1326
|
+
kind: "ngmodule",
|
|
1327
|
+
type: MatToolbarModule
|
|
1328
|
+
}, {
|
|
1329
|
+
kind: "directive",
|
|
1330
|
+
type: i1.MatToolbarRow,
|
|
1331
|
+
selector: "mat-toolbar-row",
|
|
1332
|
+
exportAs: ["matToolbarRow"]
|
|
1333
|
+
}],
|
|
1334
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
1335
|
+
});
|
|
1336
|
+
}
|
|
1337
|
+
};
|
|
1338
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1339
|
+
minVersion: "12.0.0",
|
|
1340
|
+
version: "22.3.0",
|
|
1341
|
+
ngImport: i0,
|
|
1342
|
+
type: WindowActionBarComponent,
|
|
1343
|
+
decorators: [{
|
|
658
1344
|
type: Component,
|
|
659
|
-
args: [{
|
|
660
|
-
|
|
661
|
-
|
|
1345
|
+
args: [{
|
|
1346
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1347
|
+
selector: "rxap-window-action-bar",
|
|
1348
|
+
imports: [MatToolbarModule],
|
|
1349
|
+
template: "@if (definitions) {\n <mat-toolbar-row class=\"p-2 flex flex-row gap-2 justify-{{position}} items-center\">\n <span>this feature is removed</span>\n </mat-toolbar-row>\n}\n"
|
|
1350
|
+
}]
|
|
1351
|
+
}],
|
|
1352
|
+
ctorParameters: () => []
|
|
1353
|
+
});
|
|
1354
|
+
var WindowFooterDirective = class WindowFooterDirective {
|
|
662
1355
|
constructor() {
|
|
663
1356
|
this.windowRef = inject(RXAP_WINDOW_REF);
|
|
664
1357
|
this.template = inject(TemplateRef);
|
|
665
1358
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
666
1359
|
}
|
|
667
|
-
/**
|
|
668
|
-
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
669
|
-
*
|
|
670
|
-
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
671
|
-
* `NgForOf` structural directive renders its template with a specific context type.
|
|
672
|
-
*/
|
|
673
1360
|
static ngTemplateContextGuard(dir, ctx) {
|
|
674
1361
|
return true;
|
|
675
1362
|
}
|
|
676
1363
|
ngOnInit() {
|
|
677
|
-
this.windowRef.setFooterPortal(new TemplatePortal(this.template, this.viewContainerRef, {
|
|
678
|
-
$implicit: this.windowRef,
|
|
679
|
-
}));
|
|
1364
|
+
this.windowRef.setFooterPortal(new TemplatePortal(this.template, this.viewContainerRef, { $implicit: this.windowRef }));
|
|
680
1365
|
}
|
|
681
|
-
static {
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
1366
|
+
static {
|
|
1367
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1368
|
+
minVersion: "12.0.0",
|
|
1369
|
+
version: "22.3.0",
|
|
1370
|
+
ngImport: i0,
|
|
1371
|
+
type: WindowFooterDirective,
|
|
1372
|
+
deps: [],
|
|
1373
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1376
|
+
static {
|
|
1377
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1378
|
+
minVersion: "14.0.0",
|
|
1379
|
+
version: "22.3.0",
|
|
1380
|
+
type: WindowFooterDirective,
|
|
1381
|
+
isStandalone: true,
|
|
1382
|
+
selector: "[rxapWindowFooter]",
|
|
1383
|
+
ngImport: i0
|
|
1384
|
+
});
|
|
1385
|
+
}
|
|
1386
|
+
};
|
|
1387
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1388
|
+
minVersion: "12.0.0",
|
|
1389
|
+
version: "22.3.0",
|
|
1390
|
+
ngImport: i0,
|
|
1391
|
+
type: WindowFooterDirective,
|
|
1392
|
+
decorators: [{
|
|
685
1393
|
type: Directive,
|
|
686
1394
|
args: [{
|
|
687
|
-
selector:
|
|
688
|
-
standalone: true
|
|
1395
|
+
selector: "[rxapWindowFooter]",
|
|
1396
|
+
standalone: true
|
|
689
1397
|
}]
|
|
690
|
-
}]
|
|
691
|
-
|
|
1398
|
+
}]
|
|
1399
|
+
});
|
|
1400
|
+
var WindowInstanceService = class WindowInstanceService {
|
|
692
1401
|
constructor() {
|
|
693
1402
|
this.loading$ = new ToggleSubject(false);
|
|
694
1403
|
this._attachedLoadingSubscription = new Subscription();
|
|
@@ -699,45 +1408,76 @@ class WindowInstanceService {
|
|
|
699
1408
|
ngOnDestroy() {
|
|
700
1409
|
this._attachedLoadingSubscription.unsubscribe();
|
|
701
1410
|
}
|
|
702
|
-
static {
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
1411
|
+
static {
|
|
1412
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1413
|
+
minVersion: "12.0.0",
|
|
1414
|
+
version: "22.3.0",
|
|
1415
|
+
ngImport: i0,
|
|
1416
|
+
type: WindowInstanceService,
|
|
1417
|
+
deps: [],
|
|
1418
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
1419
|
+
});
|
|
1420
|
+
}
|
|
1421
|
+
static {
|
|
1422
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
1423
|
+
minVersion: "12.0.0",
|
|
1424
|
+
version: "22.3.0",
|
|
1425
|
+
ngImport: i0,
|
|
1426
|
+
type: WindowInstanceService
|
|
1427
|
+
});
|
|
1428
|
+
}
|
|
1429
|
+
};
|
|
1430
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1431
|
+
minVersion: "12.0.0",
|
|
1432
|
+
version: "22.3.0",
|
|
1433
|
+
ngImport: i0,
|
|
1434
|
+
type: WindowInstanceService,
|
|
1435
|
+
decorators: [{ type: Injectable }]
|
|
1436
|
+
});
|
|
1437
|
+
var WindowTitleDirective = class WindowTitleDirective {
|
|
709
1438
|
constructor() {
|
|
710
1439
|
this.windowRef = inject(RXAP_WINDOW_REF);
|
|
711
1440
|
this.template = inject(TemplateRef);
|
|
712
1441
|
this.viewContainerRef = inject(ViewContainerRef);
|
|
713
1442
|
}
|
|
714
|
-
/**
|
|
715
|
-
* Asserts the correct type of the context for the template that `NgForOf` will render.
|
|
716
|
-
*
|
|
717
|
-
* The presence of this method is a signal to the Ivy template type-check compiler that the
|
|
718
|
-
* `NgForOf` structural directive renders its template with a specific context type.
|
|
719
|
-
*/
|
|
720
1443
|
static ngTemplateContextGuard(dir, ctx) {
|
|
721
1444
|
return true;
|
|
722
1445
|
}
|
|
723
1446
|
ngOnInit() {
|
|
724
|
-
this.windowRef.setTitlePortal(new TemplatePortal(this.template, this.viewContainerRef, {
|
|
725
|
-
$implicit: this.windowRef,
|
|
726
|
-
}));
|
|
1447
|
+
this.windowRef.setTitlePortal(new TemplatePortal(this.template, this.viewContainerRef, { $implicit: this.windowRef }));
|
|
727
1448
|
}
|
|
728
|
-
static {
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
1449
|
+
static {
|
|
1450
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1451
|
+
minVersion: "12.0.0",
|
|
1452
|
+
version: "22.3.0",
|
|
1453
|
+
ngImport: i0,
|
|
1454
|
+
type: WindowTitleDirective,
|
|
1455
|
+
deps: [],
|
|
1456
|
+
target: i0.ɵɵFactoryTarget.Directive
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
static {
|
|
1460
|
+
this.ɵdir = i0.ɵɵngDeclareDirective({
|
|
1461
|
+
minVersion: "14.0.0",
|
|
1462
|
+
version: "22.3.0",
|
|
1463
|
+
type: WindowTitleDirective,
|
|
1464
|
+
isStandalone: true,
|
|
1465
|
+
selector: "[rxapWindowTitle]",
|
|
1466
|
+
ngImport: i0
|
|
1467
|
+
});
|
|
1468
|
+
}
|
|
1469
|
+
};
|
|
1470
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1471
|
+
minVersion: "12.0.0",
|
|
1472
|
+
version: "22.3.0",
|
|
1473
|
+
ngImport: i0,
|
|
1474
|
+
type: WindowTitleDirective,
|
|
1475
|
+
decorators: [{
|
|
732
1476
|
type: Directive,
|
|
733
1477
|
args: [{
|
|
734
|
-
selector:
|
|
735
|
-
standalone: true
|
|
1478
|
+
selector: "[rxapWindowTitle]",
|
|
1479
|
+
standalone: true
|
|
736
1480
|
}]
|
|
737
|
-
}]
|
|
738
|
-
|
|
739
|
-
// endregion
|
|
740
|
-
/**
|
|
741
|
-
* Generated bundle index. Do not edit.
|
|
742
|
-
*/
|
|
1481
|
+
}]
|
|
1482
|
+
});
|
|
743
1483
|
export { DEFAULT_WINDOW_CONFIG, DefaultWindowComponent, GetWindowStartPos, RXAP_WINDOW_CONTAINER_CONTEXT, RXAP_WINDOW_CONTEXT, RXAP_WINDOW_DATA, RXAP_WINDOW_DEFAULT_SETTINGS, RXAP_WINDOW_REF, RXAP_WINDOW_SETTINGS, RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS, WindowActionBarComponent, WindowContainerComponent, WindowContentComponent, WindowFooterDirective, WindowInstanceService, WindowRef, WindowResizerComponent, WindowService, WindowTaskBarComponent, WindowTaskBarContainerComponent, WindowTaskComponent, WindowTitleDirective, WindowToolBarComponent };
|