@memberjunction/ng-ui-components 0.0.1 → 5.24.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/dist/lib/accordion/accordion.component.d.ts +58 -0
- package/dist/lib/accordion/accordion.component.d.ts.map +1 -0
- package/dist/lib/accordion/accordion.component.js +163 -0
- package/dist/lib/accordion/accordion.component.js.map +1 -0
- package/dist/lib/accordion/accordion.scss +45 -0
- package/dist/lib/button/button.directive.d.ts +45 -0
- package/dist/lib/button/button.directive.d.ts.map +1 -0
- package/dist/lib/button/button.directive.js +114 -0
- package/dist/lib/button/button.directive.js.map +1 -0
- package/dist/lib/button/button.scss +250 -0
- package/dist/lib/calendar/calendar-utils.d.ts +16 -0
- package/dist/lib/calendar/calendar-utils.d.ts.map +1 -0
- package/dist/lib/calendar/calendar-utils.js +41 -0
- package/dist/lib/calendar/calendar-utils.js.map +1 -0
- package/dist/lib/combobox/combobox.component.d.ts +83 -0
- package/dist/lib/combobox/combobox.component.d.ts.map +1 -0
- package/dist/lib/combobox/combobox.component.js +483 -0
- package/dist/lib/combobox/combobox.component.js.map +1 -0
- package/dist/lib/combobox/combobox.scss +86 -0
- package/dist/lib/datepicker/datepicker.component.d.ts +50 -0
- package/dist/lib/datepicker/datepicker.component.d.ts.map +1 -0
- package/dist/lib/datepicker/datepicker.component.js +279 -0
- package/dist/lib/datepicker/datepicker.component.js.map +1 -0
- package/dist/lib/datepicker/datepicker.scss +60 -0
- package/dist/lib/dialog/dialog.component.d.ts +84 -0
- package/dist/lib/dialog/dialog.component.d.ts.map +1 -0
- package/dist/lib/dialog/dialog.component.js +285 -0
- package/dist/lib/dialog/dialog.component.js.map +1 -0
- package/dist/lib/dialog/dialog.scss +134 -0
- package/dist/lib/dialog/dialog.service.d.ts +114 -0
- package/dist/lib/dialog/dialog.service.d.ts.map +1 -0
- package/dist/lib/dialog/dialog.service.js +282 -0
- package/dist/lib/dialog/dialog.service.js.map +1 -0
- package/dist/lib/dropdown/dropdown.component.d.ts +75 -0
- package/dist/lib/dropdown/dropdown.component.d.ts.map +1 -0
- package/dist/lib/dropdown/dropdown.component.js +445 -0
- package/dist/lib/dropdown/dropdown.component.js.map +1 -0
- package/dist/lib/dropdown/dropdown.scss +68 -0
- package/dist/lib/input/chip.scss +64 -0
- package/dist/lib/input/input-switch-progress.scss +57 -0
- package/dist/lib/input/input.scss +77 -0
- package/dist/lib/numeric-input/numeric-input.component.d.ts +31 -0
- package/dist/lib/numeric-input/numeric-input.component.d.ts.map +1 -0
- package/dist/lib/numeric-input/numeric-input.component.js +103 -0
- package/dist/lib/numeric-input/numeric-input.component.js.map +1 -0
- package/dist/lib/progress-bar/progress-bar.component.d.ts +14 -0
- package/dist/lib/progress-bar/progress-bar.component.d.ts.map +1 -0
- package/dist/lib/progress-bar/progress-bar.component.js +62 -0
- package/dist/lib/progress-bar/progress-bar.component.js.map +1 -0
- package/dist/lib/splitter/splitter.component.d.ts +23 -0
- package/dist/lib/splitter/splitter.component.d.ts.map +1 -0
- package/dist/lib/splitter/splitter.component.js +24 -0
- package/dist/lib/splitter/splitter.component.js.map +1 -0
- package/dist/lib/splitter/splitter.scss +29 -0
- package/dist/lib/switch/switch.component.d.ts +24 -0
- package/dist/lib/switch/switch.component.d.ts.map +1 -0
- package/dist/lib/switch/switch.component.js +82 -0
- package/dist/lib/switch/switch.component.js.map +1 -0
- package/dist/lib/window/window.component.d.ts +115 -0
- package/dist/lib/window/window.component.d.ts.map +1 -0
- package/dist/lib/window/window.component.js +502 -0
- package/dist/lib/window/window.component.js.map +1 -0
- package/dist/lib/window/window.scss +97 -0
- package/dist/public-api.d.ts +14 -0
- package/dist/public-api.d.ts.map +1 -0
- package/dist/public-api.js +16 -0
- package/dist/public-api.js.map +1 -0
- package/package.json +39 -6
- package/README.md +0 -45
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* mj-window — Floating window panel. Replaces `<kendo-window>`.
|
|
5
|
+
*
|
|
6
|
+
* Unlike mj-dialog, this does NOT have a backdrop and does NOT block interaction
|
|
7
|
+
* with the rest of the page. It's a floating panel, similar to Kendo's Window.
|
|
8
|
+
*
|
|
9
|
+
* Supports dragging (via titlebar), resizing (via edges/corners), minimize, and maximize.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <mj-window [Visible]="showWindow" Title="Details" [Width]="600" [Height]="400"
|
|
14
|
+
* [Draggable]="true" [Resizable]="true" (Close)="onClose()"
|
|
15
|
+
* (StateChange)="onStateChange($event)">
|
|
16
|
+
* <p>Window content</p>
|
|
17
|
+
* </mj-window>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare class MJWindowComponent implements OnDestroy {
|
|
21
|
+
private _visible;
|
|
22
|
+
private static nextId;
|
|
23
|
+
set Visible(value: boolean);
|
|
24
|
+
get Visible(): boolean;
|
|
25
|
+
Title: string;
|
|
26
|
+
set Width(value: number | string | null);
|
|
27
|
+
get Width(): number | string | null;
|
|
28
|
+
set Height(value: number | string | null);
|
|
29
|
+
get Height(): number | string | null;
|
|
30
|
+
set Top(value: number | null);
|
|
31
|
+
get Top(): number | null;
|
|
32
|
+
set Left(value: number | null);
|
|
33
|
+
get Left(): number | null;
|
|
34
|
+
MinWidth: number | null;
|
|
35
|
+
MinHeight: number | null;
|
|
36
|
+
Draggable: boolean;
|
|
37
|
+
Resizable: boolean;
|
|
38
|
+
/** Window state: 'default' or 'maximized'. */
|
|
39
|
+
set State(value: 'default' | 'maximized');
|
|
40
|
+
get State(): 'default' | 'maximized';
|
|
41
|
+
Close: EventEmitter<void>;
|
|
42
|
+
StateChange: EventEmitter<"default" | "maximized">;
|
|
43
|
+
Resize: EventEmitter<void>;
|
|
44
|
+
WindowId: number;
|
|
45
|
+
private _state;
|
|
46
|
+
private _width;
|
|
47
|
+
private _height;
|
|
48
|
+
private currentTop;
|
|
49
|
+
private currentLeft;
|
|
50
|
+
private currentWidth;
|
|
51
|
+
private currentHeight;
|
|
52
|
+
private savedTop;
|
|
53
|
+
private savedLeft;
|
|
54
|
+
private savedWidth;
|
|
55
|
+
private savedHeight;
|
|
56
|
+
private isDragging;
|
|
57
|
+
private dragStartX;
|
|
58
|
+
private dragStartY;
|
|
59
|
+
private dragStartTop;
|
|
60
|
+
private dragStartLeft;
|
|
61
|
+
private isResizing;
|
|
62
|
+
private resizeDirection;
|
|
63
|
+
private resizeStartX;
|
|
64
|
+
private resizeStartY;
|
|
65
|
+
private resizeStartWidth;
|
|
66
|
+
private resizeStartHeight;
|
|
67
|
+
private resizeStartTop;
|
|
68
|
+
private resizeStartLeft;
|
|
69
|
+
private boundOnMouseMove;
|
|
70
|
+
private boundOnMouseUp;
|
|
71
|
+
private elementRef;
|
|
72
|
+
private cdr;
|
|
73
|
+
private ngZone;
|
|
74
|
+
get hasExplicitPosition(): boolean;
|
|
75
|
+
get ResolvedTransform(): string;
|
|
76
|
+
get resolvedWidth(): string;
|
|
77
|
+
get resolvedHeight(): string;
|
|
78
|
+
get resolvedTop(): string;
|
|
79
|
+
get resolvedLeft(): string;
|
|
80
|
+
OnEscapeKey(): void;
|
|
81
|
+
OnCloseClick(): void;
|
|
82
|
+
OnDragStart(event: MouseEvent): void;
|
|
83
|
+
OnResizeStart(event: MouseEvent, direction: string): void;
|
|
84
|
+
private attachMouseListeners;
|
|
85
|
+
private onMouseMove;
|
|
86
|
+
private handleResize;
|
|
87
|
+
private onMouseUp;
|
|
88
|
+
private detachMouseListeners;
|
|
89
|
+
private getWindowElement;
|
|
90
|
+
private parseSize;
|
|
91
|
+
/** Programmatic method to update position */
|
|
92
|
+
SetPosition(top: number, left: number): void;
|
|
93
|
+
/** Programmatic method to update size */
|
|
94
|
+
SetSize(width: number, height: number): void;
|
|
95
|
+
/** Get the current window element for DOM queries */
|
|
96
|
+
GetWindowElement(): HTMLElement | null;
|
|
97
|
+
ngOnDestroy(): void;
|
|
98
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJWindowComponent, never>;
|
|
99
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJWindowComponent, "mj-window", never, { "Visible": { "alias": "Visible"; "required": false; }; "Title": { "alias": "Title"; "required": false; }; "Width": { "alias": "Width"; "required": false; }; "Height": { "alias": "Height"; "required": false; }; "Top": { "alias": "Top"; "required": false; }; "Left": { "alias": "Left"; "required": false; }; "MinWidth": { "alias": "MinWidth"; "required": false; }; "MinHeight": { "alias": "MinHeight"; "required": false; }; "Draggable": { "alias": "Draggable"; "required": false; }; "Resizable": { "alias": "Resizable"; "required": false; }; "State": { "alias": "State"; "required": false; }; }, { "Close": "Close"; "StateChange": "StateChange"; "Resize": "Resize"; }, never, ["mj-window-titlebar", "*", "mj-window-actions"], true, never>;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* mj-window-titlebar — Custom titlebar for mj-window. Replaces `<kendo-window-titlebar>`.
|
|
103
|
+
*/
|
|
104
|
+
export declare class MJWindowTitlebarComponent {
|
|
105
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJWindowTitlebarComponent, never>;
|
|
106
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJWindowTitlebarComponent, "mj-window-titlebar", never, {}, {}, never, ["*"], true, never>;
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* mj-window-actions — Footer actions for mj-window.
|
|
110
|
+
*/
|
|
111
|
+
export declare class MJWindowActionsComponent {
|
|
112
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJWindowActionsComponent, never>;
|
|
113
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJWindowActionsComponent, "mj-window-actions", never, {}, {}, never, ["*"], true, never>;
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=window.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"window.component.d.ts","sourceRoot":"","sources":["../../../src/lib/window/window.component.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, HostListener, ElementRef, ChangeDetectorRef, NgZone, inject } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
const _c0 = [[["mj-window-titlebar"]], "*", [["mj-window-actions"]]];
|
|
4
|
+
const _c1 = ["mj-window-titlebar", "*", "mj-window-actions"];
|
|
5
|
+
function MJWindowComponent_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
+
const _r2 = i0.ɵɵgetCurrentView();
|
|
7
|
+
i0.ɵɵdomElementStart(0, "div", 7);
|
|
8
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Conditional_1_Template_div_mousedown_0_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnResizeStart($event, "n")); });
|
|
9
|
+
i0.ɵɵdomElementEnd();
|
|
10
|
+
i0.ɵɵdomElementStart(1, "div", 8);
|
|
11
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Conditional_1_Template_div_mousedown_1_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnResizeStart($event, "s")); });
|
|
12
|
+
i0.ɵɵdomElementEnd();
|
|
13
|
+
i0.ɵɵdomElementStart(2, "div", 9);
|
|
14
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Conditional_1_Template_div_mousedown_2_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnResizeStart($event, "e")); });
|
|
15
|
+
i0.ɵɵdomElementEnd();
|
|
16
|
+
i0.ɵɵdomElementStart(3, "div", 10);
|
|
17
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Conditional_1_Template_div_mousedown_3_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnResizeStart($event, "w")); });
|
|
18
|
+
i0.ɵɵdomElementEnd();
|
|
19
|
+
i0.ɵɵdomElementStart(4, "div", 11);
|
|
20
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Conditional_1_Template_div_mousedown_4_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnResizeStart($event, "ne")); });
|
|
21
|
+
i0.ɵɵdomElementEnd();
|
|
22
|
+
i0.ɵɵdomElementStart(5, "div", 12);
|
|
23
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Conditional_1_Template_div_mousedown_5_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnResizeStart($event, "nw")); });
|
|
24
|
+
i0.ɵɵdomElementEnd();
|
|
25
|
+
i0.ɵɵdomElementStart(6, "div", 13);
|
|
26
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Conditional_1_Template_div_mousedown_6_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnResizeStart($event, "se")); });
|
|
27
|
+
i0.ɵɵdomElementEnd();
|
|
28
|
+
i0.ɵɵdomElementStart(7, "div", 14);
|
|
29
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Conditional_1_Template_div_mousedown_7_listener($event) { i0.ɵɵrestoreView(_r2); const ctx_r2 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r2.OnResizeStart($event, "sw")); });
|
|
30
|
+
i0.ɵɵdomElementEnd();
|
|
31
|
+
} }
|
|
32
|
+
function MJWindowComponent_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
33
|
+
i0.ɵɵdomElementStart(0, "h3", 3);
|
|
34
|
+
i0.ɵɵtext(1);
|
|
35
|
+
i0.ɵɵdomElementEnd();
|
|
36
|
+
} if (rf & 2) {
|
|
37
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
38
|
+
i0.ɵɵdomProperty("id", "mj-window-title-" + ctx_r2.WindowId);
|
|
39
|
+
i0.ɵɵadvance();
|
|
40
|
+
i0.ɵɵtextInterpolate(ctx_r2.Title);
|
|
41
|
+
} }
|
|
42
|
+
function MJWindowComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
43
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
44
|
+
i0.ɵɵdomElementStart(0, "div", 1);
|
|
45
|
+
i0.ɵɵconditionalCreate(1, MJWindowComponent_Conditional_0_Conditional_1_Template, 8, 0);
|
|
46
|
+
i0.ɵɵdomElementStart(2, "div", 2);
|
|
47
|
+
i0.ɵɵdomListener("mousedown", function MJWindowComponent_Conditional_0_Template_div_mousedown_2_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnDragStart($event)); });
|
|
48
|
+
i0.ɵɵconditionalCreate(3, MJWindowComponent_Conditional_0_Conditional_3_Template, 2, 2, "h3", 3);
|
|
49
|
+
i0.ɵɵprojection(4);
|
|
50
|
+
i0.ɵɵdomElementStart(5, "button", 4);
|
|
51
|
+
i0.ɵɵdomListener("click", function MJWindowComponent_Conditional_0_Template_button_click_5_listener() { i0.ɵɵrestoreView(_r1); const ctx_r2 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r2.OnCloseClick()); })("mousedown", function MJWindowComponent_Conditional_0_Template_button_mousedown_5_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
52
|
+
i0.ɵɵdomElement(6, "i", 5);
|
|
53
|
+
i0.ɵɵdomElementEnd()();
|
|
54
|
+
i0.ɵɵdomElementStart(7, "div", 6);
|
|
55
|
+
i0.ɵɵprojection(8, 1);
|
|
56
|
+
i0.ɵɵdomElementEnd();
|
|
57
|
+
i0.ɵɵprojection(9, 2);
|
|
58
|
+
i0.ɵɵdomElementEnd();
|
|
59
|
+
} if (rf & 2) {
|
|
60
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
61
|
+
i0.ɵɵstyleProp("width", ctx_r2.State === "maximized" ? "100vw" : ctx_r2.resolvedWidth)("height", ctx_r2.State === "maximized" ? "100vh" : ctx_r2.resolvedHeight)("top", ctx_r2.State === "maximized" ? "0" : ctx_r2.resolvedTop)("left", ctx_r2.State === "maximized" ? "0" : ctx_r2.resolvedLeft)("transform", ctx_r2.ResolvedTransform)("min-width", ctx_r2.MinWidth ? ctx_r2.MinWidth + "px" : null)("min-height", ctx_r2.MinHeight ? ctx_r2.MinHeight + "px" : null)("max-width", ctx_r2.State === "maximized" ? "100vw" : "90vw")("max-height", ctx_r2.State === "maximized" ? "100vh" : "90vh")("border-radius", ctx_r2.State === "maximized" ? "0" : null);
|
|
62
|
+
i0.ɵɵclassProp("mj-window--maximized", ctx_r2.State === "maximized")("mj-window--draggable", ctx_r2.Draggable)("mj-window--resizable", ctx_r2.Resizable && ctx_r2.State !== "maximized");
|
|
63
|
+
i0.ɵɵattribute("aria-labelledby", ctx_r2.Title ? "mj-window-title-" + ctx_r2.WindowId : null);
|
|
64
|
+
i0.ɵɵadvance();
|
|
65
|
+
i0.ɵɵconditional(ctx_r2.Resizable && ctx_r2.State !== "maximized" ? 1 : -1);
|
|
66
|
+
i0.ɵɵadvance(2);
|
|
67
|
+
i0.ɵɵconditional(ctx_r2.Title ? 3 : -1);
|
|
68
|
+
} }
|
|
69
|
+
const _c2 = ["*"];
|
|
70
|
+
/**
|
|
71
|
+
* mj-window — Floating window panel. Replaces `<kendo-window>`.
|
|
72
|
+
*
|
|
73
|
+
* Unlike mj-dialog, this does NOT have a backdrop and does NOT block interaction
|
|
74
|
+
* with the rest of the page. It's a floating panel, similar to Kendo's Window.
|
|
75
|
+
*
|
|
76
|
+
* Supports dragging (via titlebar), resizing (via edges/corners), minimize, and maximize.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```html
|
|
80
|
+
* <mj-window [Visible]="showWindow" Title="Details" [Width]="600" [Height]="400"
|
|
81
|
+
* [Draggable]="true" [Resizable]="true" (Close)="onClose()"
|
|
82
|
+
* (StateChange)="onStateChange($event)">
|
|
83
|
+
* <p>Window content</p>
|
|
84
|
+
* </mj-window>
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
export class MJWindowComponent {
|
|
88
|
+
_visible = false;
|
|
89
|
+
static nextId = 0;
|
|
90
|
+
set Visible(value) { this._visible = value; }
|
|
91
|
+
get Visible() { return this._visible; }
|
|
92
|
+
Title = '';
|
|
93
|
+
set Width(value) {
|
|
94
|
+
this._width = value;
|
|
95
|
+
if (value != null)
|
|
96
|
+
this.currentWidth = this.parseSize(value);
|
|
97
|
+
}
|
|
98
|
+
get Width() { return this._width; }
|
|
99
|
+
set Height(value) {
|
|
100
|
+
this._height = value;
|
|
101
|
+
if (value != null)
|
|
102
|
+
this.currentHeight = this.parseSize(value);
|
|
103
|
+
}
|
|
104
|
+
get Height() { return this._height; }
|
|
105
|
+
set Top(value) { if (value != null)
|
|
106
|
+
this.currentTop = value; }
|
|
107
|
+
get Top() { return this.currentTop; }
|
|
108
|
+
set Left(value) { if (value != null)
|
|
109
|
+
this.currentLeft = value; }
|
|
110
|
+
get Left() { return this.currentLeft; }
|
|
111
|
+
MinWidth = null;
|
|
112
|
+
MinHeight = null;
|
|
113
|
+
Draggable = false;
|
|
114
|
+
Resizable = false;
|
|
115
|
+
/** Window state: 'default' or 'maximized'. */
|
|
116
|
+
set State(value) {
|
|
117
|
+
if (value !== this._state) {
|
|
118
|
+
if (value === 'maximized') {
|
|
119
|
+
this.savedTop = this.currentTop;
|
|
120
|
+
this.savedLeft = this.currentLeft;
|
|
121
|
+
this.savedWidth = this.currentWidth;
|
|
122
|
+
this.savedHeight = this.currentHeight;
|
|
123
|
+
}
|
|
124
|
+
else if (this._state === 'maximized') {
|
|
125
|
+
this.currentTop = this.savedTop;
|
|
126
|
+
this.currentLeft = this.savedLeft;
|
|
127
|
+
this.currentWidth = this.savedWidth;
|
|
128
|
+
this.currentHeight = this.savedHeight;
|
|
129
|
+
}
|
|
130
|
+
this._state = value;
|
|
131
|
+
this.StateChange.emit(value);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
get State() { return this._state; }
|
|
135
|
+
Close = new EventEmitter();
|
|
136
|
+
StateChange = new EventEmitter();
|
|
137
|
+
Resize = new EventEmitter();
|
|
138
|
+
WindowId = MJWindowComponent.nextId++;
|
|
139
|
+
// Internal position/size tracking
|
|
140
|
+
_state = 'default';
|
|
141
|
+
_width = null;
|
|
142
|
+
_height = null;
|
|
143
|
+
currentTop = null;
|
|
144
|
+
currentLeft = null;
|
|
145
|
+
currentWidth = null;
|
|
146
|
+
currentHeight = null;
|
|
147
|
+
// Saved dimensions for restore from maximize
|
|
148
|
+
savedTop = null;
|
|
149
|
+
savedLeft = null;
|
|
150
|
+
savedWidth = null;
|
|
151
|
+
savedHeight = null;
|
|
152
|
+
// Drag state
|
|
153
|
+
isDragging = false;
|
|
154
|
+
dragStartX = 0;
|
|
155
|
+
dragStartY = 0;
|
|
156
|
+
dragStartTop = 0;
|
|
157
|
+
dragStartLeft = 0;
|
|
158
|
+
// Resize state
|
|
159
|
+
isResizing = false;
|
|
160
|
+
resizeDirection = '';
|
|
161
|
+
resizeStartX = 0;
|
|
162
|
+
resizeStartY = 0;
|
|
163
|
+
resizeStartWidth = 0;
|
|
164
|
+
resizeStartHeight = 0;
|
|
165
|
+
resizeStartTop = 0;
|
|
166
|
+
resizeStartLeft = 0;
|
|
167
|
+
boundOnMouseMove = null;
|
|
168
|
+
boundOnMouseUp = null;
|
|
169
|
+
elementRef = inject(ElementRef);
|
|
170
|
+
cdr = inject(ChangeDetectorRef);
|
|
171
|
+
ngZone = inject(NgZone);
|
|
172
|
+
get hasExplicitPosition() {
|
|
173
|
+
return this.currentTop != null && this.currentLeft != null;
|
|
174
|
+
}
|
|
175
|
+
get ResolvedTransform() {
|
|
176
|
+
if (this.State === 'maximized')
|
|
177
|
+
return 'none';
|
|
178
|
+
const hasTop = this.currentTop != null;
|
|
179
|
+
const hasLeft = this.currentLeft != null;
|
|
180
|
+
if (hasTop && hasLeft)
|
|
181
|
+
return 'none';
|
|
182
|
+
if (hasTop && !hasLeft)
|
|
183
|
+
return 'translateX(-50%)';
|
|
184
|
+
if (!hasTop && hasLeft)
|
|
185
|
+
return 'translateY(-50%)';
|
|
186
|
+
return 'translate(-50%, -50%)';
|
|
187
|
+
}
|
|
188
|
+
get resolvedWidth() {
|
|
189
|
+
if (this.currentWidth != null)
|
|
190
|
+
return `${this.currentWidth}px`;
|
|
191
|
+
if (this.Width)
|
|
192
|
+
return typeof this.Width === 'number' ? `${this.Width}px` : this.Width;
|
|
193
|
+
return '500px';
|
|
194
|
+
}
|
|
195
|
+
get resolvedHeight() {
|
|
196
|
+
if (this.currentHeight != null)
|
|
197
|
+
return `${this.currentHeight}px`;
|
|
198
|
+
if (this.Height)
|
|
199
|
+
return typeof this.Height === 'number' ? `${this.Height}px` : this.Height;
|
|
200
|
+
return 'auto';
|
|
201
|
+
}
|
|
202
|
+
get resolvedTop() {
|
|
203
|
+
return this.currentTop != null ? `${this.currentTop}px` : '50%';
|
|
204
|
+
}
|
|
205
|
+
get resolvedLeft() {
|
|
206
|
+
return this.currentLeft != null ? `${this.currentLeft}px` : '50%';
|
|
207
|
+
}
|
|
208
|
+
OnEscapeKey() {
|
|
209
|
+
if (this.Visible)
|
|
210
|
+
this.OnCloseClick();
|
|
211
|
+
}
|
|
212
|
+
OnCloseClick() {
|
|
213
|
+
this.Close.emit();
|
|
214
|
+
}
|
|
215
|
+
// --- Drag handling ---
|
|
216
|
+
OnDragStart(event) {
|
|
217
|
+
if (!this.Draggable || this.State === 'maximized')
|
|
218
|
+
return;
|
|
219
|
+
// Don't drag if clicking buttons inside titlebar
|
|
220
|
+
if (event.target.closest('button'))
|
|
221
|
+
return;
|
|
222
|
+
event.preventDefault();
|
|
223
|
+
this.isDragging = true;
|
|
224
|
+
this.dragStartX = event.clientX;
|
|
225
|
+
this.dragStartY = event.clientY;
|
|
226
|
+
const windowEl = this.getWindowElement();
|
|
227
|
+
if (windowEl) {
|
|
228
|
+
const rect = windowEl.getBoundingClientRect();
|
|
229
|
+
this.dragStartTop = rect.top;
|
|
230
|
+
this.dragStartLeft = rect.left;
|
|
231
|
+
// Ensure we're using absolute positioning once dragging starts
|
|
232
|
+
if (this.currentTop == null) {
|
|
233
|
+
this.currentTop = rect.top;
|
|
234
|
+
this.currentLeft = rect.left;
|
|
235
|
+
this.cdr.detectChanges();
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
this.attachMouseListeners();
|
|
239
|
+
}
|
|
240
|
+
// --- Resize handling ---
|
|
241
|
+
OnResizeStart(event, direction) {
|
|
242
|
+
if (!this.Resizable || this.State === 'maximized')
|
|
243
|
+
return;
|
|
244
|
+
event.preventDefault();
|
|
245
|
+
event.stopPropagation();
|
|
246
|
+
this.isResizing = true;
|
|
247
|
+
this.resizeDirection = direction;
|
|
248
|
+
this.resizeStartX = event.clientX;
|
|
249
|
+
this.resizeStartY = event.clientY;
|
|
250
|
+
const windowEl = this.getWindowElement();
|
|
251
|
+
if (windowEl) {
|
|
252
|
+
const rect = windowEl.getBoundingClientRect();
|
|
253
|
+
this.resizeStartWidth = rect.width;
|
|
254
|
+
this.resizeStartHeight = rect.height;
|
|
255
|
+
this.resizeStartTop = rect.top;
|
|
256
|
+
this.resizeStartLeft = rect.left;
|
|
257
|
+
// Ensure absolute positioning
|
|
258
|
+
if (this.currentTop == null) {
|
|
259
|
+
this.currentTop = rect.top;
|
|
260
|
+
this.currentLeft = rect.left;
|
|
261
|
+
}
|
|
262
|
+
if (this.currentWidth == null) {
|
|
263
|
+
this.currentWidth = rect.width;
|
|
264
|
+
}
|
|
265
|
+
if (this.currentHeight == null) {
|
|
266
|
+
this.currentHeight = rect.height;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
this.attachMouseListeners();
|
|
270
|
+
}
|
|
271
|
+
attachMouseListeners() {
|
|
272
|
+
this.ngZone.runOutsideAngular(() => {
|
|
273
|
+
this.boundOnMouseMove = (e) => this.onMouseMove(e);
|
|
274
|
+
this.boundOnMouseUp = (e) => this.onMouseUp(e);
|
|
275
|
+
document.addEventListener('mousemove', this.boundOnMouseMove);
|
|
276
|
+
document.addEventListener('mouseup', this.boundOnMouseUp);
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
onMouseMove(event) {
|
|
280
|
+
if (this.isDragging) {
|
|
281
|
+
const dx = event.clientX - this.dragStartX;
|
|
282
|
+
const dy = event.clientY - this.dragStartY;
|
|
283
|
+
this.currentTop = Math.max(0, this.dragStartTop + dy);
|
|
284
|
+
this.currentLeft = Math.max(0, this.dragStartLeft + dx);
|
|
285
|
+
this.ngZone.run(() => this.cdr.detectChanges());
|
|
286
|
+
}
|
|
287
|
+
else if (this.isResizing) {
|
|
288
|
+
this.handleResize(event);
|
|
289
|
+
this.ngZone.run(() => {
|
|
290
|
+
this.cdr.detectChanges();
|
|
291
|
+
this.Resize.emit();
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
handleResize(event) {
|
|
296
|
+
const dx = event.clientX - this.resizeStartX;
|
|
297
|
+
const dy = event.clientY - this.resizeStartY;
|
|
298
|
+
const minW = this.MinWidth || 200;
|
|
299
|
+
const minH = this.MinHeight || 150;
|
|
300
|
+
const dir = this.resizeDirection;
|
|
301
|
+
if (dir.includes('e')) {
|
|
302
|
+
this.currentWidth = Math.max(minW, this.resizeStartWidth + dx);
|
|
303
|
+
}
|
|
304
|
+
if (dir.includes('w')) {
|
|
305
|
+
const newWidth = Math.max(minW, this.resizeStartWidth - dx);
|
|
306
|
+
this.currentLeft = this.resizeStartLeft + (this.resizeStartWidth - newWidth);
|
|
307
|
+
this.currentWidth = newWidth;
|
|
308
|
+
}
|
|
309
|
+
if (dir.includes('s')) {
|
|
310
|
+
this.currentHeight = Math.max(minH, this.resizeStartHeight + dy);
|
|
311
|
+
}
|
|
312
|
+
if (dir.includes('n')) {
|
|
313
|
+
const newHeight = Math.max(minH, this.resizeStartHeight - dy);
|
|
314
|
+
this.currentTop = this.resizeStartTop + (this.resizeStartHeight - newHeight);
|
|
315
|
+
this.currentHeight = newHeight;
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
onMouseUp(_event) {
|
|
319
|
+
this.isDragging = false;
|
|
320
|
+
this.isResizing = false;
|
|
321
|
+
this.detachMouseListeners();
|
|
322
|
+
}
|
|
323
|
+
detachMouseListeners() {
|
|
324
|
+
if (this.boundOnMouseMove) {
|
|
325
|
+
document.removeEventListener('mousemove', this.boundOnMouseMove);
|
|
326
|
+
this.boundOnMouseMove = null;
|
|
327
|
+
}
|
|
328
|
+
if (this.boundOnMouseUp) {
|
|
329
|
+
document.removeEventListener('mouseup', this.boundOnMouseUp);
|
|
330
|
+
this.boundOnMouseUp = null;
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
getWindowElement() {
|
|
334
|
+
return this.elementRef.nativeElement.querySelector('.mj-window');
|
|
335
|
+
}
|
|
336
|
+
parseSize(value) {
|
|
337
|
+
if (typeof value === 'number')
|
|
338
|
+
return value;
|
|
339
|
+
if (value.endsWith('vw'))
|
|
340
|
+
return (parseFloat(value) / 100) * window.innerWidth;
|
|
341
|
+
if (value.endsWith('vh'))
|
|
342
|
+
return (parseFloat(value) / 100) * window.innerHeight;
|
|
343
|
+
if (value.endsWith('px'))
|
|
344
|
+
return parseFloat(value);
|
|
345
|
+
const parsed = parseFloat(value);
|
|
346
|
+
return isNaN(parsed) ? null : parsed;
|
|
347
|
+
}
|
|
348
|
+
/** Programmatic method to update position */
|
|
349
|
+
SetPosition(top, left) {
|
|
350
|
+
this.currentTop = top;
|
|
351
|
+
this.currentLeft = left;
|
|
352
|
+
this.cdr.detectChanges();
|
|
353
|
+
}
|
|
354
|
+
/** Programmatic method to update size */
|
|
355
|
+
SetSize(width, height) {
|
|
356
|
+
this.currentWidth = width;
|
|
357
|
+
this.currentHeight = height;
|
|
358
|
+
this.cdr.detectChanges();
|
|
359
|
+
}
|
|
360
|
+
/** Get the current window element for DOM queries */
|
|
361
|
+
GetWindowElement() {
|
|
362
|
+
return this.getWindowElement();
|
|
363
|
+
}
|
|
364
|
+
ngOnDestroy() {
|
|
365
|
+
this.detachMouseListeners();
|
|
366
|
+
}
|
|
367
|
+
static ɵfac = function MJWindowComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJWindowComponent)(); };
|
|
368
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJWindowComponent, selectors: [["mj-window"]], hostBindings: function MJWindowComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
369
|
+
i0.ɵɵlistener("keydown.escape", function MJWindowComponent_keydown_escape_HostBindingHandler() { return ctx.OnEscapeKey(); }, i0.ɵɵresolveDocument);
|
|
370
|
+
} }, inputs: { Visible: "Visible", Title: "Title", Width: "Width", Height: "Height", Top: "Top", Left: "Left", MinWidth: "MinWidth", MinHeight: "MinHeight", Draggable: "Draggable", Resizable: "Resizable", State: "State" }, outputs: { Close: "Close", StateChange: "StateChange", Resize: "Resize" }, ngContentSelectors: _c1, decls: 1, vars: 1, consts: [["role", "dialog", 1, "mj-window", 3, "mj-window--maximized", "mj-window--draggable", "mj-window--resizable", "width", "height", "top", "left", "transform", "min-width", "min-height", "max-width", "max-height", "border-radius"], ["role", "dialog", 1, "mj-window"], [1, "mj-window-titlebar", 3, "mousedown"], [1, "mj-window-title", 3, "id"], ["aria-label", "Close window", 1, "mj-window-close", 3, "click", "mousedown"], [1, "fa-solid", "fa-times"], [1, "mj-window-body"], [1, "mj-window-resize", "mj-window-resize--n", 3, "mousedown"], [1, "mj-window-resize", "mj-window-resize--s", 3, "mousedown"], [1, "mj-window-resize", "mj-window-resize--e", 3, "mousedown"], [1, "mj-window-resize", "mj-window-resize--w", 3, "mousedown"], [1, "mj-window-resize", "mj-window-resize--ne", 3, "mousedown"], [1, "mj-window-resize", "mj-window-resize--nw", 3, "mousedown"], [1, "mj-window-resize", "mj-window-resize--se", 3, "mousedown"], [1, "mj-window-resize", "mj-window-resize--sw", 3, "mousedown"]], template: function MJWindowComponent_Template(rf, ctx) { if (rf & 1) {
|
|
371
|
+
i0.ɵɵprojectionDef(_c0);
|
|
372
|
+
i0.ɵɵconditionalCreate(0, MJWindowComponent_Conditional_0_Template, 10, 29, "div", 0);
|
|
373
|
+
} if (rf & 2) {
|
|
374
|
+
i0.ɵɵconditional(ctx.Visible ? 0 : -1);
|
|
375
|
+
} }, encapsulation: 2 });
|
|
376
|
+
}
|
|
377
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJWindowComponent, [{
|
|
378
|
+
type: Component,
|
|
379
|
+
args: [{
|
|
380
|
+
selector: 'mj-window',
|
|
381
|
+
standalone: true,
|
|
382
|
+
template: `
|
|
383
|
+
@if (Visible) {
|
|
384
|
+
<div class="mj-window"
|
|
385
|
+
[class.mj-window--maximized]="State === 'maximized'"
|
|
386
|
+
[class.mj-window--draggable]="Draggable"
|
|
387
|
+
[class.mj-window--resizable]="Resizable && State !== 'maximized'"
|
|
388
|
+
[style.width]="State === 'maximized' ? '100vw' : resolvedWidth"
|
|
389
|
+
[style.height]="State === 'maximized' ? '100vh' : resolvedHeight"
|
|
390
|
+
[style.top]="State === 'maximized' ? '0' : resolvedTop"
|
|
391
|
+
[style.left]="State === 'maximized' ? '0' : resolvedLeft"
|
|
392
|
+
[style.transform]="ResolvedTransform"
|
|
393
|
+
[style.min-width]="MinWidth ? MinWidth + 'px' : null"
|
|
394
|
+
[style.min-height]="MinHeight ? MinHeight + 'px' : null"
|
|
395
|
+
[style.max-width]="State === 'maximized' ? '100vw' : '90vw'"
|
|
396
|
+
[style.max-height]="State === 'maximized' ? '100vh' : '90vh'"
|
|
397
|
+
[style.border-radius]="State === 'maximized' ? '0' : null"
|
|
398
|
+
role="dialog"
|
|
399
|
+
[attr.aria-labelledby]="Title ? 'mj-window-title-' + WindowId : null">
|
|
400
|
+
|
|
401
|
+
<!-- Resize handles -->
|
|
402
|
+
@if (Resizable && State !== 'maximized') {
|
|
403
|
+
<div class="mj-window-resize mj-window-resize--n" (mousedown)="OnResizeStart($event, 'n')"></div>
|
|
404
|
+
<div class="mj-window-resize mj-window-resize--s" (mousedown)="OnResizeStart($event, 's')"></div>
|
|
405
|
+
<div class="mj-window-resize mj-window-resize--e" (mousedown)="OnResizeStart($event, 'e')"></div>
|
|
406
|
+
<div class="mj-window-resize mj-window-resize--w" (mousedown)="OnResizeStart($event, 'w')"></div>
|
|
407
|
+
<div class="mj-window-resize mj-window-resize--ne" (mousedown)="OnResizeStart($event, 'ne')"></div>
|
|
408
|
+
<div class="mj-window-resize mj-window-resize--nw" (mousedown)="OnResizeStart($event, 'nw')"></div>
|
|
409
|
+
<div class="mj-window-resize mj-window-resize--se" (mousedown)="OnResizeStart($event, 'se')"></div>
|
|
410
|
+
<div class="mj-window-resize mj-window-resize--sw" (mousedown)="OnResizeStart($event, 'sw')"></div>
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
<div class="mj-window-titlebar"
|
|
414
|
+
(mousedown)="OnDragStart($event)">
|
|
415
|
+
@if (Title) {
|
|
416
|
+
<h3 class="mj-window-title" [id]="'mj-window-title-' + WindowId">{{ Title }}</h3>
|
|
417
|
+
}
|
|
418
|
+
<ng-content select="mj-window-titlebar"></ng-content>
|
|
419
|
+
<button class="mj-window-close" (click)="OnCloseClick()" (mousedown)="$event.stopPropagation()" aria-label="Close window">
|
|
420
|
+
<i class="fa-solid fa-times"></i>
|
|
421
|
+
</button>
|
|
422
|
+
</div>
|
|
423
|
+
|
|
424
|
+
<div class="mj-window-body">
|
|
425
|
+
<ng-content></ng-content>
|
|
426
|
+
</div>
|
|
427
|
+
|
|
428
|
+
<ng-content select="mj-window-actions"></ng-content>
|
|
429
|
+
</div>
|
|
430
|
+
}
|
|
431
|
+
`
|
|
432
|
+
}]
|
|
433
|
+
}], null, { Visible: [{
|
|
434
|
+
type: Input
|
|
435
|
+
}], Title: [{
|
|
436
|
+
type: Input
|
|
437
|
+
}], Width: [{
|
|
438
|
+
type: Input
|
|
439
|
+
}], Height: [{
|
|
440
|
+
type: Input
|
|
441
|
+
}], Top: [{
|
|
442
|
+
type: Input
|
|
443
|
+
}], Left: [{
|
|
444
|
+
type: Input
|
|
445
|
+
}], MinWidth: [{
|
|
446
|
+
type: Input
|
|
447
|
+
}], MinHeight: [{
|
|
448
|
+
type: Input
|
|
449
|
+
}], Draggable: [{
|
|
450
|
+
type: Input
|
|
451
|
+
}], Resizable: [{
|
|
452
|
+
type: Input
|
|
453
|
+
}], State: [{
|
|
454
|
+
type: Input
|
|
455
|
+
}], Close: [{
|
|
456
|
+
type: Output
|
|
457
|
+
}], StateChange: [{
|
|
458
|
+
type: Output
|
|
459
|
+
}], Resize: [{
|
|
460
|
+
type: Output
|
|
461
|
+
}], OnEscapeKey: [{
|
|
462
|
+
type: HostListener,
|
|
463
|
+
args: ['document:keydown.escape']
|
|
464
|
+
}] }); })();
|
|
465
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJWindowComponent, { className: "MJWindowComponent", filePath: "lib/window/window.component.ts", lineNumber: 74 }); })();
|
|
466
|
+
/**
|
|
467
|
+
* mj-window-titlebar — Custom titlebar for mj-window. Replaces `<kendo-window-titlebar>`.
|
|
468
|
+
*/
|
|
469
|
+
export class MJWindowTitlebarComponent {
|
|
470
|
+
static ɵfac = function MJWindowTitlebarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJWindowTitlebarComponent)(); };
|
|
471
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJWindowTitlebarComponent, selectors: [["mj-window-titlebar"]], ngContentSelectors: _c2, decls: 1, vars: 0, template: function MJWindowTitlebarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
472
|
+
i0.ɵɵprojectionDef();
|
|
473
|
+
i0.ɵɵprojection(0);
|
|
474
|
+
} }, styles: ["[_nghost-%COMP%] { display: contents; }"] });
|
|
475
|
+
}
|
|
476
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJWindowTitlebarComponent, [{
|
|
477
|
+
type: Component,
|
|
478
|
+
args: [{ selector: 'mj-window-titlebar', standalone: true, template: `<ng-content></ng-content>`, styles: [":host { display: contents; }"] }]
|
|
479
|
+
}], null, null); })();
|
|
480
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJWindowTitlebarComponent, { className: "MJWindowTitlebarComponent", filePath: "lib/window/window.component.ts", lineNumber: 395 }); })();
|
|
481
|
+
/**
|
|
482
|
+
* mj-window-actions — Footer actions for mj-window.
|
|
483
|
+
*/
|
|
484
|
+
export class MJWindowActionsComponent {
|
|
485
|
+
static ɵfac = function MJWindowActionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJWindowActionsComponent)(); };
|
|
486
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJWindowActionsComponent, selectors: [["mj-window-actions"]], ngContentSelectors: _c2, decls: 2, vars: 0, consts: [[1, "mj-window-actions"]], template: function MJWindowActionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
487
|
+
i0.ɵɵprojectionDef();
|
|
488
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
489
|
+
i0.ɵɵprojection(1);
|
|
490
|
+
i0.ɵɵdomElementEnd();
|
|
491
|
+
} }, encapsulation: 2 });
|
|
492
|
+
}
|
|
493
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJWindowActionsComponent, [{
|
|
494
|
+
type: Component,
|
|
495
|
+
args: [{
|
|
496
|
+
selector: 'mj-window-actions',
|
|
497
|
+
standalone: true,
|
|
498
|
+
template: `<div class="mj-window-actions"><ng-content></ng-content></div>`
|
|
499
|
+
}]
|
|
500
|
+
}], null, null); })();
|
|
501
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJWindowActionsComponent, { className: "MJWindowActionsComponent", filePath: "lib/window/window.component.ts", lineNumber: 405 }); })();
|
|
502
|
+
//# sourceMappingURL=window.component.js.map
|