@memberjunction/ng-ui-components 0.0.1 → 5.23.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,285 @@
|
|
|
1
|
+
import { Component, Input, Output, EventEmitter, HostListener } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
const _c0 = ["*", [["mj-dialog-actions"]], [["mj-dialog-titlebar"]]];
|
|
4
|
+
const _c1 = ["*", "mj-dialog-actions", "mj-dialog-titlebar"];
|
|
5
|
+
function MJDialogComponent_Conditional_0_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
+
i0.ɵɵdomElementStart(0, "h2", 5);
|
|
7
|
+
i0.ɵɵtext(1);
|
|
8
|
+
i0.ɵɵdomElementEnd();
|
|
9
|
+
} if (rf & 2) {
|
|
10
|
+
const ctx_r1 = i0.ɵɵnextContext(3);
|
|
11
|
+
i0.ɵɵdomProperty("id", "mj-dialog-title-" + ctx_r1.dialogId);
|
|
12
|
+
i0.ɵɵadvance();
|
|
13
|
+
i0.ɵɵtextInterpolate(ctx_r1.Title);
|
|
14
|
+
} }
|
|
15
|
+
function MJDialogComponent_Conditional_0_Conditional_2_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
16
|
+
const _r3 = i0.ɵɵgetCurrentView();
|
|
17
|
+
i0.ɵɵdomElementStart(0, "button", 7);
|
|
18
|
+
i0.ɵɵdomListener("click", function MJDialogComponent_Conditional_0_Conditional_2_Conditional_3_Template_button_click_0_listener() { i0.ɵɵrestoreView(_r3); const ctx_r1 = i0.ɵɵnextContext(3); return i0.ɵɵresetView(ctx_r1.OnCloseClick()); });
|
|
19
|
+
i0.ɵɵdomElement(1, "i", 8);
|
|
20
|
+
i0.ɵɵdomElementEnd();
|
|
21
|
+
} }
|
|
22
|
+
function MJDialogComponent_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
23
|
+
i0.ɵɵdomElementStart(0, "div", 3);
|
|
24
|
+
i0.ɵɵconditionalCreate(1, MJDialogComponent_Conditional_0_Conditional_2_Conditional_1_Template, 2, 2, "h2", 5);
|
|
25
|
+
i0.ɵɵprojection(2, 2);
|
|
26
|
+
i0.ɵɵconditionalCreate(3, MJDialogComponent_Conditional_0_Conditional_2_Conditional_3_Template, 2, 0, "button", 6);
|
|
27
|
+
i0.ɵɵdomElementEnd();
|
|
28
|
+
} if (rf & 2) {
|
|
29
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
30
|
+
i0.ɵɵadvance();
|
|
31
|
+
i0.ɵɵconditional(ctx_r1.Title ? 1 : -1);
|
|
32
|
+
i0.ɵɵadvance(2);
|
|
33
|
+
i0.ɵɵconditional(ctx_r1.Closeable ? 3 : -1);
|
|
34
|
+
} }
|
|
35
|
+
function MJDialogComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
36
|
+
const _r1 = i0.ɵɵgetCurrentView();
|
|
37
|
+
i0.ɵɵdomElementStart(0, "div", 1);
|
|
38
|
+
i0.ɵɵdomListener("click", function MJDialogComponent_Conditional_0_Template_div_click_0_listener($event) { i0.ɵɵrestoreView(_r1); const ctx_r1 = i0.ɵɵnextContext(); return i0.ɵɵresetView(ctx_r1.OnBackdropClick($event)); });
|
|
39
|
+
i0.ɵɵdomElementStart(1, "div", 2);
|
|
40
|
+
i0.ɵɵdomListener("click", function MJDialogComponent_Conditional_0_Template_div_click_1_listener($event) { i0.ɵɵrestoreView(_r1); return i0.ɵɵresetView($event.stopPropagation()); });
|
|
41
|
+
i0.ɵɵconditionalCreate(2, MJDialogComponent_Conditional_0_Conditional_2_Template, 4, 2, "div", 3);
|
|
42
|
+
i0.ɵɵdomElementStart(3, "div", 4);
|
|
43
|
+
i0.ɵɵprojection(4);
|
|
44
|
+
i0.ɵɵdomElementEnd();
|
|
45
|
+
i0.ɵɵprojection(5, 1);
|
|
46
|
+
i0.ɵɵdomElementEnd()();
|
|
47
|
+
} if (rf & 2) {
|
|
48
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
49
|
+
i0.ɵɵadvance();
|
|
50
|
+
i0.ɵɵstyleProp("width", ctx_r1.resolvedWidth)("height", ctx_r1.resolvedHeight)("max-width", "90vw")("max-height", "90vh");
|
|
51
|
+
i0.ɵɵattribute("aria-labelledby", ctx_r1.Title ? "mj-dialog-title-" + ctx_r1.dialogId : null);
|
|
52
|
+
i0.ɵɵadvance();
|
|
53
|
+
i0.ɵɵconditional(ctx_r1.Title || ctx_r1.Closeable ? 2 : -1);
|
|
54
|
+
} }
|
|
55
|
+
const _c2 = ["*"];
|
|
56
|
+
const SIZE_MAP = {
|
|
57
|
+
sm: '400px',
|
|
58
|
+
md: '600px',
|
|
59
|
+
lg: '800px',
|
|
60
|
+
xl: '1000px',
|
|
61
|
+
auto: 'auto'
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* mj-dialog — Modal dialog component using native `<dialog>` element.
|
|
65
|
+
*
|
|
66
|
+
* Replaces `<kendo-dialog>`.
|
|
67
|
+
*
|
|
68
|
+
* Supports both explicit width/height and size presets.
|
|
69
|
+
* Content is projected, with an optional `<mj-dialog-actions>` for the footer.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```html
|
|
73
|
+
* <mj-dialog [Visible]="showDialog" Title="Confirm" (Close)="onClose()">
|
|
74
|
+
* <p>Are you sure?</p>
|
|
75
|
+
* <mj-dialog-actions>
|
|
76
|
+
* <button mjButton variant="primary" (click)="onConfirm()">Yes</button>
|
|
77
|
+
* <button mjButton (click)="onClose()">No</button>
|
|
78
|
+
* </mj-dialog-actions>
|
|
79
|
+
* </mj-dialog>
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
export class MJDialogComponent {
|
|
83
|
+
_visible = false;
|
|
84
|
+
static nextId = 0;
|
|
85
|
+
set Visible(value) {
|
|
86
|
+
const wasVisible = this._visible;
|
|
87
|
+
this._visible = value;
|
|
88
|
+
if (value && !wasVisible) {
|
|
89
|
+
this.onOpen();
|
|
90
|
+
}
|
|
91
|
+
if (!value && wasVisible) {
|
|
92
|
+
this.onCloseInternal();
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
get Visible() {
|
|
96
|
+
return this._visible;
|
|
97
|
+
}
|
|
98
|
+
Title = '';
|
|
99
|
+
Width = null;
|
|
100
|
+
Height = null;
|
|
101
|
+
Size = 'auto';
|
|
102
|
+
Closeable = true;
|
|
103
|
+
MinWidth = null;
|
|
104
|
+
Close = new EventEmitter();
|
|
105
|
+
DialogId = MJDialogComponent.nextId++;
|
|
106
|
+
get dialogId() {
|
|
107
|
+
return this.DialogId;
|
|
108
|
+
}
|
|
109
|
+
get resolvedWidth() {
|
|
110
|
+
if (this.Width) {
|
|
111
|
+
return typeof this.Width === 'number' ? `${this.Width}px` : this.Width;
|
|
112
|
+
}
|
|
113
|
+
return SIZE_MAP[this.Size] ?? 'auto';
|
|
114
|
+
}
|
|
115
|
+
get resolvedHeight() {
|
|
116
|
+
if (this.Height) {
|
|
117
|
+
return typeof this.Height === 'number' ? `${this.Height}px` : this.Height;
|
|
118
|
+
}
|
|
119
|
+
return 'auto';
|
|
120
|
+
}
|
|
121
|
+
OnEscapeKey() {
|
|
122
|
+
if (this.Visible && this.Closeable) {
|
|
123
|
+
this.OnCloseClick();
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
OnBackdropClick(event) {
|
|
127
|
+
if (this.Closeable) {
|
|
128
|
+
this.OnCloseClick();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
OnCloseClick() {
|
|
132
|
+
this.Close.emit();
|
|
133
|
+
}
|
|
134
|
+
onOpen() {
|
|
135
|
+
document.body.style.overflow = 'hidden';
|
|
136
|
+
}
|
|
137
|
+
onCloseInternal() {
|
|
138
|
+
document.body.style.overflow = '';
|
|
139
|
+
}
|
|
140
|
+
ngOnDestroy() {
|
|
141
|
+
document.body.style.overflow = '';
|
|
142
|
+
}
|
|
143
|
+
static ɵfac = function MJDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJDialogComponent)(); };
|
|
144
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJDialogComponent, selectors: [["mj-dialog"]], hostBindings: function MJDialogComponent_HostBindings(rf, ctx) { if (rf & 1) {
|
|
145
|
+
i0.ɵɵlistener("keydown.escape", function MJDialogComponent_keydown_escape_HostBindingHandler() { return ctx.OnEscapeKey(); }, i0.ɵɵresolveDocument);
|
|
146
|
+
} }, inputs: { Visible: "Visible", Title: "Title", Width: "Width", Height: "Height", Size: "Size", Closeable: "Closeable", MinWidth: "MinWidth" }, outputs: { Close: "Close" }, ngContentSelectors: _c1, decls: 1, vars: 1, consts: [[1, "mj-dialog-backdrop"], [1, "mj-dialog-backdrop", 3, "click"], ["role", "dialog", "aria-modal", "true", 1, "mj-dialog-container", 3, "click"], [1, "mj-dialog-titlebar"], [1, "mj-dialog-body"], [1, "mj-dialog-title", 3, "id"], ["aria-label", "Close dialog", 1, "mj-dialog-close"], ["aria-label", "Close dialog", 1, "mj-dialog-close", 3, "click"], [1, "fa-solid", "fa-times"]], template: function MJDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
147
|
+
i0.ɵɵprojectionDef(_c0);
|
|
148
|
+
i0.ɵɵconditionalCreate(0, MJDialogComponent_Conditional_0_Template, 6, 10, "div", 0);
|
|
149
|
+
} if (rf & 2) {
|
|
150
|
+
i0.ɵɵconditional(ctx.Visible ? 0 : -1);
|
|
151
|
+
} }, encapsulation: 2 });
|
|
152
|
+
}
|
|
153
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJDialogComponent, [{
|
|
154
|
+
type: Component,
|
|
155
|
+
args: [{
|
|
156
|
+
selector: 'mj-dialog',
|
|
157
|
+
standalone: true,
|
|
158
|
+
template: `
|
|
159
|
+
@if (Visible) {
|
|
160
|
+
<div class="mj-dialog-backdrop" (click)="OnBackdropClick($event)">
|
|
161
|
+
<div class="mj-dialog-container"
|
|
162
|
+
role="dialog"
|
|
163
|
+
aria-modal="true"
|
|
164
|
+
[attr.aria-labelledby]="Title ? 'mj-dialog-title-' + dialogId : null"
|
|
165
|
+
[style.width]="resolvedWidth"
|
|
166
|
+
[style.height]="resolvedHeight"
|
|
167
|
+
[style.max-width]="'90vw'"
|
|
168
|
+
[style.max-height]="'90vh'"
|
|
169
|
+
(click)="$event.stopPropagation()">
|
|
170
|
+
|
|
171
|
+
<!-- Title bar -->
|
|
172
|
+
@if (Title || Closeable) {
|
|
173
|
+
<div class="mj-dialog-titlebar">
|
|
174
|
+
@if (Title) {
|
|
175
|
+
<h2 class="mj-dialog-title" [id]="'mj-dialog-title-' + dialogId">{{ Title }}</h2>
|
|
176
|
+
}
|
|
177
|
+
<ng-content select="mj-dialog-titlebar"></ng-content>
|
|
178
|
+
@if (Closeable) {
|
|
179
|
+
<button class="mj-dialog-close" (click)="OnCloseClick()" aria-label="Close dialog">
|
|
180
|
+
<i class="fa-solid fa-times"></i>
|
|
181
|
+
</button>
|
|
182
|
+
}
|
|
183
|
+
</div>
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
<!-- Body -->
|
|
187
|
+
<div class="mj-dialog-body">
|
|
188
|
+
<ng-content></ng-content>
|
|
189
|
+
</div>
|
|
190
|
+
|
|
191
|
+
<!-- Actions (projected) -->
|
|
192
|
+
<ng-content select="mj-dialog-actions"></ng-content>
|
|
193
|
+
</div>
|
|
194
|
+
</div>
|
|
195
|
+
}
|
|
196
|
+
`
|
|
197
|
+
}]
|
|
198
|
+
}], null, { Visible: [{
|
|
199
|
+
type: Input
|
|
200
|
+
}], Title: [{
|
|
201
|
+
type: Input
|
|
202
|
+
}], Width: [{
|
|
203
|
+
type: Input
|
|
204
|
+
}], Height: [{
|
|
205
|
+
type: Input
|
|
206
|
+
}], Size: [{
|
|
207
|
+
type: Input
|
|
208
|
+
}], Closeable: [{
|
|
209
|
+
type: Input
|
|
210
|
+
}], MinWidth: [{
|
|
211
|
+
type: Input
|
|
212
|
+
}], Close: [{
|
|
213
|
+
type: Output
|
|
214
|
+
}], OnEscapeKey: [{
|
|
215
|
+
type: HostListener,
|
|
216
|
+
args: ['document:keydown.escape']
|
|
217
|
+
}] }); })();
|
|
218
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJDialogComponent, { className: "MJDialogComponent", filePath: "lib/dialog/dialog.component.ts", lineNumber: 86 }); })();
|
|
219
|
+
/**
|
|
220
|
+
* mj-dialog-titlebar — Custom titlebar content for mj-dialog.
|
|
221
|
+
*
|
|
222
|
+
* Replaces `<kendo-dialog-titlebar>`.
|
|
223
|
+
*
|
|
224
|
+
* @example
|
|
225
|
+
* ```html
|
|
226
|
+
* <mj-dialog [Visible]="show" (Close)="onClose()">
|
|
227
|
+
* <mj-dialog-titlebar>
|
|
228
|
+
* <i class="fa-solid fa-save"></i> Custom Title
|
|
229
|
+
* </mj-dialog-titlebar>
|
|
230
|
+
* <p>Dialog content</p>
|
|
231
|
+
* </mj-dialog>
|
|
232
|
+
* ```
|
|
233
|
+
*/
|
|
234
|
+
export class MJDialogTitlebarComponent {
|
|
235
|
+
static ɵfac = function MJDialogTitlebarComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJDialogTitlebarComponent)(); };
|
|
236
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJDialogTitlebarComponent, selectors: [["mj-dialog-titlebar"]], ngContentSelectors: _c2, decls: 1, vars: 0, template: function MJDialogTitlebarComponent_Template(rf, ctx) { if (rf & 1) {
|
|
237
|
+
i0.ɵɵprojectionDef();
|
|
238
|
+
i0.ɵɵprojection(0);
|
|
239
|
+
} }, encapsulation: 2 });
|
|
240
|
+
}
|
|
241
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJDialogTitlebarComponent, [{
|
|
242
|
+
type: Component,
|
|
243
|
+
args: [{
|
|
244
|
+
selector: 'mj-dialog-titlebar',
|
|
245
|
+
standalone: true,
|
|
246
|
+
template: `<ng-content></ng-content>`
|
|
247
|
+
}]
|
|
248
|
+
}], null, null); })();
|
|
249
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJDialogTitlebarComponent, { className: "MJDialogTitlebarComponent", filePath: "lib/dialog/dialog.component.ts", lineNumber: 184 }); })();
|
|
250
|
+
/**
|
|
251
|
+
* mj-dialog-actions — Footer action bar for mj-dialog.
|
|
252
|
+
*
|
|
253
|
+
* Replaces `<kendo-dialog-actions>`.
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* ```html
|
|
257
|
+
* <mj-dialog-actions>
|
|
258
|
+
* <button mjButton variant="primary">Save</button>
|
|
259
|
+
* <button mjButton>Cancel</button>
|
|
260
|
+
* </mj-dialog-actions>
|
|
261
|
+
* ```
|
|
262
|
+
*/
|
|
263
|
+
export class MJDialogActionsComponent {
|
|
264
|
+
static ɵfac = function MJDialogActionsComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJDialogActionsComponent)(); };
|
|
265
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJDialogActionsComponent, selectors: [["mj-dialog-actions"]], ngContentSelectors: _c2, decls: 2, vars: 0, consts: [[1, "mj-dialog-actions"]], template: function MJDialogActionsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
266
|
+
i0.ɵɵprojectionDef();
|
|
267
|
+
i0.ɵɵdomElementStart(0, "div", 0);
|
|
268
|
+
i0.ɵɵprojection(1);
|
|
269
|
+
i0.ɵɵdomElementEnd();
|
|
270
|
+
} }, encapsulation: 2 });
|
|
271
|
+
}
|
|
272
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJDialogActionsComponent, [{
|
|
273
|
+
type: Component,
|
|
274
|
+
args: [{
|
|
275
|
+
selector: 'mj-dialog-actions',
|
|
276
|
+
standalone: true,
|
|
277
|
+
template: `
|
|
278
|
+
<div class="mj-dialog-actions">
|
|
279
|
+
<ng-content></ng-content>
|
|
280
|
+
</div>
|
|
281
|
+
`
|
|
282
|
+
}]
|
|
283
|
+
}], null, null); })();
|
|
284
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJDialogActionsComponent, { className: "MJDialogActionsComponent", filePath: "lib/dialog/dialog.component.ts", lineNumber: 208 }); })();
|
|
285
|
+
//# sourceMappingURL=dialog.component.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.component.js","sourceRoot":"","sources":["../../../src/lib/dialog/dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,YAAY,EAMb,MAAM,eAAe,CAAC;;;;;IAmDP,gCAAiE;IAAA,YAAW;IAAA,oBAAK;;;IAArD,4DAAoC;IAAC,cAAW;IAAX,kCAAW;;;;IAI5E,oCAAmF;IAAnD,qNAAS,qBAAc,KAAC;IACtD,0BAAiC;IACnC,oBAAS;;;IARb,iCAAgC;IAC9B,8GAAa;IAGb,qBAAqD;IACrD,kHAAiB;IAKnB,oBAAM;;;IATJ,cAEC;IAFD,uCAEC;IAED,eAIC;IAJD,2CAIC;;;;IAtBT,iCAAkE;IAAlC,2LAAS,8BAAuB,KAAC;IAC/D,iCAQqC;IAAnC,wJAAS,wBAAwB,KAAC;IAGlC,iGAA0B;IAe1B,iCAA4B;IAC1B,kBAAyB;IAC3B,oBAAM;IAGN,qBAAoD;IAExD,AADE,oBAAM,EACF;;;IA7BF,cAA6B;IAG7B,AADA,AADA,AADA,6CAA6B,iCACE,qBACL,sBACC;;IAI3B,cAYC;IAZD,2DAYC;;;AAxDX,MAAM,QAAQ,GAAiC;IAC7C,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,MAAM;CACb,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AA4CH,MAAM,OAAO,iBAAiB;IACpB,QAAQ,GAAG,KAAK,CAAC;IACjB,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAE1B,IACI,OAAO,CAAC,KAAc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U,EAAE,IAAI;gBAChB,QAAQ,EAAE,2BAA2B;aACtC;;kFACY,yBAAyB;AAEtC;;;;;;;;;;;;GAYG;AAUH,MAAM,OAAO,wBAAwB;kHAAxB,wBAAwB;6DAAxB,wBAAwB;;YALjC,iCAA+B;YAC7B,kBAAyB;YAC3B,oBAAM;;;iFAGG,wBAAwB;cATpC,SAAS;eAAC;gBACT,QAAQ,EAAE,mBAAmB;gBAC7B,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE;;;;GAIT;aACF;;kFACY,wBAAwB","sourcesContent":["import {\n Component,\n Input,\n Output,\n EventEmitter,\n HostListener,\n ElementRef,\n ViewChild,\n AfterViewInit,\n OnDestroy,\n inject\n} from '@angular/core';\n\nexport type MjDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'auto';\n\nconst SIZE_MAP: Record<MjDialogSize, string> = {\n sm: '400px',\n md: '600px',\n lg: '800px',\n xl: '1000px',\n auto: 'auto'\n};\n\n/**\n * mj-dialog — Modal dialog component using native `<dialog>` element.\n *\n * Replaces `<kendo-dialog>`.\n *\n * Supports both explicit width/height and size presets.\n * Content is projected, with an optional `<mj-dialog-actions>` for the footer.\n *\n * @example\n * ```html\n * <mj-dialog [Visible]=\"showDialog\" Title=\"Confirm\" (Close)=\"onClose()\">\n * <p>Are you sure?</p>\n * <mj-dialog-actions>\n * <button mjButton variant=\"primary\" (click)=\"onConfirm()\">Yes</button>\n * <button mjButton (click)=\"onClose()\">No</button>\n * </mj-dialog-actions>\n * </mj-dialog>\n * ```\n */\n@Component({\n selector: 'mj-dialog',\n standalone: true,\n template: `\n @if (Visible) {\n <div class=\"mj-dialog-backdrop\" (click)=\"OnBackdropClick($event)\">\n <div class=\"mj-dialog-container\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-labelledby]=\"Title ? 'mj-dialog-title-' + dialogId : null\"\n [style.width]=\"resolvedWidth\"\n [style.height]=\"resolvedHeight\"\n [style.max-width]=\"'90vw'\"\n [style.max-height]=\"'90vh'\"\n (click)=\"$event.stopPropagation()\">\n\n <!-- Title bar -->\n @if (Title || Closeable) {\n <div class=\"mj-dialog-titlebar\">\n @if (Title) {\n <h2 class=\"mj-dialog-title\" [id]=\"'mj-dialog-title-' + dialogId\">{{ Title }}</h2>\n }\n <ng-content select=\"mj-dialog-titlebar\"></ng-content>\n @if (Closeable) {\n <button class=\"mj-dialog-close\" (click)=\"OnCloseClick()\" aria-label=\"Close dialog\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n </div>\n }\n\n <!-- Body -->\n <div class=\"mj-dialog-body\">\n <ng-content></ng-content>\n </div>\n\n <!-- Actions (projected) -->\n <ng-content select=\"mj-dialog-actions\"></ng-content>\n </div>\n </div>\n }\n `\n})\nexport class MJDialogComponent implements OnDestroy {\n private _visible = false;\n private static nextId = 0;\n\n @Input()\n set Visible(value: boolean) {\n const wasVisible = this._visible;\n this._visible = value;\n if (value && !wasVisible) {\n this.onOpen();\n }\n if (!value && wasVisible) {\n this.onCloseInternal();\n }\n }\n get Visible(): boolean {\n return this._visible;\n }\n\n @Input() Title = '';\n @Input() Width: number | string | null = null;\n @Input() Height: number | string | null = null;\n @Input() Size: MjDialogSize = 'auto';\n @Input() Closeable = true;\n @Input() MinWidth: number | null = null;\n\n @Output() Close = new EventEmitter<void>();\n\n DialogId = MJDialogComponent.nextId++;\n\n get dialogId(): number {\n return this.DialogId;\n }\n\n get resolvedWidth(): string {\n if (this.Width) {\n return typeof this.Width === 'number' ? `${this.Width}px` : this.Width;\n }\n return SIZE_MAP[this.Size] ?? 'auto';\n }\n\n get resolvedHeight(): string {\n if (this.Height) {\n return typeof this.Height === 'number' ? `${this.Height}px` : this.Height;\n }\n return 'auto';\n }\n\n @HostListener('document:keydown.escape')\n OnEscapeKey(): void {\n if (this.Visible && this.Closeable) {\n this.OnCloseClick();\n }\n }\n\n OnBackdropClick(event: Event): void {\n if (this.Closeable) {\n this.OnCloseClick();\n }\n }\n\n OnCloseClick(): void {\n this.Close.emit();\n }\n\n private onOpen(): void {\n document.body.style.overflow = 'hidden';\n }\n\n private onCloseInternal(): void {\n document.body.style.overflow = '';\n }\n\n ngOnDestroy(): void {\n document.body.style.overflow = '';\n }\n}\n\n/**\n * mj-dialog-titlebar — Custom titlebar content for mj-dialog.\n *\n * Replaces `<kendo-dialog-titlebar>`.\n *\n * @example\n * ```html\n * <mj-dialog [Visible]=\"show\" (Close)=\"onClose()\">\n * <mj-dialog-titlebar>\n * <i class=\"fa-solid fa-save\"></i> Custom Title\n * </mj-dialog-titlebar>\n * <p>Dialog content</p>\n * </mj-dialog>\n * ```\n */\n@Component({\n selector: 'mj-dialog-titlebar',\n standalone: true,\n template: `<ng-content></ng-content>`\n})\nexport class MJDialogTitlebarComponent {}\n\n/**\n * mj-dialog-actions — Footer action bar for mj-dialog.\n *\n * Replaces `<kendo-dialog-actions>`.\n *\n * @example\n * ```html\n * <mj-dialog-actions>\n * <button mjButton variant=\"primary\">Save</button>\n * <button mjButton>Cancel</button>\n * </mj-dialog-actions>\n * ```\n */\n@Component({\n selector: 'mj-dialog-actions',\n standalone: true,\n template: `\n <div class=\"mj-dialog-actions\">\n <ng-content></ng-content>\n </div>\n `\n})\nexport class MJDialogActionsComponent {}\n"]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MJ Dialog Styles
|
|
3
|
+
*
|
|
4
|
+
* Replaces Kendo dialog styling. Uses --mj-* semantic design tokens.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* ========== Backdrop ========== */
|
|
8
|
+
.mj-dialog-backdrop {
|
|
9
|
+
position: fixed;
|
|
10
|
+
inset: 0;
|
|
11
|
+
z-index: 1000;
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
background: rgba(0, 0, 0, 0.5);
|
|
16
|
+
animation: mj-dialog-fade-in var(--mj-transition-fast);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* ========== Container ========== */
|
|
20
|
+
.mj-dialog-container {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
background: var(--mj-bg-surface);
|
|
24
|
+
border-radius: var(--mj-radius-lg);
|
|
25
|
+
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
animation: mj-dialog-scale-in var(--mj-transition-base);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* ========== Title Bar ========== */
|
|
31
|
+
.mj-dialog-titlebar {
|
|
32
|
+
display: flex;
|
|
33
|
+
align-items: center;
|
|
34
|
+
justify-content: space-between;
|
|
35
|
+
padding: 16px 20px;
|
|
36
|
+
border-bottom: 1px solid var(--mj-border-default);
|
|
37
|
+
flex-shrink: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.mj-dialog-title {
|
|
41
|
+
margin: 0;
|
|
42
|
+
font-size: 1.125rem;
|
|
43
|
+
font-weight: var(--mj-font-semibold);
|
|
44
|
+
color: var(--mj-text-primary);
|
|
45
|
+
line-height: 1.4;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.mj-dialog-close {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
justify-content: center;
|
|
52
|
+
width: 32px;
|
|
53
|
+
height: 32px;
|
|
54
|
+
border: none;
|
|
55
|
+
background: none;
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
color: var(--mj-text-muted);
|
|
58
|
+
border-radius: var(--mj-radius-sm);
|
|
59
|
+
transition: var(--mj-transition-colors);
|
|
60
|
+
flex-shrink: 0;
|
|
61
|
+
margin-left: 12px;
|
|
62
|
+
|
|
63
|
+
&:hover {
|
|
64
|
+
background: var(--mj-bg-surface-hover);
|
|
65
|
+
color: var(--mj-text-primary);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:focus-visible {
|
|
69
|
+
outline: none;
|
|
70
|
+
box-shadow: var(--mj-focus-ring);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/* ========== Body ========== */
|
|
75
|
+
.mj-dialog-body {
|
|
76
|
+
flex: 1;
|
|
77
|
+
overflow-y: auto;
|
|
78
|
+
padding: 20px;
|
|
79
|
+
color: var(--mj-text-primary);
|
|
80
|
+
|
|
81
|
+
/* Inputs inside dialogs need contrast against the surface background */
|
|
82
|
+
.mj-input,
|
|
83
|
+
.mj-textarea,
|
|
84
|
+
.mj-numeric-input,
|
|
85
|
+
.mj-dropdown {
|
|
86
|
+
background: var(--mj-bg-surface-card);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/* ========== Actions ========== */
|
|
91
|
+
.mj-dialog-actions {
|
|
92
|
+
display: flex;
|
|
93
|
+
align-items: center;
|
|
94
|
+
gap: 8px;
|
|
95
|
+
padding: 16px 20px;
|
|
96
|
+
border-top: 1px solid var(--mj-border-default);
|
|
97
|
+
flex-shrink: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* ========== Animations ========== */
|
|
101
|
+
@keyframes mj-dialog-fade-in {
|
|
102
|
+
from { opacity: 0; }
|
|
103
|
+
to { opacity: 1; }
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
@keyframes mj-dialog-scale-in {
|
|
107
|
+
from {
|
|
108
|
+
opacity: 0;
|
|
109
|
+
transform: scale(0.95);
|
|
110
|
+
}
|
|
111
|
+
to {
|
|
112
|
+
opacity: 1;
|
|
113
|
+
transform: scale(1);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/* ========== Mobile ========== */
|
|
118
|
+
@media (max-width: 767px) {
|
|
119
|
+
.mj-dialog-container {
|
|
120
|
+
width: 100vw !important;
|
|
121
|
+
height: 100vh !important;
|
|
122
|
+
max-width: 100vw !important;
|
|
123
|
+
max-height: 100vh !important;
|
|
124
|
+
border-radius: 0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/* ========== Reduced Motion ========== */
|
|
129
|
+
@media (prefers-reduced-motion: reduce) {
|
|
130
|
+
.mj-dialog-backdrop,
|
|
131
|
+
.mj-dialog-container {
|
|
132
|
+
animation: none;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { ComponentRef, Type, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
/**
|
|
4
|
+
* Internal container component that wraps dialog content.
|
|
5
|
+
* This is dynamically created by MJDialogService.
|
|
6
|
+
*/
|
|
7
|
+
import { EventEmitter } from '@angular/core';
|
|
8
|
+
import * as i0 from "@angular/core";
|
|
9
|
+
/**
|
|
10
|
+
* Result returned when a dialog action button is clicked.
|
|
11
|
+
*/
|
|
12
|
+
export interface MJDialogAction {
|
|
13
|
+
text: string;
|
|
14
|
+
primary?: boolean;
|
|
15
|
+
themeColor?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Options for opening a dialog programmatically.
|
|
19
|
+
*/
|
|
20
|
+
export interface MJDialogSettings {
|
|
21
|
+
/** Dialog title */
|
|
22
|
+
title?: string;
|
|
23
|
+
/** Content: either a string message or a Component class */
|
|
24
|
+
content?: string | Type<unknown>;
|
|
25
|
+
/** Action buttons shown in the footer */
|
|
26
|
+
actions?: MJDialogAction[];
|
|
27
|
+
/** Dialog width in pixels */
|
|
28
|
+
width?: number;
|
|
29
|
+
/** Dialog minimum width in pixels */
|
|
30
|
+
minWidth?: number;
|
|
31
|
+
/** Dialog height in pixels */
|
|
32
|
+
height?: number;
|
|
33
|
+
/** ViewContainerRef to attach the dialog to (for proper DI context) */
|
|
34
|
+
appendTo?: ViewContainerRef;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Reference to an open dialog. Used to access content instance and subscribe to results.
|
|
38
|
+
*/
|
|
39
|
+
export declare class MJDialogRef {
|
|
40
|
+
private resultSubject;
|
|
41
|
+
private containerRef;
|
|
42
|
+
/** The content component instance (when content is a Component class) */
|
|
43
|
+
Content: {
|
|
44
|
+
instance: Record<string, unknown>;
|
|
45
|
+
} | null;
|
|
46
|
+
/** Observable that emits when the dialog is closed */
|
|
47
|
+
get Result(): Observable<unknown>;
|
|
48
|
+
/** @internal */
|
|
49
|
+
SetContainerRef(ref: ComponentRef<MJDialogContainerComponent>): void;
|
|
50
|
+
/** Close the dialog with a result */
|
|
51
|
+
Close(result?: unknown): void;
|
|
52
|
+
}
|
|
53
|
+
export declare class MJDialogContainerComponent {
|
|
54
|
+
Title: string;
|
|
55
|
+
StringContent: string;
|
|
56
|
+
Width: number | null;
|
|
57
|
+
MinWidth: number | null;
|
|
58
|
+
Height: number | null;
|
|
59
|
+
Actions: MJDialogAction[];
|
|
60
|
+
ActionClicked: EventEmitter<MJDialogAction>;
|
|
61
|
+
CloseClicked: EventEmitter<void>;
|
|
62
|
+
OnBackdropClick(): void;
|
|
63
|
+
OnCloseClick(): void;
|
|
64
|
+
OnActionClick(action: MJDialogAction): void;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJDialogContainerComponent, never>;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MJDialogContainerComponent, "mj-dialog-container-internal", never, { "Title": { "alias": "Title"; "required": false; }; "StringContent": { "alias": "StringContent"; "required": false; }; "Width": { "alias": "Width"; "required": false; }; "MinWidth": { "alias": "MinWidth"; "required": false; }; "Height": { "alias": "Height"; "required": false; }; "Actions": { "alias": "Actions"; "required": false; }; }, { "ActionClicked": "ActionClicked"; "CloseClicked": "CloseClicked"; }, never, never, true, never>;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* MJDialogService — Programmatic dialog opening. Replaces Kendo `DialogService`.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* // Simple confirm
|
|
74
|
+
* const dialogRef = this.dialogService.Open({
|
|
75
|
+
* title: 'Confirm',
|
|
76
|
+
* content: 'Are you sure?',
|
|
77
|
+
* actions: [
|
|
78
|
+
* { text: 'OK', primary: true },
|
|
79
|
+
* { text: 'Cancel' }
|
|
80
|
+
* ]
|
|
81
|
+
* });
|
|
82
|
+
* dialogRef.Result.subscribe(result => { ... });
|
|
83
|
+
*
|
|
84
|
+
* // Component content
|
|
85
|
+
* const dialogRef = this.dialogService.Open({
|
|
86
|
+
* content: MyDialogComponent,
|
|
87
|
+
* width: 500
|
|
88
|
+
* });
|
|
89
|
+
* dialogRef.Content.instance.someInput = 'value';
|
|
90
|
+
* dialogRef.Result.subscribe(result => { ... });
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare class MJDialogService {
|
|
94
|
+
private appRef;
|
|
95
|
+
private injector;
|
|
96
|
+
/**
|
|
97
|
+
* Open a dialog programmatically.
|
|
98
|
+
*
|
|
99
|
+
* Kendo-compatible API: accepts `content` as string or Component class,
|
|
100
|
+
* returns a ref with `.Content.instance` and `.Result` observable.
|
|
101
|
+
*/
|
|
102
|
+
Open(settings: MJDialogSettings): MJDialogRef;
|
|
103
|
+
private createContainer;
|
|
104
|
+
private configureContainer;
|
|
105
|
+
private attachToDOM;
|
|
106
|
+
private attachContentComponent;
|
|
107
|
+
/**
|
|
108
|
+
* Kendo-compatible alias — lowercase `open` for easier migration.
|
|
109
|
+
*/
|
|
110
|
+
open(settings: MJDialogSettings): MJDialogRef;
|
|
111
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MJDialogService, never>;
|
|
112
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MJDialogService>;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=dialog.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.service.d.ts","sourceRoot":"","sources":["../../../src/lib/dialog/dialog.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAKjB,MAAM,e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