@rxap/window-system 12.1.0 → 13.0.0-next.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.
Files changed (73) hide show
  1. package/esm2020/index.mjs +17 -0
  2. package/esm2020/lib/default-window/default-window.component.mjs +13 -0
  3. package/esm2020/lib/tokens.mjs +8 -0
  4. package/esm2020/lib/utilities.mjs +24 -0
  5. package/esm2020/lib/window-action-bar/window-action-bar.component.mjs +28 -0
  6. package/esm2020/lib/window-config.mjs +11 -0
  7. package/esm2020/lib/window-container/window-container.component.mjs +85 -0
  8. package/esm2020/lib/window-content/window-content.component.mjs +74 -0
  9. package/esm2020/lib/window-context.mjs +2 -0
  10. package/esm2020/lib/window-footer.directive.mjs +57 -0
  11. package/esm2020/lib/window-ref.mjs +162 -0
  12. package/esm2020/lib/window-resizer/window-resizer.component.mjs +79 -0
  13. package/esm2020/lib/window-system.module.mjs +92 -0
  14. package/esm2020/lib/window-task-bar/window-task/window-task.component.mjs +33 -0
  15. package/esm2020/lib/window-task-bar/window-task-bar-container/window-task-bar-container.component.mjs +39 -0
  16. package/esm2020/lib/window-task-bar/window-task-bar.component.mjs +35 -0
  17. package/esm2020/lib/window-task-bar/window-task-bar.module.mjs +52 -0
  18. package/esm2020/lib/window-title.directive.mjs +57 -0
  19. package/esm2020/lib/window-tool-bar/window-tool-bar.component.mjs +25 -0
  20. package/esm2020/lib/window.service.mjs +163 -0
  21. package/esm2020/rxap-window-system.mjs +5 -0
  22. package/fesm2015/rxap-window-system.mjs +933 -0
  23. package/fesm2015/rxap-window-system.mjs.map +1 -0
  24. package/{fesm2015/rxap-window-system.js → fesm2020/rxap-window-system.mjs} +90 -126
  25. package/fesm2020/rxap-window-system.mjs.map +1 -0
  26. package/package.json +38 -24
  27. package/src/schematics/ng-add/index.js +1 -1
  28. package/src/schematics/ng-add/index.js.map +1 -1
  29. package/bundles/rxap-window-system.umd.js +0 -1384
  30. package/bundles/rxap-window-system.umd.js.map +0 -1
  31. package/esm2015/index.js +0 -17
  32. package/esm2015/index.js.map +0 -1
  33. package/esm2015/lib/default-window/default-window.component.js +0 -18
  34. package/esm2015/lib/default-window/default-window.component.js.map +0 -1
  35. package/esm2015/lib/tokens.js +0 -8
  36. package/esm2015/lib/tokens.js.map +0 -1
  37. package/esm2015/lib/utilities.js +0 -24
  38. package/esm2015/lib/utilities.js.map +0 -1
  39. package/esm2015/lib/window-action-bar/window-action-bar.component.js +0 -32
  40. package/esm2015/lib/window-action-bar/window-action-bar.component.js.map +0 -1
  41. package/esm2015/lib/window-config.js +0 -11
  42. package/esm2015/lib/window-config.js.map +0 -1
  43. package/esm2015/lib/window-container/window-container.component.js +0 -91
  44. package/esm2015/lib/window-container/window-container.component.js.map +0 -1
  45. package/esm2015/lib/window-content/window-content.component.js +0 -79
  46. package/esm2015/lib/window-content/window-content.component.js.map +0 -1
  47. package/esm2015/lib/window-context.js +0 -2
  48. package/esm2015/lib/window-context.js.map +0 -1
  49. package/esm2015/lib/window-footer.directive.js +0 -57
  50. package/esm2015/lib/window-footer.directive.js.map +0 -1
  51. package/esm2015/lib/window-ref.js +0 -157
  52. package/esm2015/lib/window-ref.js.map +0 -1
  53. package/esm2015/lib/window-resizer/window-resizer.component.js +0 -84
  54. package/esm2015/lib/window-resizer/window-resizer.component.js.map +0 -1
  55. package/esm2015/lib/window-system.module.js +0 -95
  56. package/esm2015/lib/window-system.module.js.map +0 -1
  57. package/esm2015/lib/window-task-bar/window-task/window-task.component.js +0 -38
  58. package/esm2015/lib/window-task-bar/window-task/window-task.component.js.map +0 -1
  59. package/esm2015/lib/window-task-bar/window-task-bar-container/window-task-bar-container.component.js +0 -43
  60. package/esm2015/lib/window-task-bar/window-task-bar-container/window-task-bar-container.component.js.map +0 -1
  61. package/esm2015/lib/window-task-bar/window-task-bar.component.js +0 -40
  62. package/esm2015/lib/window-task-bar/window-task-bar.component.js.map +0 -1
  63. package/esm2015/lib/window-task-bar/window-task-bar.module.js +0 -53
  64. package/esm2015/lib/window-task-bar/window-task-bar.module.js.map +0 -1
  65. package/esm2015/lib/window-title.directive.js +0 -57
  66. package/esm2015/lib/window-title.directive.js.map +0 -1
  67. package/esm2015/lib/window-tool-bar/window-tool-bar.component.js +0 -30
  68. package/esm2015/lib/window-tool-bar/window-tool-bar.component.js.map +0 -1
  69. package/esm2015/lib/window.service.js +0 -156
  70. package/esm2015/lib/window.service.js.map +0 -1
  71. package/esm2015/rxap-window-system.js +0 -5
  72. package/esm2015/rxap-window-system.js.map +0 -1
  73. package/fesm2015/rxap-window-system.js.map +0 -1
@@ -1,43 +0,0 @@
1
- import { Component, Inject, InjectionToken, Optional } from '@angular/core';
2
- import { WindowService } from '../../window.service';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@angular/material/button";
5
- import * as i2 from "@angular/material/icon";
6
- import * as i3 from "@angular/material/toolbar";
7
- import * as i4 from "../window-task-bar.component";
8
- import * as i5 from "@angular/common";
9
- import * as i6 from "@angular/flex-layout/flex";
10
- import * as i7 from "@angular/material/badge";
11
- import * as i8 from "@angular/flex-layout/extended";
12
- import * as i9 from "../../window.service";
13
- export const RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS = new InjectionToken('rxap/window-system/task-bar-container');
14
- export class WindowTaskBarContainerComponent {
15
- constructor(windowService, settings = null) {
16
- this.windowService = windowService;
17
- this.expand = true;
18
- if (settings) {
19
- if (settings.expand !== undefined) {
20
- this.expand = settings.expand;
21
- }
22
- }
23
- }
24
- }
25
- WindowTaskBarContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTaskBarContainerComponent, deps: [{ token: WindowService }, { token: RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS, optional: true }], target: i0.ɵɵFactoryTarget.Component });
26
- WindowTaskBarContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: WindowTaskBarContainerComponent, selector: "rxap-window-task-bar-container", ngImport: i0, template: "<div *ngIf=\"windowService.hasActiveWindows\" class=\"container\" fxLayout=\"column\">\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"end 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 <mat-icon *ngIf=\"!expand\">keyboard_arrow_up</mat-icon>\n <mat-icon *ngIf=\"expand\">keyboard_arrow_down</mat-icon>\n </button>\n </div>\n <mat-toolbar [fxShow]=\"expand\" class=\"tasks\">\n <rxap-window-task-bar></rxap-window-task-bar>\n </mat-toolbar>\n</div>\n", styles: [".container .pin{border:none;border-radius:50% 50% 0 0;cursor:pointer}.container .tasks{height:auto;padding:1.6rem}"], components: [{ type: i1.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i4.WindowTaskBarComponent, selector: "rxap-window-task-bar" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i6.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i6.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i7.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgePosition", "matBadgeSize", "matBadgeColor", "matBadgeOverlap", "matBadgeDescription", "matBadgeHidden", "matBadge"] }, { type: i8.DefaultShowHideDirective, selector: " [fxShow], [fxShow.print], [fxShow.xs], [fxShow.sm], [fxShow.md], [fxShow.lg], [fxShow.xl], [fxShow.lt-sm], [fxShow.lt-md], [fxShow.lt-lg], [fxShow.lt-xl], [fxShow.gt-xs], [fxShow.gt-sm], [fxShow.gt-md], [fxShow.gt-lg], [fxHide], [fxHide.print], [fxHide.xs], [fxHide.sm], [fxHide.md], [fxHide.lg], [fxHide.xl], [fxHide.lt-sm], [fxHide.lt-md], [fxHide.lt-lg], [fxHide.lt-xl], [fxHide.gt-xs], [fxHide.gt-sm], [fxHide.gt-md], [fxHide.gt-lg]", inputs: ["fxShow", "fxShow.print", "fxShow.xs", "fxShow.sm", "fxShow.md", "fxShow.lg", "fxShow.xl", "fxShow.lt-sm", "fxShow.lt-md", "fxShow.lt-lg", "fxShow.lt-xl", "fxShow.gt-xs", "fxShow.gt-sm", "fxShow.gt-md", "fxShow.gt-lg", "fxHide", "fxHide.print", "fxHide.xs", "fxHide.sm", "fxHide.md", "fxHide.lg", "fxHide.xl", "fxHide.lt-sm", "fxHide.lt-md", "fxHide.lt-lg", "fxHide.lt-xl", "fxHide.gt-xs", "fxHide.gt-sm", "fxHide.gt-md", "fxHide.gt-lg"] }] });
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTaskBarContainerComponent, decorators: [{
28
- type: Component,
29
- args: [{
30
- selector: 'rxap-window-task-bar-container',
31
- templateUrl: './window-task-bar-container.component.html',
32
- styleUrls: ['./window-task-bar-container.component.scss']
33
- }]
34
- }], ctorParameters: function () { return [{ type: i9.WindowService, decorators: [{
35
- type: Inject,
36
- args: [WindowService]
37
- }] }, { type: undefined, decorators: [{
38
- type: Optional
39
- }, {
40
- type: Inject,
41
- args: [RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS]
42
- }] }]; } });
43
- //# sourceMappingURL=window-task-bar-container.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window-task-bar-container.component.js","sourceRoot":"","sources":["../../../../../../../libs/window-system/src/lib/window-task-bar/window-task-bar-container/window-task-bar-container.component.ts","../../../../../../../libs/window-system/src/lib/window-task-bar/window-task-bar-container/window-task-bar-container.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,cAAc,EACd,QAAQ,EACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;;;;;;;;;;;AAMrD,MAAM,CAAC,MAAM,uCAAuC,GAAG,IAAI,cAAc,CAAC,uCAAuC,CAAC,CAAC;AAOnH,MAAM,OAAO,+BAA+B;IAI1C,YAES,aAA4B,EAGnC,WAAkD,IAAI;QAH/C,kBAAa,GAAb,aAAa,CAAe;QAJ9B,WAAM,GAAG,IAAI,CAAC;QASnB,IAAI,QAAQ,EAAE;YACZ,IAAI,QAAQ,CAAC,MAAM,KAAK,SAAS,EAAE;gBACjC,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAA;aAC9B;SACF;IACH,CAAC;;4HAhBU,+BAA+B,kBAKhC,aAAa,aAGb,uCAAuC;gHARtC,+BAA+B,sECnB5C,mxBAkBA;2FDCa,+BAA+B;kBAL3C,SAAS;mBAAC;oBACT,QAAQ,EAAK,gCAAgC;oBAC7C,WAAW,EAAE,4CAA4C;oBACzD,SAAS,EAAI,CAAE,4CAA4C,CAAE;iBAC9D;;0BAMI,MAAM;2BAAC,aAAa;;0BAEpB,QAAQ;;0BACR,MAAM;2BAAC,uCAAuC","sourcesContent":["import {\n Component,\n Inject,\n InjectionToken,\n Optional\n} from '@angular/core';\nimport { WindowService } from '../../window.service';\n\nexport interface WindowTaskBarContainerSettings {\n expand?: boolean;\n}\n\nexport const RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS = new InjectionToken('rxap/window-system/task-bar-container');\n\n@Component({\n selector: 'rxap-window-task-bar-container',\n templateUrl: './window-task-bar-container.component.html',\n styleUrls: [ './window-task-bar-container.component.scss' ]\n})\nexport class WindowTaskBarContainerComponent {\n\n public expand = true;\n\n constructor(\n @Inject(WindowService)\n public windowService: WindowService,\n @Optional()\n @Inject(RXAP_WINDOW_TASK_BAR_CONTAINER_SETTINGS)\n settings: WindowTaskBarContainerSettings | null = null\n ) {\n if (settings) {\n if (settings.expand !== undefined) {\n this.expand = settings.expand\n }\n }\n }\n\n}\n","<div *ngIf=\"windowService.hasActiveWindows\" class=\"container\" fxLayout=\"column\">\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"end 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 <mat-icon *ngIf=\"!expand\">keyboard_arrow_up</mat-icon>\n <mat-icon *ngIf=\"expand\">keyboard_arrow_down</mat-icon>\n </button>\n </div>\n <mat-toolbar [fxShow]=\"expand\" class=\"tasks\">\n <rxap-window-task-bar></rxap-window-task-bar>\n </mat-toolbar>\n</div>\n"]}
@@ -1,40 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, ChangeDetectorRef, Inject } from '@angular/core';
2
- import { WindowService } from '../window.service';
3
- import { Subscription } from 'rxjs';
4
- import { tap } from 'rxjs/operators';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "./window-task/window-task.component";
7
- import * as i2 from "@angular/flex-layout/flex";
8
- import * as i3 from "@angular/common";
9
- import * as i4 from "../window.service";
10
- export class WindowTaskBarComponent {
11
- constructor(windowService, cdr) {
12
- this.windowService = windowService;
13
- this.cdr = cdr;
14
- this.subscriptions = new Subscription();
15
- }
16
- ngOnInit() {
17
- this.subscriptions.add(this.windowService.activeCount$.pipe(tap(() => this.cdr.markForCheck())).subscribe());
18
- }
19
- ngOnDestroy() {
20
- this.subscriptions.unsubscribe();
21
- }
22
- }
23
- WindowTaskBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTaskBarComponent, deps: [{ token: WindowService }, { token: ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
24
- WindowTaskBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: WindowTaskBarComponent, selector: "rxap-window-task-bar", ngImport: i0, template: "<div class=\"tasks\"\n fxFlex=\"nogrow\"\n fxLayout=\"row wrap\">\n <rxap-window-task *ngFor=\"let window of windowService.allActiveWindows\"\n [window]=\"window\"\n fxFlex=\"nogrow\">\n </rxap-window-task>\n</div>\n", styles: [""], components: [{ type: i1.WindowTaskComponent, selector: "rxap-window-task", inputs: ["window"] }], directives: [{ type: i2.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i2.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i3.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTaskBarComponent, decorators: [{
26
- type: Component,
27
- args: [{
28
- selector: 'rxap-window-task-bar',
29
- templateUrl: './window-task-bar.component.html',
30
- styleUrls: ['./window-task-bar.component.scss'],
31
- changeDetection: ChangeDetectionStrategy.OnPush
32
- }]
33
- }], ctorParameters: function () { return [{ type: i4.WindowService, decorators: [{
34
- type: Inject,
35
- args: [WindowService]
36
- }] }, { type: i0.ChangeDetectorRef, decorators: [{
37
- type: Inject,
38
- args: [ChangeDetectorRef]
39
- }] }]; } });
40
- //# sourceMappingURL=window-task-bar.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window-task-bar.component.js","sourceRoot":"","sources":["../../../../../../libs/window-system/src/lib/window-task-bar/window-task-bar.component.ts","../../../../../../libs/window-system/src/lib/window-task-bar/window-task-bar.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,iBAAiB,EAGjB,MAAM,EACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;;;;;;AAQrC,MAAM,OAAO,sBAAsB;IAIjC,YACgC,aAA4B,EACxB,GAAsB;QAD1B,kBAAa,GAAb,aAAa,CAAe;QACxB,QAAG,GAAH,GAAG,CAAmB;QAJnD,kBAAa,GAAG,IAAI,YAAY,EAAE,CAAC;IAKtC,CAAC;IAEE,QAAQ;QACb,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,IAAI,CACzD,GAAG,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,CACnC,CAAC,SAAS,EAAE,CAAC,CAAC;IACjB,CAAC;IAEM,WAAW;QAChB,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;IACnC,CAAC;;mHAjBU,sBAAsB,kBAKvB,aAAa,aACb,iBAAiB;uGANhB,sBAAsB,4DClBnC,0QAQA;2FDUa,sBAAsB;kBANlC,SAAS;mBAAC;oBACT,QAAQ,EAAS,sBAAsB;oBACvC,WAAW,EAAM,kCAAkC;oBACnD,SAAS,EAAQ,CAAE,kCAAkC,CAAE;oBACvD,eAAe,EAAE,uBAAuB,CAAC,MAAM;iBAChD;;0BAMI,MAAM;2BAAC,aAAa;;0BACpB,MAAM;2BAAC,iBAAiB","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n OnInit,\n OnDestroy,\n Inject\n} from '@angular/core';\nimport { WindowService } from '../window.service';\nimport { Subscription } from 'rxjs';\nimport { tap } from 'rxjs/operators';\n\n@Component({\n selector: 'rxap-window-task-bar',\n templateUrl: './window-task-bar.component.html',\n styleUrls: [ './window-task-bar.component.scss' ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class WindowTaskBarComponent implements OnInit, OnDestroy {\n\n public subscriptions = new Subscription();\n\n constructor(\n @Inject(WindowService) public windowService: WindowService,\n @Inject(ChangeDetectorRef) public cdr: ChangeDetectorRef\n ) { }\n\n public ngOnInit(): void {\n this.subscriptions.add(this.windowService.activeCount$.pipe(\n tap(() => this.cdr.markForCheck())\n ).subscribe());\n }\n\n public ngOnDestroy(): void {\n this.subscriptions.unsubscribe();\n }\n\n}\n","<div class=\"tasks\"\n fxFlex=\"nogrow\"\n fxLayout=\"row wrap\">\n <rxap-window-task *ngFor=\"let window of windowService.allActiveWindows\"\n [window]=\"window\"\n fxFlex=\"nogrow\">\n </rxap-window-task>\n</div>\n"]}
@@ -1,53 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { WindowTaskBarComponent } from './window-task-bar.component';
4
- import { WindowTaskComponent } from './window-task/window-task.component';
5
- import { FlexLayoutModule } from '@angular/flex-layout';
6
- import { MatBadgeModule } from '@angular/material/badge';
7
- import { MatButtonModule } from '@angular/material/button';
8
- import { MatIconModule } from '@angular/material/icon';
9
- import { MatToolbarModule } from '@angular/material/toolbar';
10
- import { WindowTaskBarContainerComponent } from './window-task-bar-container/window-task-bar-container.component';
11
- import { StopPropagationDirectiveModule } from '@rxap/directives';
12
- import { IconDirectiveModule } from '@rxap/material-directives/icon';
13
- import * as i0 from "@angular/core";
14
- export class WindowTaskBarModule {
15
- }
16
- WindowTaskBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTaskBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
17
- WindowTaskBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTaskBarModule, declarations: [WindowTaskBarComponent, WindowTaskComponent, WindowTaskBarContainerComponent], imports: [CommonModule,
18
- FlexLayoutModule,
19
- MatIconModule,
20
- MatToolbarModule,
21
- MatBadgeModule,
22
- MatButtonModule,
23
- StopPropagationDirectiveModule,
24
- IconDirectiveModule], exports: [WindowTaskBarComponent, WindowTaskBarContainerComponent] });
25
- WindowTaskBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTaskBarModule, imports: [[
26
- CommonModule,
27
- FlexLayoutModule,
28
- MatIconModule,
29
- MatToolbarModule,
30
- MatBadgeModule,
31
- MatButtonModule,
32
- StopPropagationDirectiveModule,
33
- IconDirectiveModule
34
- ]] });
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTaskBarModule, decorators: [{
36
- type: NgModule,
37
- args: [{
38
- declarations: [WindowTaskBarComponent, WindowTaskComponent, WindowTaskBarContainerComponent],
39
- imports: [
40
- CommonModule,
41
- FlexLayoutModule,
42
- MatIconModule,
43
- MatToolbarModule,
44
- MatBadgeModule,
45
- MatButtonModule,
46
- StopPropagationDirectiveModule,
47
- IconDirectiveModule
48
- ],
49
- entryComponents: [WindowTaskBarComponent],
50
- exports: [WindowTaskBarComponent, WindowTaskBarContainerComponent]
51
- }]
52
- }] });
53
- //# sourceMappingURL=window-task-bar.module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window-task-bar.module.js","sourceRoot":"","sources":["../../../../../../libs/window-system/src/lib/window-task-bar/window-task-bar.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,+BAA+B,EAAE,MAAM,iEAAiE,CAAC;AAClH,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;;AAiBrE,MAAM,OAAO,mBAAmB;;gHAAnB,mBAAmB;iHAAnB,mBAAmB,iBAdX,sBAAsB,EAAE,mBAAmB,EAAE,+BAA+B,aAE7F,YAAY;QACZ,gBAAgB;QAChB,aAAa;QACb,gBAAgB;QAChB,cAAc;QACd,eAAe;QACf,8BAA8B;QAC9B,mBAAmB,aAGF,sBAAsB,EAAE,+BAA+B;iHAE/D,mBAAmB,YAbrB;YACP,YAAY;YACZ,gBAAgB;YAChB,aAAa;YACb,gBAAgB;YAChB,cAAc;YACd,eAAe;YACf,8BAA8B;YAC9B,mBAAmB;SACpB;2FAIU,mBAAmB;kBAf/B,QAAQ;mBAAC;oBACR,YAAY,EAAK,CAAE,sBAAsB,EAAE,mBAAmB,EAAE,+BAA+B,CAAE;oBACjG,OAAO,EAAE;wBACP,YAAY;wBACZ,gBAAgB;wBAChB,aAAa;wBACb,gBAAgB;wBAChB,cAAc;wBACd,eAAe;wBACf,8BAA8B;wBAC9B,mBAAmB;qBACpB;oBACD,eAAe,EAAE,CAAE,sBAAsB,CAAE;oBAC3C,OAAO,EAAU,CAAE,sBAAsB,EAAE,+BAA+B,CAAE;iBAC7E","sourcesContent":["import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { WindowTaskBarComponent } from './window-task-bar.component';\nimport { WindowTaskComponent } from './window-task/window-task.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MatBadgeModule } from '@angular/material/badge';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatToolbarModule } from '@angular/material/toolbar';\nimport { WindowTaskBarContainerComponent } from './window-task-bar-container/window-task-bar-container.component';\nimport { StopPropagationDirectiveModule } from '@rxap/directives';\nimport { IconDirectiveModule } from '@rxap/material-directives/icon';\n\n@NgModule({\n declarations: [ WindowTaskBarComponent, WindowTaskComponent, WindowTaskBarContainerComponent ],\n imports: [\n CommonModule,\n FlexLayoutModule,\n MatIconModule,\n MatToolbarModule,\n MatBadgeModule,\n MatButtonModule,\n StopPropagationDirectiveModule,\n IconDirectiveModule\n ],\n entryComponents: [ WindowTaskBarComponent ],\n exports: [ WindowTaskBarComponent, WindowTaskBarContainerComponent ]\n})\nexport class WindowTaskBarModule {}\n"]}
@@ -1,57 +0,0 @@
1
- import { Directive, Inject, TemplateRef, NgModule, ViewContainerRef } from '@angular/core';
2
- import { WindowRef } from './window-ref';
3
- import { RXAP_WINDOW_REF } from './tokens';
4
- import { TemplatePortal } from '@angular/cdk/portal';
5
- import * as i0 from "@angular/core";
6
- import * as i1 from "./window-ref";
7
- export class WindowTitleDirective {
8
- constructor(windowRef, template, viewContainerRef) {
9
- this.windowRef = windowRef;
10
- this.template = template;
11
- this.viewContainerRef = viewContainerRef;
12
- }
13
- /**
14
- * Asserts the correct type of the context for the template that `NgForOf` will render.
15
- *
16
- * The presence of this method is a signal to the Ivy template type-check compiler that the
17
- * `NgForOf` structural directive renders its template with a specific context type.
18
- */
19
- static ngTemplateContextGuard(dir, ctx) {
20
- return true;
21
- }
22
- ngOnInit() {
23
- this.windowRef.setTitlePortal(new TemplatePortal(this.template, this.viewContainerRef, {
24
- $implicit: this.windowRef
25
- }));
26
- }
27
- }
28
- WindowTitleDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTitleDirective, deps: [{ token: RXAP_WINDOW_REF }, { token: TemplateRef }, { token: ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
29
- WindowTitleDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.0.1", type: WindowTitleDirective, selector: "[rxapWindowTitle]", ngImport: i0 });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTitleDirective, decorators: [{
31
- type: Directive,
32
- args: [{
33
- selector: '[rxapWindowTitle]'
34
- }]
35
- }], ctorParameters: function () { return [{ type: i1.WindowRef, decorators: [{
36
- type: Inject,
37
- args: [RXAP_WINDOW_REF]
38
- }] }, { type: i0.TemplateRef, decorators: [{
39
- type: Inject,
40
- args: [TemplateRef]
41
- }] }, { type: i0.ViewContainerRef, decorators: [{
42
- type: Inject,
43
- args: [ViewContainerRef]
44
- }] }]; } });
45
- export class WindowTitleDirectiveModule {
46
- }
47
- WindowTitleDirectiveModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTitleDirectiveModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
48
- WindowTitleDirectiveModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTitleDirectiveModule, declarations: [WindowTitleDirective], exports: [WindowTitleDirective] });
49
- WindowTitleDirectiveModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTitleDirectiveModule });
50
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowTitleDirectiveModule, decorators: [{
51
- type: NgModule,
52
- args: [{
53
- declarations: [WindowTitleDirective],
54
- exports: [WindowTitleDirective]
55
- }]
56
- }] });
57
- //# sourceMappingURL=window-title.directive.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window-title.directive.js","sourceRoot":"","sources":["../../../../../libs/window-system/src/lib/window-title.directive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,MAAM,EACN,WAAW,EAEX,QAAQ,EACR,gBAAgB,EACjB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;;;AASrD,MAAM,OAAO,oBAAoB;IAa/B,YAEmB,SAAoB,EAEpB,QAAiD,EAEjD,gBAAkC;QAJlC,cAAS,GAAT,SAAS,CAAW;QAEpB,aAAQ,GAAR,QAAQ,CAAyC;QAEjD,qBAAgB,GAAhB,gBAAgB,CAAkB;IACjD,CAAC;IAlBL;;;;;OAKG;IACH,MAAM,CAAC,sBAAsB,CAAC,GAAyB,EAAE,GAAQ;QAE/D,OAAO,IAAI,CAAC;IACd,CAAC;IAWM,QAAQ;QACb,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,cAAc,CAC9C,IAAI,CAAC,QAAQ,EACb,IAAI,CAAC,gBAAgB,EACrB;YACE,SAAS,EAAE,IAAI,CAAC,SAAS;SAC1B,CACF,CAAC,CAAC;IACL,CAAC;;iHA9BU,oBAAoB,kBAcrB,eAAe,aAEf,WAAW,aAEX,gBAAgB;qGAlBf,oBAAoB;2FAApB,oBAAoB;kBAHhC,SAAS;mBAAC;oBACT,QAAQ,EAAE,mBAAmB;iBAC9B;;0BAeI,MAAM;2BAAC,eAAe;;0BAEtB,MAAM;2BAAC,WAAW;;0BAElB,MAAM;2BAAC,gBAAgB;;AAoB5B,MAAM,OAAO,0BAA0B;;uHAA1B,0BAA0B;wHAA1B,0BAA0B,iBAtC1B,oBAAoB,aAApB,oBAAoB;wHAsCpB,0BAA0B;2FAA1B,0BAA0B;kBAJtC,QAAQ;mBAAC;oBACR,YAAY,EAAE,CAAE,oBAAoB,CAAE;oBACtC,OAAO,EAAO,CAAE,oBAAoB,CAAE;iBACvC","sourcesContent":["import {\n Directive,\n Inject,\n TemplateRef,\n OnInit,\n NgModule,\n ViewContainerRef\n} from '@angular/core';\nimport { WindowRef } from './window-ref';\nimport { RXAP_WINDOW_REF } from './tokens';\nimport { TemplatePortal } from '@angular/cdk/portal';\n\nexport interface WindowTitleTemplateContext {\n $implicit: WindowRef;\n}\n\n@Directive({\n selector: '[rxapWindowTitle]'\n})\nexport class WindowTitleDirective implements OnInit {\n\n /**\n * Asserts the correct type of the context for the template that `NgForOf` will render.\n *\n * The presence of this method is a signal to the Ivy template type-check compiler that the\n * `NgForOf` structural directive renders its template with a specific context type.\n */\n static ngTemplateContextGuard(dir: WindowTitleDirective, ctx: any):\n ctx is WindowTitleTemplateContext {\n return true;\n }\n\n constructor(\n @Inject(RXAP_WINDOW_REF)\n private readonly windowRef: WindowRef,\n @Inject(TemplateRef)\n private readonly template: TemplateRef<WindowTitleTemplateContext>,\n @Inject(ViewContainerRef)\n private readonly viewContainerRef: ViewContainerRef\n ) { }\n\n public ngOnInit() {\n this.windowRef.setTitlePortal(new TemplatePortal<WindowTitleTemplateContext>(\n this.template,\n this.viewContainerRef,\n {\n $implicit: this.windowRef\n }\n ));\n }\n\n}\n\n@NgModule({\n declarations: [ WindowTitleDirective ],\n exports: [ WindowTitleDirective ]\n})\nexport class WindowTitleDirectiveModule {}\n"]}
@@ -1,30 +0,0 @@
1
- import { Component, ChangeDetectionStrategy, Inject } from '@angular/core';
2
- import { RXAP_WINDOW_CONTEXT } from '../tokens';
3
- import * as i0 from "@angular/core";
4
- import * as i1 from "@angular/material/toolbar";
5
- import * as i2 from "@angular/material/icon";
6
- import * as i3 from "@angular/material/button";
7
- import * as i4 from "@angular/flex-layout/flex";
8
- import * as i5 from "@angular/common";
9
- import * as i6 from "@angular/cdk/portal";
10
- import * as i7 from "@rxap/material-directives/icon";
11
- export class WindowToolBarComponent {
12
- constructor(context) {
13
- this.windowRef = context.windowRef;
14
- }
15
- }
16
- WindowToolBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowToolBarComponent, deps: [{ token: RXAP_WINDOW_CONTEXT }], target: i0.ɵɵFactoryTarget.Component });
17
- WindowToolBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.1", type: WindowToolBarComponent, selector: "rxap-window-tool-bar", ngImport: i0, template: "<mat-toolbar class=\"header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"1.5rem\">\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"1.0rem\">\n <ng-template [ngIf]=\"windowRef.titlePortal$ | async\" [ngIfElse]=\"titleFromSettings\" let-titlePortal>\n <ng-template [cdkPortalOutlet]=\"titlePortal\"></ng-template>\n </ng-template>\n <ng-template #titleFromSettings>\n <ng-template [ngIf]=\"windowRef.settings$ | async\" let-settings>\n <mat-icon *ngIf=\"settings.icon\" [rxapIcon]=\"settings.icon\" fxFlex=\"40px\"></mat-icon>\n <h3 *ngIf=\"settings.title\" fxFlex=\"nogrow\">{{settings.title}}</h3>\n </ng-template>\n </ng-template>\n </div>\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <button (click)=\"windowRef.minimize()\" *ngIf=\"windowRef.settings.minimizable !== false\" fxFlex=\"40px\" mat-icon-button type=\"button\">\n <mat-icon>minimize</mat-icon>\n </button>\n <button (click)=\"windowRef.fullScreen()\" fxFlex=\"40px\" mat-icon-button type=\"button\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button (click)=\"windowRef.complete()\" fxFlex=\"40px\" mat-icon-button type=\"button\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n</mat-toolbar>\n", styles: [":host{width:100%}.header{height:64px}"], components: [{ type: i1.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i4.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i4.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i6.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { type: i7.IconDirective, selector: "mat-icon[rxapIcon]", inputs: ["rxapIcon"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.Default });
18
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowToolBarComponent, decorators: [{
19
- type: Component,
20
- args: [{
21
- selector: 'rxap-window-tool-bar',
22
- templateUrl: './window-tool-bar.component.html',
23
- styleUrls: ['./window-tool-bar.component.scss'],
24
- changeDetection: ChangeDetectionStrategy.Default
25
- }]
26
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
27
- type: Inject,
28
- args: [RXAP_WINDOW_CONTEXT]
29
- }] }]; } });
30
- //# sourceMappingURL=window-tool-bar.component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window-tool-bar.component.js","sourceRoot":"","sources":["../../../../../../libs/window-system/src/lib/window-tool-bar/window-tool-bar.component.ts","../../../../../../libs/window-system/src/lib/window-tool-bar/window-tool-bar.component.html"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,uBAAuB,EACvB,MAAM,EACP,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;;;;;;;;;AAQhD,MAAM,OAAO,sBAAsB;IAIjC,YAAyC,OAAY;QACnD,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;IACrC,CAAC;;mHANU,sBAAsB,kBAIb,mBAAmB;uGAJ5B,sBAAsB,4DCdnC,m0CAwBA;2FDVa,sBAAsB;kBANlC,SAAS;mBAAC;oBACT,QAAQ,EAAS,sBAAsB;oBACvC,WAAW,EAAM,kCAAkC;oBACnD,SAAS,EAAQ,CAAE,kCAAkC,CAAE;oBACvD,eAAe,EAAE,uBAAuB,CAAC,OAAO;iBACjD;;0BAKc,MAAM;2BAAC,mBAAmB","sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n Inject\n} from '@angular/core';\nimport { WindowRef } from '../window-ref';\nimport { RXAP_WINDOW_CONTEXT } from '../tokens';\n\n@Component({\n selector: 'rxap-window-tool-bar',\n templateUrl: './window-tool-bar.component.html',\n styleUrls: [ './window-tool-bar.component.scss' ],\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class WindowToolBarComponent<D> {\n\n public windowRef: WindowRef<D>;\n\n constructor(@Inject(RXAP_WINDOW_CONTEXT) context: any) {\n this.windowRef = context.windowRef;\n }\n\n}\n","<mat-toolbar class=\"header\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxLayoutGap=\"1.5rem\">\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"1.0rem\">\n <ng-template [ngIf]=\"windowRef.titlePortal$ | async\" [ngIfElse]=\"titleFromSettings\" let-titlePortal>\n <ng-template [cdkPortalOutlet]=\"titlePortal\"></ng-template>\n </ng-template>\n <ng-template #titleFromSettings>\n <ng-template [ngIf]=\"windowRef.settings$ | async\" let-settings>\n <mat-icon *ngIf=\"settings.icon\" [rxapIcon]=\"settings.icon\" fxFlex=\"40px\"></mat-icon>\n <h3 *ngIf=\"settings.title\" fxFlex=\"nogrow\">{{settings.title}}</h3>\n </ng-template>\n </ng-template>\n </div>\n <div fxFlex=\"nogrow\" fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <button (click)=\"windowRef.minimize()\" *ngIf=\"windowRef.settings.minimizable !== false\" fxFlex=\"40px\" mat-icon-button type=\"button\">\n <mat-icon>minimize</mat-icon>\n </button>\n <button (click)=\"windowRef.fullScreen()\" fxFlex=\"40px\" mat-icon-button type=\"button\">\n <mat-icon>fullscreen</mat-icon>\n </button>\n <button (click)=\"windowRef.complete()\" fxFlex=\"40px\" mat-icon-button type=\"button\">\n <mat-icon>close</mat-icon>\n </button>\n </div>\n</mat-toolbar>\n"]}
@@ -1,156 +0,0 @@
1
- import { Injectable, Injector, ComponentFactoryResolver, Inject, ViewContainerRef, InjectFlags, Optional, } from '@angular/core';
2
- import { DEFAULT_WINDOW_CONFIG, } from './window-config';
3
- import { OverlayConfig, Overlay } from '@angular/cdk/overlay';
4
- import { ComponentPortal } from '@angular/cdk/portal';
5
- import { WindowRef } from './window-ref';
6
- import { RXAP_WINDOW_CONTEXT, RXAP_WINDOW_CONTAINER_CONTEXT, RXAP_WINDOW_REF, RXAP_WINDOW_DEFAULT_SETTINGS, RXAP_WINDOW_DATA, } from './tokens';
7
- import { tap, take, finalize } from 'rxjs/operators';
8
- import { DefaultWindowComponent } from './default-window/default-window.component';
9
- import { v4 as uuid } from 'uuid';
10
- import { GetWindowStartPos } from './utilities';
11
- import { Subject } from 'rxjs';
12
- import { LoadingIndicatorService } from '@rxap/services';
13
- import * as i0 from "@angular/core";
14
- import * as i1 from "@angular/cdk/overlay";
15
- export class WindowService {
16
- constructor(injector, overlay, componentFactoryResolver, defaultWindowSettings) {
17
- this.injector = injector;
18
- this.overlay = overlay;
19
- this.componentFactoryResolver = componentFactoryResolver;
20
- this.defaultWindowSettings = defaultWindowSettings;
21
- this.activeCount$ = new Subject();
22
- this.active = new Map();
23
- }
24
- get hasActiveWindows() {
25
- return this.active.size !== 0;
26
- }
27
- get activeWindowCount() {
28
- return this.active.size;
29
- }
30
- get allActiveWindows() {
31
- return Array.from(this.active.values());
32
- }
33
- get(id) {
34
- if (!this.has(id)) {
35
- throw new Error(`Active Window with id '${id}' not found`);
36
- }
37
- // tslint:disable-next-line:no-non-null-assertion
38
- return this.active.get(id);
39
- }
40
- close(id) {
41
- const windowRef = this.get(id);
42
- windowRef.complete();
43
- }
44
- has(id) {
45
- return this.active.has(id);
46
- }
47
- open(config) {
48
- var _a, _b, _c, _d, _e, _f, _g;
49
- // Override default configuration
50
- const windowConfig = Object.assign(Object.assign(Object.assign({ id: uuid() }, DEFAULT_WINDOW_CONFIG), ((_a = this.defaultWindowSettings) !== null && _a !== void 0 ? _a : {})), config);
51
- if (this.has(windowConfig.id)) {
52
- return this.get(windowConfig.id);
53
- }
54
- // Returns an OverlayRef which is a PortalHost
55
- const overlayRef = this.createOverlay(windowConfig);
56
- // Instantiate remote control
57
- const windowRef = new WindowRef(overlayRef, this.overlay, windowConfig);
58
- const context = {
59
- id: windowConfig.id,
60
- overlayRef,
61
- windowRef,
62
- data: windowConfig.data,
63
- };
64
- const containerContext = {
65
- template: windowConfig.template,
66
- component: windowConfig.component,
67
- };
68
- const injector = Injector.create({
69
- parent: (_b = windowConfig.injector) !== null && _b !== void 0 ? _b : this.injector,
70
- providers: [
71
- {
72
- provide: RXAP_WINDOW_CONTAINER_CONTEXT,
73
- useValue: containerContext,
74
- },
75
- {
76
- provide: RXAP_WINDOW_CONTEXT,
77
- useValue: context,
78
- },
79
- {
80
- provide: RXAP_WINDOW_DATA,
81
- useValue: windowConfig.data,
82
- },
83
- {
84
- provide: RXAP_WINDOW_REF,
85
- useValue: windowRef,
86
- },
87
- {
88
- provide: LoadingIndicatorService,
89
- useClass: LoadingIndicatorService,
90
- },
91
- ],
92
- name: (_c = windowConfig === null || windowConfig === void 0 ? void 0 : windowConfig.injectorName) !== null && _c !== void 0 ? _c : 'WindowService',
93
- });
94
- const containerPortal = new ComponentPortal(DefaultWindowComponent, (_e = (_d = injector.get(ViewContainerRef, null, InjectFlags.Optional)) !== null && _d !== void 0 ? _d : windowConfig.viewContainerRef) !== null && _e !== void 0 ? _e : null, injector, (_g = (_f = injector.get(ComponentFactoryResolver, null, InjectFlags.Optional)) !== null && _f !== void 0 ? _f : windowConfig.componentFactoryResolver) !== null && _g !== void 0 ? _g : this.componentFactoryResolver);
95
- overlayRef.attach(containerPortal);
96
- overlayRef
97
- .backdropClick()
98
- .pipe(take(1), tap(() => windowRef.complete()))
99
- .subscribe();
100
- windowRef.pipe(finalize(() => this.remove(windowConfig.id))).subscribe();
101
- this.add(windowRef);
102
- return windowRef;
103
- }
104
- remove(id) {
105
- const result = this.active.delete(id);
106
- this.activeCount$.next(this.active.size);
107
- return result;
108
- }
109
- add(windowRef) {
110
- this.active.set(windowRef.settings.id, windowRef);
111
- this.activeCount$.next(this.active.size);
112
- }
113
- createOverlay({ panelClass, width, height, minHeight, minWidth, maxHeight, maxWidth, }) {
114
- var _a, _b, _c, _d, _e, _f, _g, _h;
115
- const startPos = GetWindowStartPos();
116
- const positionStrategy = this.overlay
117
- .position()
118
- .global()
119
- .top(startPos.top)
120
- .left(startPos.left);
121
- const overlayConfig = new OverlayConfig({
122
- hasBackdrop: false,
123
- panelClass,
124
- scrollStrategy: this.overlay.scrollStrategies.block(),
125
- width,
126
- height,
127
- maxWidth: (_b = maxWidth !== null && maxWidth !== void 0 ? maxWidth : (_a = this.defaultWindowSettings) === null || _a === void 0 ? void 0 : _a.maxWidth) !== null && _b !== void 0 ? _b : '100vw',
128
- maxHeight: (_d = maxHeight !== null && maxHeight !== void 0 ? maxHeight : (_c = this.defaultWindowSettings) === null || _c === void 0 ? void 0 : _c.maxHeight) !== null && _d !== void 0 ? _d : '100vh',
129
- minWidth: (_f = minWidth !== null && minWidth !== void 0 ? minWidth : (_e = this.defaultWindowSettings) === null || _e === void 0 ? void 0 : _e.minWidth) !== null && _f !== void 0 ? _f : '384px',
130
- minHeight: (_h = minHeight !== null && minHeight !== void 0 ? minHeight : (_g = this.defaultWindowSettings) === null || _g === void 0 ? void 0 : _g.minHeight) !== null && _h !== void 0 ? _h : '192px',
131
- positionStrategy,
132
- });
133
- return this.overlay.create(overlayConfig);
134
- }
135
- }
136
- WindowService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowService, deps: [{ token: Injector }, { token: Overlay }, { token: ComponentFactoryResolver }, { token: RXAP_WINDOW_DEFAULT_SETTINGS, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
137
- WindowService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowService, providedIn: 'root' });
138
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.1", ngImport: i0, type: WindowService, decorators: [{
139
- type: Injectable,
140
- args: [{ providedIn: 'root' }]
141
- }], ctorParameters: function () { return [{ type: i0.Injector, decorators: [{
142
- type: Inject,
143
- args: [Injector]
144
- }] }, { type: i1.Overlay, decorators: [{
145
- type: Inject,
146
- args: [Overlay]
147
- }] }, { type: i0.ComponentFactoryResolver, decorators: [{
148
- type: Inject,
149
- args: [ComponentFactoryResolver]
150
- }] }, { type: undefined, decorators: [{
151
- type: Optional
152
- }, {
153
- type: Inject,
154
- args: [RXAP_WINDOW_DEFAULT_SETTINGS]
155
- }] }]; } });
156
- //# sourceMappingURL=window.service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"window.service.js","sourceRoot":"","sources":["../../../../../libs/window-system/src/lib/window.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,wBAAwB,EACxB,MAAM,EACN,gBAAgB,EAChB,WAAW,EACX,QAAQ,GACT,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,qBAAq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AAI,CAAC,qBAAqB,0CAAE,QAAQ,mCAAI,OAAO;YACrE,SAAS,EAAE,MAAA,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,MAAA,IAAI,CAAC,qBAAqB,0CAAE,SAAS,mCAAI,OAAO;YACxE,QAAQ,EAAE,MAAA,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,MAAA,IAAI,CAAC,qBAAqB,0CAAE,QAAQ,mCAAI,OAAO;YACrE,SAAS,EAAE,MAAA,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,MAAA,IAAI,CAAC,qBAAqB,0CAAE,SAAS,mCAAI,OAAO;YACxE,gBAAgB;SACjB,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;IAC5C,CAAC;;0GA3KU,aAAa,kBAiBd,QAAQ,aACR,OAAO,aACP,wBAAwB,aAGxB,4BAA4B;8GAtB3B,aAAa,cADA,MAAM;2FACnB,aAAa;kBADzB,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;0BAkB7B,MAAM;2BAAC,QAAQ;;0BACf,MAAM;2BAAC,OAAO;;0BACd,MAAM;2BAAC,wBAAwB;;0BAE/B,QAAQ;;0BACR,MAAM;2BAAC,4BAA4B","sourcesContent":["import {\n Injectable,\n Injector,\n ComponentFactoryResolver,\n Inject,\n ViewContainerRef,\n InjectFlags,\n Optional,\n} from '@angular/core';\nimport {\n WindowConfig,\n DEFAULT_WINDOW_CONFIG,\n WindowSettings,\n} from './window-config';\nimport { OverlayConfig, Overlay } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { WindowRef } from './window-ref';\nimport {\n RXAP_WINDOW_CONTEXT,\n RXAP_WINDOW_CONTAINER_CONTEXT,\n RXAP_WINDOW_REF,\n RXAP_WINDOW_DEFAULT_SETTINGS,\n RXAP_WINDOW_DATA,\n} from './tokens';\nimport { WindowContext, WindowContainerContext } from './window-context';\nimport { tap, take, finalize } from 'rxjs/operators';\nimport { DefaultWindowComponent } from './default-window/default-window.component';\nimport { v4 as uuid } from 'uuid';\nimport { GetWindowStartPos } from './utilities';\nimport { Subject } from 'rxjs';\nimport { LoadingIndicatorService } from '@rxap/services';\n\n@Injectable({ providedIn: 'root' })\nexport class WindowService {\n public get hasActiveWindows(): boolean {\n return this.active.size !== 0;\n }\n\n public get activeWindowCount(): number {\n return this.active.size;\n }\n\n public get allActiveWindows(): Array<WindowRef<any>> {\n return Array.from(this.active.values());\n }\n\n public readonly activeCount$ = new Subject<number>();\n private readonly active = new Map<string, WindowRef<any>>();\n\n constructor(\n @Inject(Injector) private readonly injector: Injector,\n @Inject(Overlay) private readonly overlay: Overlay,\n @Inject(ComponentFactoryResolver)\n private readonly componentFactoryResolver: ComponentFactoryResolver,\n @Optional()\n @Inject(RXAP_WINDOW_DEFAULT_SETTINGS)\n private readonly defaultWindowSettings?: WindowSettings\n ) {}\n\n public get<D>(id: string): WindowRef<D> {\n if (!this.has(id)) {\n throw new Error(`Active Window with id '${id}' not found`);\n }\n // tslint:disable-next-line:no-non-null-assertion\n return this.active.get(id)!;\n }\n\n public close(id: string): void {\n const windowRef = this.get(id);\n windowRef.complete();\n }\n\n public has(id: string): boolean {\n return this.active.has(id);\n }\n\n public open<D, T>(config: WindowConfig<D, T>): WindowRef<D> {\n // Override default configuration\n const windowConfig = {\n id: uuid(),\n ...DEFAULT_WINDOW_CONFIG,\n ...(this.defaultWindowSettings ?? {}),\n ...config,\n };\n\n if (this.has(windowConfig.id)) {\n return this.get(windowConfig.id);\n }\n\n // Returns an OverlayRef which is a PortalHost\n const overlayRef = this.createOverlay(windowConfig);\n\n // Instantiate remote control\n const windowRef = new WindowRef<D>(overlayRef, this.overlay, windowConfig);\n\n const context: WindowContext<any> = {\n id: windowConfig.id,\n overlayRef,\n windowRef,\n data: windowConfig.data,\n };\n\n const containerContext: WindowContainerContext<any> = {\n template: windowConfig.template,\n component: windowConfig.component,\n };\n\n const injector = Injector.create({\n parent: windowConfig.injector ?? this.injector,\n providers: [\n {\n provide: RXAP_WINDOW_CONTAINER_CONTEXT,\n useValue: containerContext,\n },\n {\n provide: RXAP_WINDOW_CONTEXT,\n useValue: context,\n },\n {\n provide: RXAP_WINDOW_DATA,\n useValue: windowConfig.data,\n },\n {\n provide: RXAP_WINDOW_REF,\n useValue: windowRef,\n },\n {\n provide: LoadingIndicatorService,\n useClass: LoadingIndicatorService,\n },\n ],\n name: windowConfig?.injectorName ?? 'WindowService',\n });\n\n const containerPortal = new ComponentPortal(\n DefaultWindowComponent,\n injector.get(ViewContainerRef, null, InjectFlags.Optional) ??\n windowConfig.viewContainerRef ??\n null,\n injector,\n injector.get(ComponentFactoryResolver, null, InjectFlags.Optional) ??\n windowConfig.componentFactoryResolver ??\n this.componentFactoryResolver\n );\n\n overlayRef.attach(containerPortal);\n\n overlayRef\n .backdropClick()\n .pipe(\n take(1),\n tap(() => windowRef.complete())\n )\n .subscribe();\n\n windowRef.pipe(finalize(() => this.remove(windowConfig.id))).subscribe();\n\n this.add(windowRef);\n\n return windowRef;\n }\n\n public remove(id: string) {\n const result = this.active.delete(id);\n this.activeCount$.next(this.active.size);\n return result;\n }\n\n public add(windowRef: WindowRef<any>): void {\n this.active.set(windowRef.settings.id!, windowRef);\n this.activeCount$.next(this.active.size);\n }\n\n private createOverlay({\n panelClass,\n width,\n height,\n minHeight,\n minWidth,\n maxHeight,\n maxWidth,\n }: OverlayConfig) {\n const startPos = GetWindowStartPos();\n\n const positionStrategy = this.overlay\n .position()\n .global()\n .top(startPos.top)\n .left(startPos.left);\n\n const overlayConfig = new OverlayConfig({\n hasBackdrop: false,\n panelClass,\n scrollStrategy: this.overlay.scrollStrategies.block(),\n width,\n height,\n maxWidth: maxWidth ?? this.defaultWindowSettings?.maxWidth ?? '100vw',\n maxHeight: maxHeight ?? this.defaultWindowSettings?.maxHeight ?? '100vh',\n minWidth: minWidth ?? this.defaultWindowSettings?.minWidth ?? '384px',\n minHeight: minHeight ?? this.defaultWindowSettings?.minHeight ?? '192px',\n positionStrategy,\n });\n\n return this.overlay.create(overlayConfig);\n }\n}\n"]}
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './index';
5
- //# sourceMappingURL=rxap-window-system.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rxap-window-system.js","sourceRoot":"","sources":["../../../../libs/window-system/src/rxap-window-system.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,SAAS,CAAC","sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"]}