@memberjunction/ng-ui-components 6.1.4 → 6.2.0-edge.1

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 (81) hide show
  1. package/README.md +35 -9
  2. package/dist/lib/a11y/named-control.base.d.ts +91 -0
  3. package/dist/lib/a11y/named-control.base.d.ts.map +1 -0
  4. package/dist/lib/a11y/named-control.base.js +121 -0
  5. package/dist/lib/a11y/named-control.base.js.map +1 -0
  6. package/dist/lib/a11y/unnamed-control-guard.d.ts +52 -0
  7. package/dist/lib/a11y/unnamed-control-guard.d.ts.map +1 -0
  8. package/dist/lib/a11y/unnamed-control-guard.js +94 -0
  9. package/dist/lib/a11y/unnamed-control-guard.js.map +1 -0
  10. package/dist/lib/accordion/accordion.component.d.ts +16 -4
  11. package/dist/lib/accordion/accordion.component.d.ts.map +1 -1
  12. package/dist/lib/accordion/accordion.component.js +36 -12
  13. package/dist/lib/accordion/accordion.component.js.map +1 -1
  14. package/dist/lib/applied-filters/applied-filters.component.js.map +1 -1
  15. package/dist/lib/button/button.directive.d.ts +34 -6
  16. package/dist/lib/button/button.directive.d.ts.map +1 -1
  17. package/dist/lib/button/button.directive.js +85 -25
  18. package/dist/lib/button/button.directive.js.map +1 -1
  19. package/dist/lib/card-grid/card-grid.component.d.ts +3 -1
  20. package/dist/lib/card-grid/card-grid.component.d.ts.map +1 -1
  21. package/dist/lib/card-grid/card-grid.component.js +13 -9
  22. package/dist/lib/card-grid/card-grid.component.js.map +1 -1
  23. package/dist/lib/clickable/clickable.directive.d.ts +11 -3
  24. package/dist/lib/clickable/clickable.directive.d.ts.map +1 -1
  25. package/dist/lib/clickable/clickable.directive.js +25 -5
  26. package/dist/lib/clickable/clickable.directive.js.map +1 -1
  27. package/dist/lib/combobox/combobox.component.d.ts +44 -3
  28. package/dist/lib/combobox/combobox.component.d.ts.map +1 -1
  29. package/dist/lib/combobox/combobox.component.js +135 -51
  30. package/dist/lib/combobox/combobox.component.js.map +1 -1
  31. package/dist/lib/confirm-dialog/confirm-dialog.component.d.ts +6 -0
  32. package/dist/lib/confirm-dialog/confirm-dialog.component.d.ts.map +1 -1
  33. package/dist/lib/confirm-dialog/confirm-dialog.component.js +16 -4
  34. package/dist/lib/confirm-dialog/confirm-dialog.component.js.map +1 -1
  35. package/dist/lib/datepicker/datepicker.component.d.ts +25 -2
  36. package/dist/lib/datepicker/datepicker.component.d.ts.map +1 -1
  37. package/dist/lib/datepicker/datepicker.component.js +98 -42
  38. package/dist/lib/datepicker/datepicker.component.js.map +1 -1
  39. package/dist/lib/dialog/dialog.component.d.ts +4 -0
  40. package/dist/lib/dialog/dialog.component.d.ts.map +1 -1
  41. package/dist/lib/dialog/dialog.component.js +12 -4
  42. package/dist/lib/dialog/dialog.component.js.map +1 -1
  43. package/dist/lib/dialog/dialog.service.js.map +1 -1
  44. package/dist/lib/dropdown/dropdown.component.d.ts +19 -44
  45. package/dist/lib/dropdown/dropdown.component.d.ts.map +1 -1
  46. package/dist/lib/dropdown/dropdown.component.js +37 -76
  47. package/dist/lib/dropdown/dropdown.component.js.map +1 -1
  48. package/dist/lib/dropdown/dropdown.scss +0 -16
  49. package/dist/lib/filter-panel/filter-panel.component.d.ts +8 -0
  50. package/dist/lib/filter-panel/filter-panel.component.d.ts.map +1 -1
  51. package/dist/lib/filter-panel/filter-panel.component.js +25 -9
  52. package/dist/lib/filter-panel/filter-panel.component.js.map +1 -1
  53. package/dist/lib/numeric-input/numeric-input.component.d.ts +15 -1
  54. package/dist/lib/numeric-input/numeric-input.component.d.ts.map +1 -1
  55. package/dist/lib/numeric-input/numeric-input.component.js +36 -9
  56. package/dist/lib/numeric-input/numeric-input.component.js.map +1 -1
  57. package/dist/lib/page-search/page-search.component.d.ts +32 -3
  58. package/dist/lib/page-search/page-search.component.d.ts.map +1 -1
  59. package/dist/lib/page-search/page-search.component.js +68 -12
  60. package/dist/lib/page-search/page-search.component.js.map +1 -1
  61. package/dist/lib/switch/switch.component.d.ts +22 -1
  62. package/dist/lib/switch/switch.component.d.ts.map +1 -1
  63. package/dist/lib/switch/switch.component.js +50 -16
  64. package/dist/lib/switch/switch.component.js.map +1 -1
  65. package/dist/lib/tabs/tab-chrome-guard.d.ts +2 -0
  66. package/dist/lib/tabs/tab-chrome-guard.d.ts.map +1 -1
  67. package/dist/lib/tabs/tab-chrome-guard.js +5 -1
  68. package/dist/lib/tabs/tab-chrome-guard.js.map +1 -1
  69. package/dist/lib/window/window.component.d.ts +10 -0
  70. package/dist/lib/window/window.component.d.ts.map +1 -1
  71. package/dist/lib/window/window.component.js +27 -7
  72. package/dist/lib/window/window.component.js.map +1 -1
  73. package/dist/lib/workspace-tabs/workspace-tab-strip.component.d.ts +10 -0
  74. package/dist/lib/workspace-tabs/workspace-tab-strip.component.d.ts.map +1 -1
  75. package/dist/lib/workspace-tabs/workspace-tab-strip.component.js +27 -7
  76. package/dist/lib/workspace-tabs/workspace-tab-strip.component.js.map +1 -1
  77. package/dist/public-api.d.ts +2 -0
  78. package/dist/public-api.d.ts.map +1 -1
  79. package/dist/public-api.js +2 -0
  80. package/dist/public-api.js.map +1 -1
  81. package/package.json +2 -2
@@ -1,8 +1,11 @@
1
- import { Component, Input, forwardRef, HostBinding, ChangeDetectorRef, inject } from '@angular/core';
1
+ import { ChangeDetectorRef, Component, HostBinding, Input, ViewChild, forwardRef, inject } from '@angular/core';
2
2
  import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { MJNamedControlBase } from '../a11y/named-control.base';
4
+ import { WarnIfUnnamed } from '../a11y/unnamed-control-guard';
3
5
  import * as i0 from "@angular/core";
4
- function MJSwitchComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
5
- i0.ɵɵdomElementStart(0, "span", 3);
6
+ const _c0 = ["switchButton"];
7
+ function MJSwitchComponent_Conditional_4_Template(rf, ctx) { if (rf & 1) {
8
+ i0.ɵɵdomElementStart(0, "span", 4);
6
9
  i0.ɵɵtext(1);
7
10
  i0.ɵɵdomElementEnd();
8
11
  } if (rf & 2) {
@@ -12,8 +15,25 @@ function MJSwitchComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
12
15
  } }
13
16
  /**
14
17
  * mj-switch — Toggle switch. Replaces `<kendo-switch>`.
18
+ *
19
+ * Every switch needs an ACCESSIBLE NAME. Without one it announces as "switch, on" — or, worse, as
20
+ * its own STATE, because `OnLabel`/`OffLabel` render inside the button and a `role=switch` takes
21
+ * its name from its contents when nothing else names it: a toggle labelled "On" that announces
22
+ * "On, switch, on" says nothing about what it toggles (WCAG 2.1 4.1.2). Use
23
+ * {@link MJNamedControlBase.AriaLabelledBy} when a visible label exists,
24
+ * {@link MJNamedControlBase.AriaLabel} when none does; either one overrides that state text.
25
+ *
26
+ * The switch is a `<button>`, which IS a labelable element, so
27
+ * {@link MJNamedControlBase.InputId} doubles as a `<label for>` target: the label names the switch
28
+ * — overriding the On/Off text, since an associated label outranks an element's own contents — and
29
+ * clicking it focuses and toggles the switch, which `AriaLabelledBy` alone does not give you.
30
+ *
31
+ * @example
32
+ * ```html
33
+ * <mj-switch AriaLabel="Email notifications" [(ngModel)]="isEnabled" OnLabel="On" OffLabel="Off" />
34
+ * ```
15
35
  */
16
- export class MJSwitchComponent {
36
+ export class MJSwitchComponent extends MJNamedControlBase {
17
37
  OnLabel = '';
18
38
  OffLabel = '';
19
39
  /**
@@ -25,6 +45,7 @@ export class MJSwitchComponent {
25
45
  set Disabled(value) { this.disabledInput = value; this.syncDisabled(); }
26
46
  get Disabled() { return this.disabledInput; }
27
47
  hostClass = true;
48
+ switchButtonEl;
28
49
  Value = false;
29
50
  /** The gate on `Toggle()` — true when EITHER source says so. Assign only via `syncDisabled()`. */
30
51
  IsDisabled = false;
@@ -49,6 +70,7 @@ export class MJSwitchComponent {
49
70
  this.IsDisabled = disabled;
50
71
  this.cdr.markForCheck();
51
72
  }
73
+ ngAfterViewInit() { WarnIfUnnamed(this.switchButtonEl?.nativeElement, 'mj-switch'); }
52
74
  Toggle() { if (!this.IsDisabled) {
53
75
  this.Value = !this.Value;
54
76
  this.onChange(this.Value);
@@ -58,23 +80,28 @@ export class MJSwitchComponent {
58
80
  registerOnChange(fn) { this.onChange = fn; }
59
81
  registerOnTouched(fn) { this.onTouched = fn; }
60
82
  setDisabledState(isDisabled) { this.formDisabled = isDisabled; this.syncDisabled(); }
61
- static ɵfac = function MJSwitchComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJSwitchComponent)(); };
62
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJSwitchComponent, selectors: [["mj-switch"]], hostVars: 2, hostBindings: function MJSwitchComponent_HostBindings(rf, ctx) { if (rf & 2) {
83
+ static ɵfac = /*@__PURE__*/ (() => { let ɵMJSwitchComponent_BaseFactory; return function MJSwitchComponent_Factory(__ngFactoryType__) { return (ɵMJSwitchComponent_BaseFactory || (ɵMJSwitchComponent_BaseFactory = i0.ɵɵgetInheritedFactory(MJSwitchComponent)))(__ngFactoryType__ || MJSwitchComponent); }; })();
84
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJSwitchComponent, selectors: [["mj-switch"]], viewQuery: function MJSwitchComponent_Query(rf, ctx) { if (rf & 1) {
85
+ i0.ɵɵviewQuery(_c0, 5);
86
+ } if (rf & 2) {
87
+ let _t;
88
+ i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.switchButtonEl = _t.first);
89
+ } }, hostVars: 2, hostBindings: function MJSwitchComponent_HostBindings(rf, ctx) { if (rf & 2) {
63
90
  i0.ɵɵclassProp("mj-switch-host", ctx.hostClass);
64
- } }, inputs: { OnLabel: "OnLabel", OffLabel: "OffLabel", Disabled: "Disabled" }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJSwitchComponent), multi: true }])], decls: 4, vars: 7, consts: [["type", "button", "role", "switch", 1, "mj-switch", 3, "click", "blur", "disabled"], [1, "mj-switch-track"], [1, "mj-switch-thumb"], [1, "mj-switch-label"]], template: function MJSwitchComponent_Template(rf, ctx) { if (rf & 1) {
65
- i0.ɵɵdomElementStart(0, "button", 0);
91
+ } }, inputs: { OnLabel: "OnLabel", OffLabel: "OffLabel", Disabled: "Disabled" }, features: [i0.ɵɵProvidersFeature([{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJSwitchComponent), multi: true }]), i0.ɵɵInheritDefinitionFeature], decls: 5, vars: 11, consts: [["switchButton", ""], ["type", "button", "role", "switch", 1, "mj-switch", 3, "click", "blur", "disabled"], [1, "mj-switch-track"], [1, "mj-switch-thumb"], [1, "mj-switch-label"]], template: function MJSwitchComponent_Template(rf, ctx) { if (rf & 1) {
92
+ i0.ɵɵdomElementStart(0, "button", 1, 0);
66
93
  i0.ɵɵdomListener("click", function MJSwitchComponent_Template_button_click_0_listener() { return ctx.Toggle(); })("blur", function MJSwitchComponent_Template_button_blur_0_listener() { return ctx.OnTouched(); });
67
- i0.ɵɵdomElementStart(1, "span", 1);
68
- i0.ɵɵdomElement(2, "span", 2);
94
+ i0.ɵɵdomElementStart(2, "span", 2);
95
+ i0.ɵɵdomElement(3, "span", 3);
69
96
  i0.ɵɵdomElementEnd();
70
- i0.ɵɵconditionalCreate(3, MJSwitchComponent_Conditional_3_Template, 2, 1, "span", 3);
97
+ i0.ɵɵconditionalCreate(4, MJSwitchComponent_Conditional_4_Template, 2, 1, "span", 4);
71
98
  i0.ɵɵdomElementEnd();
72
99
  } if (rf & 2) {
73
100
  i0.ɵɵclassProp("mj-switch--on", ctx.Value)("mj-switch--disabled", ctx.IsDisabled);
74
101
  i0.ɵɵdomProperty("disabled", ctx.IsDisabled);
75
- i0.ɵɵattribute("aria-checked", ctx.Value);
76
- i0.ɵɵadvance(3);
77
- i0.ɵɵconditional(ctx.OnLabel || ctx.OffLabel ? 3 : -1);
102
+ i0.ɵɵattribute("id", ctx.InputId || null)("aria-label", ctx.AriaLabel || null)("aria-labelledby", ctx.AriaLabelledBy || null)("aria-describedby", ctx.AriaDescribedBy || null)("aria-checked", ctx.Value);
103
+ i0.ɵɵadvance(4);
104
+ i0.ɵɵconditional(ctx.OnLabel || ctx.OffLabel ? 4 : -1);
78
105
  } }, encapsulation: 2 });
79
106
  }
80
107
  (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MJSwitchComponent, [{
@@ -83,8 +110,12 @@ export class MJSwitchComponent {
83
110
  selector: 'mj-switch',
84
111
  standalone: true,
85
112
  template: `
86
- <button type="button" role="switch" class="mj-switch"
113
+ <button #switchButton type="button" role="switch" class="mj-switch"
87
114
  [class.mj-switch--on]="Value" [class.mj-switch--disabled]="IsDisabled"
115
+ [attr.id]="InputId || null"
116
+ [attr.aria-label]="AriaLabel || null"
117
+ [attr.aria-labelledby]="AriaLabelledBy || null"
118
+ [attr.aria-describedby]="AriaDescribedBy || null"
88
119
  [attr.aria-checked]="Value" [disabled]="IsDisabled"
89
120
  (click)="Toggle()" (blur)="OnTouched()">
90
121
  <span class="mj-switch-track"><span class="mj-switch-thumb"></span></span>
@@ -104,6 +135,9 @@ export class MJSwitchComponent {
104
135
  }], hostClass: [{
105
136
  type: HostBinding,
106
137
  args: ['class.mj-switch-host']
138
+ }], switchButtonEl: [{
139
+ type: ViewChild,
140
+ args: ['switchButton']
107
141
  }] }); })();
108
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJSwitchComponent, { className: "MJSwitchComponent", filePath: "lib/switch/switch.component.ts", lineNumber: 23 }); })();
142
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJSwitchComponent, { className: "MJSwitchComponent", filePath: "lib/switch/switch.component.ts", lineNumber: 56 }); })();
109
143
  //# sourceMappingURL=switch.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.component.js","sourceRoot":"","sources":["../../../src/lib/switch/switch.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,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BAGL,WAAW;mBAAC,sBAAsB;;kFAZxB,iBAAiB","sourcesContent":["import { Component, Input, forwardRef, HostBinding, ChangeDetectorRef, inject } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\n\n/**\n * mj-switch — Toggle switch. Replaces `<kendo-switch>`.\n */\n@Component({\n selector: 'mj-switch',\n standalone: true,\n template: `\n <button type=\"button\" role=\"switch\" class=\"mj-switch\"\n [class.mj-switch--on]=\"Value\" [class.mj-switch--disabled]=\"IsDisabled\"\n [attr.aria-checked]=\"Value\" [disabled]=\"IsDisabled\"\n (click)=\"Toggle()\" (blur)=\"OnTouched()\">\n <span class=\"mj-switch-track\"><span class=\"mj-switch-thumb\"></span></span>\n @if (OnLabel || OffLabel) {\n <span class=\"mj-switch-label\">{{ Value ? OnLabel : OffLabel }}</span>\n }\n </button>\n `,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJSwitchComponent), multi: true }]\n})\nexport class MJSwitchComponent implements ControlValueAccessor {\n @Input() OnLabel = '';\n @Input() OffLabel = '';\n /**\n * Host-driven disable. Composed with Angular Forms' `setDisabledState()` into `IsDisabled`\n * (the actual gate) — see `syncDisabled`. A setter, not a bare field, because this input is\n * routinely bound to an expression that changes over the control's lifetime, and the gate has\n * to follow it every time.\n */\n @Input()\n set Disabled(value: boolean) { this.disabledInput = value; this.syncDisabled(); }\n get Disabled(): boolean { return this.disabledInput; }\n @HostBinding('class.mj-switch-host') readonly hostClass = true;\n\n Value = false;\n /** The gate on `Toggle()` — true when EITHER source says so. Assign only via `syncDisabled()`. */\n IsDisabled = false;\n private disabledInput = false;\n private formDisabled = false;\n private cdr = inject(ChangeDetectorRef);\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n\n /**\n * Recompute the gate from both of its sources. Called whenever either one changes.\n *\n * `IsDisabled` is derived state, and the only thing that assigned it was `setDisabledState()`.\n * The forms-driven half was in fact fine — `setUpControl` also wires `registerOnDisabledChange`,\n * so that hook fires on every `control.disable()`/`enable()`, not just at registration. What had\n * no recompute path at all was the `Disabled` @Input: a plain field, so the gate froze at\n * whatever the first compose produced and every later change to the input was dropped.\n */\n private syncDisabled(): void {\n const disabled = this.disabledInput || this.formDisabled;\n if (disabled === this.IsDisabled) return;\n this.IsDisabled = disabled;\n this.cdr.markForCheck();\n }\n\n Toggle(): void { if (!this.IsDisabled) { this.Value = !this.Value; this.onChange(this.Value); } }\n OnTouched(): void { this.onTouched(); }\n writeValue(value: boolean): void { this.Value = !!value; }\n registerOnChange(fn: (value: boolean) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.formDisabled = isDisabled; this.syncDisabled(); }\n}\n"]}
1
+ {"version":3,"file":"switch.component.js","sourceRoot":"","sources":["../../../src/lib/switch/switch.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,iBAAiB,EACjB,SAAS,EAET,WAAW,EACX,KAAK,EACL,SAAS,EACT,UAAU,EACV,MAAM,EACP,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;IAoCtD,kCAA8B;IAAA,YAAgC;IAAA,oBAAO;;;IAAvC,cAAgC;IAAhC,qEAAgC;;AAlCtE;;;;;;;;;;;;;;;;;;;GAmBG;AAqBH,MAAM,OAAO,iBAAkB,SAAQ,kBAAkB;IAC9C,OAAO,GAAG,EAAE,CAAC;IACb,QAAQ,GAAG,EAAE,CAAC;IACvB;;;;;OAKG;IACH,IACI,QAAQ,CAAC,KAAc,IAAI,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IACjF,IAAI,QAAQ,KAAc,OAAO,IAAI,CA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C,CAAC,CAAC;IAChE,gBAAgB,CAAC,UAAmB,IAAU,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;iPA/CzF,iBAAiB,yBAAjB,iBAAiB;6DAAjB,iBAAiB;;;;;;YAAjB,+CAAiB;0HAFjB,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,CAAC,iBAAiB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;YAdxG,uCAO0C;YAArB,AAAnB,iGAAS,YAAQ,IAAC,+EAAS,eAAW,IAAC;YACvC,kCAA8B;YAAA,6BAAqC;YAAA,oBAAO;YAC1E,oFAA2B;YAG7B,oBAAS;;YAXuB,AAA9B,0CAA6B,uCAAyC;YAK1C,4CAAuB;;YAGnD,eAEC;YAFD,sDAEC;;;iFAKM,iBAAiB;cApB7B,SAAS;eAAC;gBACT,QAAQ,EAAE,WAAW;gBACrB,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE;;;;;;;;;;;;;;GAcT;gBACD,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,kBAAkB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;aAC3G;;kBAEE,KAAK;;kBACL,KAAK;;kBAOL,KAAK;;kBAGL,WAAW;mBAAC,sBAAsB;;kBAClC,SAAS;mBAAC,cAAc;;kFAbd,iBAAiB","sourcesContent":["import {\n AfterViewInit,\n ChangeDetectorRef,\n Component,\n ElementRef,\n HostBinding,\n Input,\n ViewChild,\n forwardRef,\n inject\n} from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { MJNamedControlBase } from '../a11y/named-control.base';\nimport { WarnIfUnnamed } from '../a11y/unnamed-control-guard';\n\n/**\n * mj-switch — Toggle switch. Replaces `<kendo-switch>`.\n *\n * Every switch needs an ACCESSIBLE NAME. Without one it announces as \"switch, on\" — or, worse, as\n * its own STATE, because `OnLabel`/`OffLabel` render inside the button and a `role=switch` takes\n * its name from its contents when nothing else names it: a toggle labelled \"On\" that announces\n * \"On, switch, on\" says nothing about what it toggles (WCAG 2.1 4.1.2). Use\n * {@link MJNamedControlBase.AriaLabelledBy} when a visible label exists,\n * {@link MJNamedControlBase.AriaLabel} when none does; either one overrides that state text.\n *\n * The switch is a `<button>`, which IS a labelable element, so\n * {@link MJNamedControlBase.InputId} doubles as a `<label for>` target: the label names the switch\n * — overriding the On/Off text, since an associated label outranks an element's own contents — and\n * clicking it focuses and toggles the switch, which `AriaLabelledBy` alone does not give you.\n *\n * @example\n * ```html\n * <mj-switch AriaLabel=\"Email notifications\" [(ngModel)]=\"isEnabled\" OnLabel=\"On\" OffLabel=\"Off\" />\n * ```\n */\n@Component({\n selector: 'mj-switch',\n standalone: true,\n template: `\n <button #switchButton type=\"button\" role=\"switch\" class=\"mj-switch\"\n [class.mj-switch--on]=\"Value\" [class.mj-switch--disabled]=\"IsDisabled\"\n [attr.id]=\"InputId || null\"\n [attr.aria-label]=\"AriaLabel || null\"\n [attr.aria-labelledby]=\"AriaLabelledBy || null\"\n [attr.aria-describedby]=\"AriaDescribedBy || null\"\n [attr.aria-checked]=\"Value\" [disabled]=\"IsDisabled\"\n (click)=\"Toggle()\" (blur)=\"OnTouched()\">\n <span class=\"mj-switch-track\"><span class=\"mj-switch-thumb\"></span></span>\n @if (OnLabel || OffLabel) {\n <span class=\"mj-switch-label\">{{ Value ? OnLabel : OffLabel }}</span>\n }\n </button>\n `,\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJSwitchComponent), multi: true }]\n})\nexport class MJSwitchComponent extends MJNamedControlBase implements ControlValueAccessor, AfterViewInit {\n @Input() OnLabel = '';\n @Input() OffLabel = '';\n /**\n * Host-driven disable. Composed with Angular Forms' `setDisabledState()` into `IsDisabled`\n * (the actual gate) — see `syncDisabled`. A setter, not a bare field, because this input is\n * routinely bound to an expression that changes over the control's lifetime, and the gate has\n * to follow it every time.\n */\n @Input()\n set Disabled(value: boolean) { this.disabledInput = value; this.syncDisabled(); }\n get Disabled(): boolean { return this.disabledInput; }\n @HostBinding('class.mj-switch-host') readonly hostClass = true;\n @ViewChild('switchButton') private switchButtonEl: ElementRef<HTMLButtonElement> | undefined;\n\n Value = false;\n /** The gate on `Toggle()` — true when EITHER source says so. Assign only via `syncDisabled()`. */\n IsDisabled = false;\n private disabledInput = false;\n private formDisabled = false;\n private cdr = inject(ChangeDetectorRef);\n private onChange: (value: boolean) => void = () => {};\n private onTouched: () => void = () => {};\n\n /**\n * Recompute the gate from both of its sources. Called whenever either one changes.\n *\n * `IsDisabled` is derived state, and the only thing that assigned it was `setDisabledState()`.\n * The forms-driven half was in fact fine — `setUpControl` also wires `registerOnDisabledChange`,\n * so that hook fires on every `control.disable()`/`enable()`, not just at registration. What had\n * no recompute path at all was the `Disabled` @Input: a plain field, so the gate froze at\n * whatever the first compose produced and every later change to the input was dropped.\n */\n private syncDisabled(): void {\n const disabled = this.disabledInput || this.formDisabled;\n if (disabled === this.IsDisabled) return;\n this.IsDisabled = disabled;\n this.cdr.markForCheck();\n }\n\n ngAfterViewInit(): void { WarnIfUnnamed(this.switchButtonEl?.nativeElement, 'mj-switch'); }\n\n Toggle(): void { if (!this.IsDisabled) { this.Value = !this.Value; this.onChange(this.Value); } }\n OnTouched(): void { this.onTouched(); }\n writeValue(value: boolean): void { this.Value = !!value; }\n registerOnChange(fn: (value: boolean) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.formDisabled = isDisabled; this.syncDisabled(); }\n}\n"]}
@@ -10,5 +10,7 @@
10
10
  *
11
11
  * Called by BOTH strips (`mj-tabstrip` and `mj-workspace-tab-strip`) after view init.
12
12
  */
13
+ export declare function WarnIfTabChromeMissing(element: HTMLElement | null | undefined): void;
14
+ /** @deprecated Use {@link WarnIfTabChromeMissing}. */
13
15
  export declare function warnIfTabChromeMissing(element: HTMLElement | null | undefined): void;
14
16
  //# sourceMappingURL=tab-chrome-guard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-chrome-guard.d.ts","sourceRoot":"","sources":["../../../src/lib/tabs/tab-chrome-guard.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAmBpF"}
1
+ {"version":3,"file":"tab-chrome-guard.d.ts","sourceRoot":"","sources":["../../../src/lib/tabs/tab-chrome-guard.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;GAWG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAmBpF;AAED,sDAAsD;AACtD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAEpF"}
@@ -13,7 +13,7 @@ let warned = false;
13
13
  *
14
14
  * Called by BOTH strips (`mj-tabstrip` and `mj-workspace-tab-strip`) after view init.
15
15
  */
16
- export function warnIfTabChromeMissing(element) {
16
+ export function WarnIfTabChromeMissing(element) {
17
17
  if (warned || !isDevMode() || !element || typeof getComputedStyle !== 'function') {
18
18
  return;
19
19
  }
@@ -33,4 +33,8 @@ export function warnIfTabChromeMissing(element) {
33
33
  // Never let diagnostics break the strip.
34
34
  }
35
35
  }
36
+ /** @deprecated Use {@link WarnIfTabChromeMissing}. */
37
+ export function warnIfTabChromeMissing(element) {
38
+ return WarnIfTabChromeMissing(element);
39
+ }
36
40
  //# sourceMappingURL=tab-chrome-guard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tab-chrome-guard.js","sourceRoot":"","sources":["../../../src/lib/tabs/tab-chrome-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,uFAAuF;AACvF,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAuC;IAC5E,IAAI,MAAM,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE,CAAC;QACjF,OAAO;IACT,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAc,UAAU,CAAC,CAAC;QAChH,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YACjF,MAAM,GAAG,IAAI,CAAC;YACd,OAAO,CAAC,IAAI,CACV,gGAAgG;gBAChG,wCAAwC;gBACxC,oEAAoE;gBACpE,sFAAsF,CACvF,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,yCAAyC;IAC3C,CAAC;AACH,CAAC","sourcesContent":["import { isDevMode } from '@angular/core';\n\n/** Warn once per application, not once per strip — the fix is app-level either way. */\nlet warned = false;\n\n/**\n * Dev-mode guard for the tab chrome's one genuine failure mode: the `.mj-tabs*` styles live in a\n * GLOBAL stylesheet (`@memberjunction/ng-ui-components/dist/lib/tabs/tabs.scss`), and a standalone\n * host that forgets the import gets structurally-working but completely unstyled strips — bare divs,\n * silently, with no error anywhere. This turns that silence into an actionable console warning.\n *\n * Detection: `tabs.scss` sets `--mj-tabs-chrome-loaded: 1` on `.mj-tabs`. If the computed value is\n * absent on a rendered strip, the sheet isn't in the page. Dev-mode only, once per app, and never\n * throws — a missing stylesheet must not take the component down with it.\n *\n * Called by BOTH strips (`mj-tabstrip` and `mj-workspace-tab-strip`) after view init.\n */\nexport function warnIfTabChromeMissing(element: HTMLElement | null | undefined): void {\n if (warned || !isDevMode() || !element || typeof getComputedStyle !== 'function') {\n return;\n }\n try {\n const target = element.classList.contains('mj-tabs') ? element : element.querySelector<HTMLElement>('.mj-tabs');\n if (!target) return;\n if (!getComputedStyle(target).getPropertyValue('--mj-tabs-chrome-loaded').trim()) {\n warned = true;\n console.warn(\n \"[MJ tabs] The shared tab chrome stylesheet is not loaded, so tab strips will render unstyled. \" +\n \"Add to your app's global stylesheet:\\n\" +\n \" @import '@memberjunction/ng-ui-components/dist/lib/tabs/tabs';\\n\" +\n \"(Apps on the MJ Explorer shell get this via ng-explorer-app's styles automatically.)\"\n );\n }\n } catch {\n // Never let diagnostics break the strip.\n }\n}\n"]}
1
+ {"version":3,"file":"tab-chrome-guard.js","sourceRoot":"","sources":["../../../src/lib/tabs/tab-chrome-guard.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,uFAAuF;AACvF,IAAI,MAAM,GAAG,KAAK,CAAC;AAEnB;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAuC;IAC5E,IAAI,MAAM,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,IAAI,OAAO,gBAAgB,KAAK,UAAU,EAAE,CAAC;QACjF,OAAO;IACT,CAAC;IACD,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,aAAa,CAAc,UAAU,CAAC,CAAC;QAChH,IAAI,CAAC,MAAM;YAAE,OAAO;QACpB,IAAI,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,gBAAgB,CAAC,yBAAyB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;YACjF,MAAM,GAAG,IAAI,CAAC;YACd,OAAO,CAAC,IAAI,CACV,gGAAgG;gBAChG,wCAAwC;gBACxC,oEAAoE;gBACpE,sFAAsF,CACvF,CAAC;QACJ,CAAC;IACH,CAAC;IAAC,MAAM,CAAC;QACP,yCAAyC;IAC3C,CAAC;AACH,CAAC;AAED,sDAAsD;AACtD,MAAM,UAAU,sBAAsB,CAAC,OAAuC;IAC5E,OAAO,sBAAsB,CAAC,OAAO,CAAC,CAAC;AACzC,CAAC","sourcesContent":["import { isDevMode } from '@angular/core';\n\n/** Warn once per application, not once per strip — the fix is app-level either way. */\nlet warned = false;\n\n/**\n * Dev-mode guard for the tab chrome's one genuine failure mode: the `.mj-tabs*` styles live in a\n * GLOBAL stylesheet (`@memberjunction/ng-ui-components/dist/lib/tabs/tabs.scss`), and a standalone\n * host that forgets the import gets structurally-working but completely unstyled strips — bare divs,\n * silently, with no error anywhere. This turns that silence into an actionable console warning.\n *\n * Detection: `tabs.scss` sets `--mj-tabs-chrome-loaded: 1` on `.mj-tabs`. If the computed value is\n * absent on a rendered strip, the sheet isn't in the page. Dev-mode only, once per app, and never\n * throws — a missing stylesheet must not take the component down with it.\n *\n * Called by BOTH strips (`mj-tabstrip` and `mj-workspace-tab-strip`) after view init.\n */\nexport function WarnIfTabChromeMissing(element: HTMLElement | null | undefined): void {\n if (warned || !isDevMode() || !element || typeof getComputedStyle !== 'function') {\n return;\n }\n try {\n const target = element.classList.contains('mj-tabs') ? element : element.querySelector<HTMLElement>('.mj-tabs');\n if (!target) return;\n if (!getComputedStyle(target).getPropertyValue('--mj-tabs-chrome-loaded').trim()) {\n warned = true;\n console.warn(\n \"[MJ tabs] The shared tab chrome stylesheet is not loaded, so tab strips will render unstyled. \" +\n \"Add to your app's global stylesheet:\\n\" +\n \" @import '@memberjunction/ng-ui-components/dist/lib/tabs/tabs';\\n\" +\n \"(Apps on the MJ Explorer shell get this via ng-explorer-app's styles automatically.)\"\n );\n }\n } catch {\n // Never let diagnostics break the strip.\n }\n}\n\n/** @deprecated Use {@link WarnIfTabChromeMissing}. */\nexport function warnIfTabChromeMissing(element: HTMLElement | null | undefined): void {\n return WarnIfTabChromeMissing(element);\n}\n"]}
@@ -71,11 +71,21 @@ export declare class MJWindowComponent implements OnDestroy {
71
71
  private elementRef;
72
72
  private cdr;
73
73
  private ngZone;
74
+ get HasExplicitPosition(): boolean;
75
+ /** @deprecated Use {@link HasExplicitPosition}. */
74
76
  get hasExplicitPosition(): boolean;
75
77
  get ResolvedTransform(): string;
78
+ get ResolvedWidth(): string;
79
+ /** @deprecated Use {@link ResolvedWidth}. */
76
80
  get resolvedWidth(): string;
81
+ get ResolvedHeight(): string;
82
+ /** @deprecated Use {@link ResolvedHeight}. */
77
83
  get resolvedHeight(): string;
84
+ get ResolvedTop(): string;
85
+ /** @deprecated Use {@link ResolvedTop}. */
78
86
  get resolvedTop(): string;
87
+ get ResolvedLeft(): string;
88
+ /** @deprecated Use {@link ResolvedLeft}. */
79
89
  get resolvedLeft(): string;
80
90
  OnEscapeKey(): void;
81
91
  OnCloseClick(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"window.component.d.ts","sourceRoot":"","sources":["../../../src/lib/window/window.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4B,YAAY,EAAgB,SAAS,EAAiD,MAAM,eAAe,CAAC;;AAE/I;;;;;;;;;;;;;;;;GAgBG;AACH,qBAsDa,iBAAkB,YAAW,SAAS;IACjD,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAK;IAE1B,IACI,OAAO,CAAC,KAAK,EAAE,OAAO,EAA4B;IACtD,IAAI,OAAO,IAAI,OAAO,CAA0B;IAEvC,KAAK,SAAM;IACpB,IACI,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,EAGtC;IACD,IAAI,KAAK,IAAI,MAAM,GAAG,MAAM,GAAG,IAAI,CAAwB;IAE3D,IACI,MAAM,CAAC,KAAK,EAAE,MAAM,GA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aAAa,IAAI,MAAM,CAE1B;IAED,IAAI,cAAc,IAAI,MAAM,CAI3B;IAED,8CAA8C;IAC9C,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,2CAA2C;IAC3C,IAAI,WAAW,IAAI,MAAM,CAExB;IAED,IAAI,YAAY,IAAI,MAAM,CAEzB;IAED,4CAA4C;IAC5C,IAAI,YAAY,IAAI,MAAM,CAEzB;IAGD,WAAW,IAAI,IAAI;IAInB,YAAY,IAAI,IAAI;IAMpB,WAAW,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI;IA6BpC,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAkCzD,OAAO,CAAC,oBAAoB;IAS5B,OAAO,CAAC,WAAW;IAgBnB,OAAO,CAAC,YAAY;IAyBpB,OAAO,CAAC,SAAS;IAMjB,OAAO,CAAC,oBAAoB;IAW5B,OAAO,CAAC,gBAAgB;IAIxB,OAAO,CAAC,SAAS;IASjB,6CAA6C;IAC7C,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAM5C,yCAAyC;IACzC,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAM5C,qDAAqD;IACrD,gBAAgB,IAAI,WAAW,GAAG,IAAI;IAItC,WAAW,IAAI,IAAI;yCA5UR,iBAAiB;2CAAjB,iBAAiB;CA+U7B;AAED;;GAEG;AACH,qBAMa,yBAAyB;yCAAzB,yBAAyB;2CAAzB,yBAAyB;CAAG;AAEzC;;GAEG;AACH,qBAKa,wBAAwB;yCAAxB,wBAAwB;2CAAxB,wBAAwB;CAAG"}
@@ -169,9 +169,13 @@ export class MJWindowComponent {
169
169
  elementRef = inject(ElementRef);
170
170
  cdr = inject(ChangeDetectorRef);
171
171
  ngZone = inject(NgZone);
172
- get hasExplicitPosition() {
172
+ get HasExplicitPosition() {
173
173
  return this.currentTop != null && this.currentLeft != null;
174
174
  }
175
+ /** @deprecated Use {@link HasExplicitPosition}. */
176
+ get hasExplicitPosition() {
177
+ return this.HasExplicitPosition;
178
+ }
175
179
  get ResolvedTransform() {
176
180
  if (this.State === 'maximized')
177
181
  return 'none';
@@ -185,26 +189,42 @@ export class MJWindowComponent {
185
189
  return 'translateY(-50%)';
186
190
  return 'translate(-50%, -50%)';
187
191
  }
188
- get resolvedWidth() {
192
+ get ResolvedWidth() {
189
193
  if (this.currentWidth != null)
190
194
  return `${this.currentWidth}px`;
191
195
  if (this.Width)
192
196
  return typeof this.Width === 'number' ? `${this.Width}px` : this.Width;
193
197
  return '500px';
194
198
  }
195
- get resolvedHeight() {
199
+ /** @deprecated Use {@link ResolvedWidth}. */
200
+ get resolvedWidth() {
201
+ return this.ResolvedWidth;
202
+ }
203
+ get ResolvedHeight() {
196
204
  if (this.currentHeight != null)
197
205
  return `${this.currentHeight}px`;
198
206
  if (this.Height)
199
207
  return typeof this.Height === 'number' ? `${this.Height}px` : this.Height;
200
208
  return 'auto';
201
209
  }
202
- get resolvedTop() {
210
+ /** @deprecated Use {@link ResolvedHeight}. */
211
+ get resolvedHeight() {
212
+ return this.ResolvedHeight;
213
+ }
214
+ get ResolvedTop() {
203
215
  return this.currentTop != null ? `${this.currentTop}px` : '50%';
204
216
  }
205
- get resolvedLeft() {
217
+ /** @deprecated Use {@link ResolvedTop}. */
218
+ get resolvedTop() {
219
+ return this.ResolvedTop;
220
+ }
221
+ get ResolvedLeft() {
206
222
  return this.currentLeft != null ? `${this.currentLeft}px` : '50%';
207
223
  }
224
+ /** @deprecated Use {@link ResolvedLeft}. */
225
+ get resolvedLeft() {
226
+ return this.ResolvedLeft;
227
+ }
208
228
  OnEscapeKey() {
209
229
  if (this.Visible)
210
230
  this.OnCloseClick();
@@ -477,7 +497,7 @@ export class MJWindowTitlebarComponent {
477
497
  type: Component,
478
498
  args: [{ selector: 'mj-window-titlebar', standalone: true, template: `<ng-content></ng-content>`, styles: [":host { display: contents; }"] }]
479
499
  }], null, null); })();
480
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJWindowTitlebarComponent, { className: "MJWindowTitlebarComponent", filePath: "lib/window/window.component.ts", lineNumber: 395 }); })();
500
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJWindowTitlebarComponent, { className: "MJWindowTitlebarComponent", filePath: "lib/window/window.component.ts", lineNumber: 420 }); })();
481
501
  /**
482
502
  * mj-window-actions — Footer actions for mj-window.
483
503
  */
@@ -498,5 +518,5 @@ export class MJWindowActionsComponent {
498
518
  template: `<div class="mj-window-actions"><ng-content></ng-content></div>`
499
519
  }]
500
520
  }], null, null); })();
501
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJWindowActionsComponent, { className: "MJWindowActionsComponent", filePath: "lib/window/window.component.ts", lineNumber: 405 }); })();
521
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJWindowActionsComponent, { className: "MJWindowActionsComponent", filePath: "lib/window/window.component.ts", lineNumber: 430 }); })();
502
522
  //# sourceMappingURL=window.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"window.component.js","sourceRoot":"","sources":["../../../src/lib/window/window.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAa,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;;;;;IA2CrI,iCAA2F;IAAzC,kNAAa,6BAAsB,GAAG,CAAC,KAAC;IAAC,oBAAM;IACjG,iCAA2F;IAAzC,kNAAa,6BAAsB,GAAG,CAAC,KAAC;IAAC,oBAAM;IACjG,iCAA2F;IAAzC,kNAAa,6BAAsB,GAAG,CAAC,KAAC;IAAC,oBAAM;IACjG,kCAA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EAAE,IAAI;gBAChB,QAAQ,EAAE,gEAAgE;aAC3E;;kFACY,wBAAwB","sourcesContent":["import { Component, Input, Output, EventEmitter, HostListener, OnDestroy, ElementRef, ChangeDetectorRef, NgZone, inject } from '@angular/core';\n\n/**\n * mj-window — Floating window panel. Replaces `<kendo-window>`.\n *\n * Unlike mj-dialog, this does NOT have a backdrop and does NOT block interaction\n * with the rest of the page. It's a floating panel, similar to Kendo's Window.\n *\n * Supports dragging (via titlebar), resizing (via edges/corners), minimize, and maximize.\n *\n * @example\n * ```html\n * <mj-window [Visible]=\"showWindow\" Title=\"Details\" [Width]=\"600\" [Height]=\"400\"\n * [Draggable]=\"true\" [Resizable]=\"true\" (Close)=\"onClose()\"\n * (StateChange)=\"onStateChange($event)\">\n * <p>Window content</p>\n * </mj-window>\n * ```\n */\n@Component({\n selector: 'mj-window',\n standalone: true,\n template: `\n @if (Visible) {\n <div class=\"mj-window\"\n [class.mj-window--maximized]=\"State === 'maximized'\"\n [class.mj-window--draggable]=\"Draggable\"\n [class.mj-window--resizable]=\"Resizable && State !== 'maximized'\"\n [style.width]=\"State === 'maximized' ? '100vw' : resolvedWidth\"\n [style.height]=\"State === 'maximized' ? '100vh' : resolvedHeight\"\n [style.top]=\"State === 'maximized' ? '0' : resolvedTop\"\n [style.left]=\"State === 'maximized' ? '0' : resolvedLeft\"\n [style.transform]=\"ResolvedTransform\"\n [style.min-width]=\"MinWidth ? MinWidth + 'px' : null\"\n [style.min-height]=\"MinHeight ? MinHeight + 'px' : null\"\n [style.max-width]=\"State === 'maximized' ? '100vw' : '90vw'\"\n [style.max-height]=\"State === 'maximized' ? '100vh' : '90vh'\"\n [style.border-radius]=\"State === 'maximized' ? '0' : null\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"Title ? 'mj-window-title-' + WindowId : null\">\n\n <!-- Resize handles -->\n @if (Resizable && State !== 'maximized') {\n <div class=\"mj-window-resize mj-window-resize--n\" (mousedown)=\"OnResizeStart($event, 'n')\"></div>\n <div class=\"mj-window-resize mj-window-resize--s\" (mousedown)=\"OnResizeStart($event, 's')\"></div>\n <div class=\"mj-window-resize mj-window-resize--e\" (mousedown)=\"OnResizeStart($event, 'e')\"></div>\n <div class=\"mj-window-resize mj-window-resize--w\" (mousedown)=\"OnResizeStart($event, 'w')\"></div>\n <div class=\"mj-window-resize mj-window-resize--ne\" (mousedown)=\"OnResizeStart($event, 'ne')\"></div>\n <div class=\"mj-window-resize mj-window-resize--nw\" (mousedown)=\"OnResizeStart($event, 'nw')\"></div>\n <div class=\"mj-window-resize mj-window-resize--se\" (mousedown)=\"OnResizeStart($event, 'se')\"></div>\n <div class=\"mj-window-resize mj-window-resize--sw\" (mousedown)=\"OnResizeStart($event, 'sw')\"></div>\n }\n\n <div class=\"mj-window-titlebar\"\n (mousedown)=\"OnDragStart($event)\">\n @if (Title) {\n <h3 class=\"mj-window-title\" [id]=\"'mj-window-title-' + WindowId\">{{ Title }}</h3>\n }\n <ng-content select=\"mj-window-titlebar\"></ng-content>\n <button class=\"mj-window-close\" (click)=\"OnCloseClick()\" (mousedown)=\"$event.stopPropagation()\" aria-label=\"Close window\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <div class=\"mj-window-body\">\n <ng-content></ng-content>\n </div>\n\n <ng-content select=\"mj-window-actions\"></ng-content>\n </div>\n }\n `\n})\nexport class MJWindowComponent implements OnDestroy {\n private _visible = false;\n private static nextId = 0;\n\n @Input()\n set Visible(value: boolean) { this._visible = value; }\n get Visible(): boolean { return this._visible; }\n\n @Input() Title = '';\n @Input()\n set Width(value: number | string | null) {\n this._width = value;\n if (value != null) this.currentWidth = this.parseSize(value);\n }\n get Width(): number | string | null { return this._width; }\n\n @Input()\n set Height(value: number | string | null) {\n this._height = value;\n if (value != null) this.currentHeight = this.parseSize(value);\n }\n get Height(): number | string | null { return this._height; }\n @Input()\n set Top(value: number | null) { if (value != null) this.currentTop = value; }\n get Top(): number | null { return this.currentTop; }\n\n @Input()\n set Left(value: number | null) { if (value != null) this.currentLeft = value; }\n get Left(): number | null { return this.currentLeft; }\n @Input() MinWidth: number | null = null;\n @Input() MinHeight: number | null = null;\n @Input() Draggable = false;\n @Input() Resizable = false;\n\n /** Window state: 'default' or 'maximized'. */\n @Input()\n set State(value: 'default' | 'maximized') {\n if (value !== this._state) {\n if (value === 'maximized') {\n this.savedTop = this.currentTop;\n this.savedLeft = this.currentLeft;\n this.savedWidth = this.currentWidth;\n this.savedHeight = this.currentHeight;\n } else if (this._state === 'maximized') {\n this.currentTop = this.savedTop;\n this.currentLeft = this.savedLeft;\n this.currentWidth = this.savedWidth;\n this.currentHeight = this.savedHeight;\n }\n this._state = value;\n this.StateChange.emit(value);\n }\n }\n get State(): 'default' | 'maximized' { return this._state; }\n\n @Output() Close = new EventEmitter<void>();\n @Output() StateChange = new EventEmitter<'default' | 'maximized'>();\n @Output() Resize = new EventEmitter<void>();\n\n WindowId = MJWindowComponent.nextId++;\n\n // Internal position/size tracking\n private _state: 'default' | 'maximized' = 'default';\n private _width: number | string | null = null;\n private _height: number | string | null = null;\n private currentTop: number | null = null;\n private currentLeft: number | null = null;\n private currentWidth: number | null = null;\n private currentHeight: number | null = null;\n\n // Saved dimensions for restore from maximize\n private savedTop: number | null = null;\n private savedLeft: number | null = null;\n private savedWidth: number | null = null;\n private savedHeight: number | null = null;\n\n // Drag state\n private isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragStartTop = 0;\n private dragStartLeft = 0;\n\n // Resize state\n private isResizing = false;\n private resizeDirection = '';\n private resizeStartX = 0;\n private resizeStartY = 0;\n private resizeStartWidth = 0;\n private resizeStartHeight = 0;\n private resizeStartTop = 0;\n private resizeStartLeft = 0;\n\n private boundOnMouseMove: ((e: MouseEvent) => void) | null = null;\n private boundOnMouseUp: ((e: MouseEvent) => void) | null = null;\n\n private elementRef = inject(ElementRef);\n private cdr = inject(ChangeDetectorRef);\n private ngZone = inject(NgZone);\n\n get hasExplicitPosition(): boolean {\n return this.currentTop != null && this.currentLeft != null;\n }\n\n get ResolvedTransform(): string {\n if (this.State === 'maximized') return 'none';\n const hasTop = this.currentTop != null;\n const hasLeft = this.currentLeft != null;\n if (hasTop && hasLeft) return 'none';\n if (hasTop && !hasLeft) return 'translateX(-50%)';\n if (!hasTop && hasLeft) return 'translateY(-50%)';\n return 'translate(-50%, -50%)';\n }\n\n get resolvedWidth(): string {\n if (this.currentWidth != null) return `${this.currentWidth}px`;\n if (this.Width) return typeof this.Width === 'number' ? `${this.Width}px` : this.Width;\n return '500px';\n }\n\n get resolvedHeight(): string {\n if (this.currentHeight != null) return `${this.currentHeight}px`;\n if (this.Height) return typeof this.Height === 'number' ? `${this.Height}px` : this.Height;\n return 'auto';\n }\n\n get resolvedTop(): string {\n return this.currentTop != null ? `${this.currentTop}px` : '50%';\n }\n\n get resolvedLeft(): string {\n return this.currentLeft != null ? `${this.currentLeft}px` : '50%';\n }\n\n @HostListener('document:keydown.escape')\n OnEscapeKey(): void {\n if (this.Visible) this.OnCloseClick();\n }\n\n OnCloseClick(): void {\n this.Close.emit();\n }\n\n // --- Drag handling ---\n\n OnDragStart(event: MouseEvent): void {\n if (!this.Draggable || this.State === 'maximized') return;\n // Don't drag if clicking buttons inside titlebar\n if ((event.target as HTMLElement).closest('button')) return;\n\n event.preventDefault();\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n\n const windowEl = this.getWindowElement();\n if (windowEl) {\n const rect = windowEl.getBoundingClientRect();\n this.dragStartTop = rect.top;\n this.dragStartLeft = rect.left;\n\n // Ensure we're using absolute positioning once dragging starts\n if (this.currentTop == null) {\n this.currentTop = rect.top;\n this.currentLeft = rect.left;\n this.cdr.detectChanges();\n }\n }\n\n this.attachMouseListeners();\n }\n\n // --- Resize handling ---\n\n OnResizeStart(event: MouseEvent, direction: string): void {\n if (!this.Resizable || this.State === 'maximized') return;\n event.preventDefault();\n event.stopPropagation();\n\n this.isResizing = true;\n this.resizeDirection = direction;\n this.resizeStartX = event.clientX;\n this.resizeStartY = event.clientY;\n\n const windowEl = this.getWindowElement();\n if (windowEl) {\n const rect = windowEl.getBoundingClientRect();\n this.resizeStartWidth = rect.width;\n this.resizeStartHeight = rect.height;\n this.resizeStartTop = rect.top;\n this.resizeStartLeft = rect.left;\n\n // Ensure absolute positioning\n if (this.currentTop == null) {\n this.currentTop = rect.top;\n this.currentLeft = rect.left;\n }\n if (this.currentWidth == null) {\n this.currentWidth = rect.width;\n }\n if (this.currentHeight == null) {\n this.currentHeight = rect.height;\n }\n }\n\n this.attachMouseListeners();\n }\n\n private attachMouseListeners(): void {\n this.ngZone.runOutsideAngular(() => {\n this.boundOnMouseMove = (e: MouseEvent) => this.onMouseMove(e);\n this.boundOnMouseUp = (e: MouseEvent) => this.onMouseUp(e);\n document.addEventListener('mousemove', this.boundOnMouseMove);\n document.addEventListener('mouseup', this.boundOnMouseUp);\n });\n }\n\n private onMouseMove(event: MouseEvent): void {\n if (this.isDragging) {\n const dx = event.clientX - this.dragStartX;\n const dy = event.clientY - this.dragStartY;\n this.currentTop = Math.max(0, this.dragStartTop + dy);\n this.currentLeft = Math.max(0, this.dragStartLeft + dx);\n this.ngZone.run(() => this.cdr.detectChanges());\n } else if (this.isResizing) {\n this.handleResize(event);\n this.ngZone.run(() => {\n this.cdr.detectChanges();\n this.Resize.emit();\n });\n }\n }\n\n private handleResize(event: MouseEvent): void {\n const dx = event.clientX - this.resizeStartX;\n const dy = event.clientY - this.resizeStartY;\n const minW = this.MinWidth || 200;\n const minH = this.MinHeight || 150;\n const dir = this.resizeDirection;\n\n if (dir.includes('e')) {\n this.currentWidth = Math.max(minW, this.resizeStartWidth + dx);\n }\n if (dir.includes('w')) {\n const newWidth = Math.max(minW, this.resizeStartWidth - dx);\n this.currentLeft = this.resizeStartLeft + (this.resizeStartWidth - newWidth);\n this.currentWidth = newWidth;\n }\n if (dir.includes('s')) {\n this.currentHeight = Math.max(minH, this.resizeStartHeight + dy);\n }\n if (dir.includes('n')) {\n const newHeight = Math.max(minH, this.resizeStartHeight - dy);\n this.currentTop = this.resizeStartTop + (this.resizeStartHeight - newHeight);\n this.currentHeight = newHeight;\n }\n }\n\n private onMouseUp(_event: MouseEvent): void {\n this.isDragging = false;\n this.isResizing = false;\n this.detachMouseListeners();\n }\n\n private detachMouseListeners(): void {\n if (this.boundOnMouseMove) {\n document.removeEventListener('mousemove', this.boundOnMouseMove);\n this.boundOnMouseMove = null;\n }\n if (this.boundOnMouseUp) {\n document.removeEventListener('mouseup', this.boundOnMouseUp);\n this.boundOnMouseUp = null;\n }\n }\n\n private getWindowElement(): HTMLElement | null {\n return this.elementRef.nativeElement.querySelector('.mj-window');\n }\n\n private parseSize(value: string | number): number | null {\n if (typeof value === 'number') return value;\n if (value.endsWith('vw')) return (parseFloat(value) / 100) * window.innerWidth;\n if (value.endsWith('vh')) return (parseFloat(value) / 100) * window.innerHeight;\n if (value.endsWith('px')) return parseFloat(value);\n const parsed = parseFloat(value);\n return isNaN(parsed) ? null : parsed;\n }\n\n /** Programmatic method to update position */\n SetPosition(top: number, left: number): void {\n this.currentTop = top;\n this.currentLeft = left;\n this.cdr.detectChanges();\n }\n\n /** Programmatic method to update size */\n SetSize(width: number, height: number): void {\n this.currentWidth = width;\n this.currentHeight = height;\n this.cdr.detectChanges();\n }\n\n /** Get the current window element for DOM queries */\n GetWindowElement(): HTMLElement | null {\n return this.getWindowElement();\n }\n\n ngOnDestroy(): void {\n this.detachMouseListeners();\n }\n}\n\n/**\n * mj-window-titlebar — Custom titlebar for mj-window. Replaces `<kendo-window-titlebar>`.\n */\n@Component({\n selector: 'mj-window-titlebar',\n standalone: true,\n template: `<ng-content></ng-content>`,\n styles: [`:host { display: contents; }`]\n})\nexport class MJWindowTitlebarComponent {}\n\n/**\n * mj-window-actions — Footer actions for mj-window.\n */\n@Component({\n selector: 'mj-window-actions',\n standalone: true,\n template: `<div class=\"mj-window-actions\"><ng-content></ng-content></div>`\n})\nexport class MJWindowActionsComponent {}\n"]}
1
+ {"version":3,"file":"window.component.js","sourceRoot":"","sources":["../../../src/lib/window/window.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAa,UAAU,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;;;;;;IA2CrI,iCAA2F;IAAzC,kNAAa,6BAAsB,GAAG,CAAC,KAAC;IAAC,oBAAM;IACjG,iCAA2F;IAAzC,kNAAa,6BAAsB,GAAG,CAAC,KAAC;IAAC,oBAAM;IACjG,iCAA2F;IAAzC,kNAAa,6BAAsB,GAAG,CAAC,KAAC;IAAC,oBAAM;IACjG,kCAA2F;IAAzC,kNAAa,6BAAsB,GAAG,CAAC,KAAC;IAAC,oBAAM;IACjG,kCAA6F;IAA1C,kNAAa,6BAAsB,IAAI,CAAC,KAAC;IAAC,oBAAM;IACnG,kCAA6F;IAA1C,kNAAa,6BAAsB,IAAI,CAAC,KAAC;IAAC,oBAAM;IACnG,kCAA6F;IAA1C,kNAAa,6BAAsB,IAAI,CAAC,KAAC;IAAC,oBAAM;IACnG,kCAA6F;IAA1C,kNAAa,6BAAsB,IAAI,CAAC,KAAC;IAAC,oBAAM;;;IAMjG,gCAAiE;IAAA,YAAW;IAAA,oBAAK;;;IAArD,4DAAoC;IAAC,cAAW;IAAX,kCAAW;;;;IAhClF,iCAewE;IAGtE,uFAA0C;IAW1C,iCACoC;IAAlC,mMAAa,0BAAmB,KAAC;IACjC,gGAAa;IAGb,kBAAqD;IACrD,oCAA0H;IAAjE,AAAzB,wLAAS,qBAAc,KAAC,6GAAc,wBAAwB,IAAC;IAC7F,0BAAiC;IAErC,AADE,oBAAS,EACL;IAEN,iCAA4B;IAC1B,qBAAyB;IAC3B,oBAAM;IAEN,qBAAoD;IACtD,oBAAM;;;IAhCJ,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,AADA,sFAA+D,0EACE,gEACV,kEACE,uCACpB,8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,0BAAI;;;YAlD1B,qFAAe;;YAAf,sCA+CC;;;iFAGQ,iBAAiB;cAtD7B,SAAS;eAAC;gBACT,QAAQ,EAAE,WAAW;gBACrB,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDT;aACF;;kBAKE,KAAK;;kBAIL,KAAK;;kBACL,KAAK;;kBAOL,KAAK;;kBAML,KAAK;;kBAIL,KAAK;;kBAGL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAGL,KAAK;;kBAoBL,MAAM;;kBACN,MAAM;;kBACN,MAAM;;kBAsGN,YAAY;mBAAC,yBAAyB;;kFA/J5B,iBAAiB;AAiV9B;;GAEG;AAOH,MAAM,OAAO,yBAAyB;mHAAzB,yBAAyB;6DAAzB,yBAAyB;;YAHzB,kBAAyB;;;iFAGzB,yBAAyB;cANrC,SAAS;2BACE,oBAAoB,cAClB,IAAI,YACN,2BAA2B;;kFAG1B,yBAAyB;AAEtC;;GAEG;AAMH,MAAM,OAAO,wBAAwB;kHAAxB,wBAAwB;6DAAxB,wBAAwB;;YAFxB,iCAA+B;YAAA,kBAAyB;YAAA,oBAAM;;;iFAE9D,wBAAwB;cALpC,SAAS;eAAC;gBACT,QAAQ,EAAE,mBAAmB;gBAC7B,UAAU,EAAE,IAAI;gBAChB,QAAQ,EAAE,gEAAgE;aAC3E;;kFACY,wBAAwB","sourcesContent":["import { Component, Input, Output, EventEmitter, HostListener, OnDestroy, ElementRef, ChangeDetectorRef, NgZone, inject } from '@angular/core';\n\n/**\n * mj-window — Floating window panel. Replaces `<kendo-window>`.\n *\n * Unlike mj-dialog, this does NOT have a backdrop and does NOT block interaction\n * with the rest of the page. It's a floating panel, similar to Kendo's Window.\n *\n * Supports dragging (via titlebar), resizing (via edges/corners), minimize, and maximize.\n *\n * @example\n * ```html\n * <mj-window [Visible]=\"showWindow\" Title=\"Details\" [Width]=\"600\" [Height]=\"400\"\n * [Draggable]=\"true\" [Resizable]=\"true\" (Close)=\"onClose()\"\n * (StateChange)=\"onStateChange($event)\">\n * <p>Window content</p>\n * </mj-window>\n * ```\n */\n@Component({\n selector: 'mj-window',\n standalone: true,\n template: `\n @if (Visible) {\n <div class=\"mj-window\"\n [class.mj-window--maximized]=\"State === 'maximized'\"\n [class.mj-window--draggable]=\"Draggable\"\n [class.mj-window--resizable]=\"Resizable && State !== 'maximized'\"\n [style.width]=\"State === 'maximized' ? '100vw' : resolvedWidth\"\n [style.height]=\"State === 'maximized' ? '100vh' : resolvedHeight\"\n [style.top]=\"State === 'maximized' ? '0' : resolvedTop\"\n [style.left]=\"State === 'maximized' ? '0' : resolvedLeft\"\n [style.transform]=\"ResolvedTransform\"\n [style.min-width]=\"MinWidth ? MinWidth + 'px' : null\"\n [style.min-height]=\"MinHeight ? MinHeight + 'px' : null\"\n [style.max-width]=\"State === 'maximized' ? '100vw' : '90vw'\"\n [style.max-height]=\"State === 'maximized' ? '100vh' : '90vh'\"\n [style.border-radius]=\"State === 'maximized' ? '0' : null\"\n role=\"dialog\"\n [attr.aria-labelledby]=\"Title ? 'mj-window-title-' + WindowId : null\">\n\n <!-- Resize handles -->\n @if (Resizable && State !== 'maximized') {\n <div class=\"mj-window-resize mj-window-resize--n\" (mousedown)=\"OnResizeStart($event, 'n')\"></div>\n <div class=\"mj-window-resize mj-window-resize--s\" (mousedown)=\"OnResizeStart($event, 's')\"></div>\n <div class=\"mj-window-resize mj-window-resize--e\" (mousedown)=\"OnResizeStart($event, 'e')\"></div>\n <div class=\"mj-window-resize mj-window-resize--w\" (mousedown)=\"OnResizeStart($event, 'w')\"></div>\n <div class=\"mj-window-resize mj-window-resize--ne\" (mousedown)=\"OnResizeStart($event, 'ne')\"></div>\n <div class=\"mj-window-resize mj-window-resize--nw\" (mousedown)=\"OnResizeStart($event, 'nw')\"></div>\n <div class=\"mj-window-resize mj-window-resize--se\" (mousedown)=\"OnResizeStart($event, 'se')\"></div>\n <div class=\"mj-window-resize mj-window-resize--sw\" (mousedown)=\"OnResizeStart($event, 'sw')\"></div>\n }\n\n <div class=\"mj-window-titlebar\"\n (mousedown)=\"OnDragStart($event)\">\n @if (Title) {\n <h3 class=\"mj-window-title\" [id]=\"'mj-window-title-' + WindowId\">{{ Title }}</h3>\n }\n <ng-content select=\"mj-window-titlebar\"></ng-content>\n <button class=\"mj-window-close\" (click)=\"OnCloseClick()\" (mousedown)=\"$event.stopPropagation()\" aria-label=\"Close window\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n </div>\n\n <div class=\"mj-window-body\">\n <ng-content></ng-content>\n </div>\n\n <ng-content select=\"mj-window-actions\"></ng-content>\n </div>\n }\n `\n})\nexport class MJWindowComponent implements OnDestroy {\n private _visible = false;\n private static nextId = 0;\n\n @Input()\n set Visible(value: boolean) { this._visible = value; }\n get Visible(): boolean { return this._visible; }\n\n @Input() Title = '';\n @Input()\n set Width(value: number | string | null) {\n this._width = value;\n if (value != null) this.currentWidth = this.parseSize(value);\n }\n get Width(): number | string | null { return this._width; }\n\n @Input()\n set Height(value: number | string | null) {\n this._height = value;\n if (value != null) this.currentHeight = this.parseSize(value);\n }\n get Height(): number | string | null { return this._height; }\n @Input()\n set Top(value: number | null) { if (value != null) this.currentTop = value; }\n get Top(): number | null { return this.currentTop; }\n\n @Input()\n set Left(value: number | null) { if (value != null) this.currentLeft = value; }\n get Left(): number | null { return this.currentLeft; }\n @Input() MinWidth: number | null = null;\n @Input() MinHeight: number | null = null;\n @Input() Draggable = false;\n @Input() Resizable = false;\n\n /** Window state: 'default' or 'maximized'. */\n @Input()\n set State(value: 'default' | 'maximized') {\n if (value !== this._state) {\n if (value === 'maximized') {\n this.savedTop = this.currentTop;\n this.savedLeft = this.currentLeft;\n this.savedWidth = this.currentWidth;\n this.savedHeight = this.currentHeight;\n } else if (this._state === 'maximized') {\n this.currentTop = this.savedTop;\n this.currentLeft = this.savedLeft;\n this.currentWidth = this.savedWidth;\n this.currentHeight = this.savedHeight;\n }\n this._state = value;\n this.StateChange.emit(value);\n }\n }\n get State(): 'default' | 'maximized' { return this._state; }\n\n @Output() Close = new EventEmitter<void>();\n @Output() StateChange = new EventEmitter<'default' | 'maximized'>();\n @Output() Resize = new EventEmitter<void>();\n\n WindowId = MJWindowComponent.nextId++;\n\n // Internal position/size tracking\n private _state: 'default' | 'maximized' = 'default';\n private _width: number | string | null = null;\n private _height: number | string | null = null;\n private currentTop: number | null = null;\n private currentLeft: number | null = null;\n private currentWidth: number | null = null;\n private currentHeight: number | null = null;\n\n // Saved dimensions for restore from maximize\n private savedTop: number | null = null;\n private savedLeft: number | null = null;\n private savedWidth: number | null = null;\n private savedHeight: number | null = null;\n\n // Drag state\n private isDragging = false;\n private dragStartX = 0;\n private dragStartY = 0;\n private dragStartTop = 0;\n private dragStartLeft = 0;\n\n // Resize state\n private isResizing = false;\n private resizeDirection = '';\n private resizeStartX = 0;\n private resizeStartY = 0;\n private resizeStartWidth = 0;\n private resizeStartHeight = 0;\n private resizeStartTop = 0;\n private resizeStartLeft = 0;\n\n private boundOnMouseMove: ((e: MouseEvent) => void) | null = null;\n private boundOnMouseUp: ((e: MouseEvent) => void) | null = null;\n\n private elementRef = inject(ElementRef);\n private cdr = inject(ChangeDetectorRef);\n private ngZone = inject(NgZone);\n\n get HasExplicitPosition(): boolean {\n return this.currentTop != null && this.currentLeft != null;\n }\n\n /** @deprecated Use {@link HasExplicitPosition}. */\n get hasExplicitPosition(): boolean {\n return this.HasExplicitPosition;\n }\n\n get ResolvedTransform(): string {\n if (this.State === 'maximized') return 'none';\n const hasTop = this.currentTop != null;\n const hasLeft = this.currentLeft != null;\n if (hasTop && hasLeft) return 'none';\n if (hasTop && !hasLeft) return 'translateX(-50%)';\n if (!hasTop && hasLeft) return 'translateY(-50%)';\n return 'translate(-50%, -50%)';\n }\n\n get ResolvedWidth(): string {\n if (this.currentWidth != null) return `${this.currentWidth}px`;\n if (this.Width) return typeof this.Width === 'number' ? `${this.Width}px` : this.Width;\n return '500px';\n }\n\n /** @deprecated Use {@link ResolvedWidth}. */\n get resolvedWidth(): string {\n return this.ResolvedWidth;\n }\n\n get ResolvedHeight(): string {\n if (this.currentHeight != null) return `${this.currentHeight}px`;\n if (this.Height) return typeof this.Height === 'number' ? `${this.Height}px` : this.Height;\n return 'auto';\n }\n\n /** @deprecated Use {@link ResolvedHeight}. */\n get resolvedHeight(): string {\n return this.ResolvedHeight;\n }\n\n get ResolvedTop(): string {\n return this.currentTop != null ? `${this.currentTop}px` : '50%';\n }\n\n /** @deprecated Use {@link ResolvedTop}. */\n get resolvedTop(): string {\n return this.ResolvedTop;\n }\n\n get ResolvedLeft(): string {\n return this.currentLeft != null ? `${this.currentLeft}px` : '50%';\n }\n\n /** @deprecated Use {@link ResolvedLeft}. */\n get resolvedLeft(): string {\n return this.ResolvedLeft;\n }\n\n @HostListener('document:keydown.escape')\n OnEscapeKey(): void {\n if (this.Visible) this.OnCloseClick();\n }\n\n OnCloseClick(): void {\n this.Close.emit();\n }\n\n // --- Drag handling ---\n\n OnDragStart(event: MouseEvent): void {\n if (!this.Draggable || this.State === 'maximized') return;\n // Don't drag if clicking buttons inside titlebar\n if ((event.target as HTMLElement).closest('button')) return;\n\n event.preventDefault();\n this.isDragging = true;\n this.dragStartX = event.clientX;\n this.dragStartY = event.clientY;\n\n const windowEl = this.getWindowElement();\n if (windowEl) {\n const rect = windowEl.getBoundingClientRect();\n this.dragStartTop = rect.top;\n this.dragStartLeft = rect.left;\n\n // Ensure we're using absolute positioning once dragging starts\n if (this.currentTop == null) {\n this.currentTop = rect.top;\n this.currentLeft = rect.left;\n this.cdr.detectChanges();\n }\n }\n\n this.attachMouseListeners();\n }\n\n // --- Resize handling ---\n\n OnResizeStart(event: MouseEvent, direction: string): void {\n if (!this.Resizable || this.State === 'maximized') return;\n event.preventDefault();\n event.stopPropagation();\n\n this.isResizing = true;\n this.resizeDirection = direction;\n this.resizeStartX = event.clientX;\n this.resizeStartY = event.clientY;\n\n const windowEl = this.getWindowElement();\n if (windowEl) {\n const rect = windowEl.getBoundingClientRect();\n this.resizeStartWidth = rect.width;\n this.resizeStartHeight = rect.height;\n this.resizeStartTop = rect.top;\n this.resizeStartLeft = rect.left;\n\n // Ensure absolute positioning\n if (this.currentTop == null) {\n this.currentTop = rect.top;\n this.currentLeft = rect.left;\n }\n if (this.currentWidth == null) {\n this.currentWidth = rect.width;\n }\n if (this.currentHeight == null) {\n this.currentHeight = rect.height;\n }\n }\n\n this.attachMouseListeners();\n }\n\n private attachMouseListeners(): void {\n this.ngZone.runOutsideAngular(() => {\n this.boundOnMouseMove = (e: MouseEvent) => this.onMouseMove(e);\n this.boundOnMouseUp = (e: MouseEvent) => this.onMouseUp(e);\n document.addEventListener('mousemove', this.boundOnMouseMove);\n document.addEventListener('mouseup', this.boundOnMouseUp);\n });\n }\n\n private onMouseMove(event: MouseEvent): void {\n if (this.isDragging) {\n const dx = event.clientX - this.dragStartX;\n const dy = event.clientY - this.dragStartY;\n this.currentTop = Math.max(0, this.dragStartTop + dy);\n this.currentLeft = Math.max(0, this.dragStartLeft + dx);\n this.ngZone.run(() => this.cdr.detectChanges());\n } else if (this.isResizing) {\n this.handleResize(event);\n this.ngZone.run(() => {\n this.cdr.detectChanges();\n this.Resize.emit();\n });\n }\n }\n\n private handleResize(event: MouseEvent): void {\n const dx = event.clientX - this.resizeStartX;\n const dy = event.clientY - this.resizeStartY;\n const minW = this.MinWidth || 200;\n const minH = this.MinHeight || 150;\n const dir = this.resizeDirection;\n\n if (dir.includes('e')) {\n this.currentWidth = Math.max(minW, this.resizeStartWidth + dx);\n }\n if (dir.includes('w')) {\n const newWidth = Math.max(minW, this.resizeStartWidth - dx);\n this.currentLeft = this.resizeStartLeft + (this.resizeStartWidth - newWidth);\n this.currentWidth = newWidth;\n }\n if (dir.includes('s')) {\n this.currentHeight = Math.max(minH, this.resizeStartHeight + dy);\n }\n if (dir.includes('n')) {\n const newHeight = Math.max(minH, this.resizeStartHeight - dy);\n this.currentTop = this.resizeStartTop + (this.resizeStartHeight - newHeight);\n this.currentHeight = newHeight;\n }\n }\n\n private onMouseUp(_event: MouseEvent): void {\n this.isDragging = false;\n this.isResizing = false;\n this.detachMouseListeners();\n }\n\n private detachMouseListeners(): void {\n if (this.boundOnMouseMove) {\n document.removeEventListener('mousemove', this.boundOnMouseMove);\n this.boundOnMouseMove = null;\n }\n if (this.boundOnMouseUp) {\n document.removeEventListener('mouseup', this.boundOnMouseUp);\n this.boundOnMouseUp = null;\n }\n }\n\n private getWindowElement(): HTMLElement | null {\n return this.elementRef.nativeElement.querySelector('.mj-window');\n }\n\n private parseSize(value: string | number): number | null {\n if (typeof value === 'number') return value;\n if (value.endsWith('vw')) return (parseFloat(value) / 100) * window.innerWidth;\n if (value.endsWith('vh')) return (parseFloat(value) / 100) * window.innerHeight;\n if (value.endsWith('px')) return parseFloat(value);\n const parsed = parseFloat(value);\n return isNaN(parsed) ? null : parsed;\n }\n\n /** Programmatic method to update position */\n SetPosition(top: number, left: number): void {\n this.currentTop = top;\n this.currentLeft = left;\n this.cdr.detectChanges();\n }\n\n /** Programmatic method to update size */\n SetSize(width: number, height: number): void {\n this.currentWidth = width;\n this.currentHeight = height;\n this.cdr.detectChanges();\n }\n\n /** Get the current window element for DOM queries */\n GetWindowElement(): HTMLElement | null {\n return this.getWindowElement();\n }\n\n ngOnDestroy(): void {\n this.detachMouseListeners();\n }\n}\n\n/**\n * mj-window-titlebar — Custom titlebar for mj-window. Replaces `<kendo-window-titlebar>`.\n */\n@Component({\n selector: 'mj-window-titlebar',\n standalone: true,\n template: `<ng-content></ng-content>`,\n styles: [`:host { display: contents; }`]\n})\nexport class MJWindowTitlebarComponent {}\n\n/**\n * mj-window-actions — Footer actions for mj-window.\n */\n@Component({\n selector: 'mj-window-actions',\n standalone: true,\n template: `<div class=\"mj-window-actions\"><ng-content></ng-content></div>`\n})\nexport class MJWindowActionsComponent {}\n"]}
@@ -57,17 +57,27 @@ export declare class MJWorkspaceTabStripComponent implements AfterViewInit {
57
57
  NewTabRequested: EventEmitter<void>;
58
58
  TabReordered: EventEmitter<MJTabReorder>;
59
59
  /** CDK drop — emit the reorder intent; the host applies it to the store (the strip stays dumb). */
60
+ OnDrop(event: CdkDragDrop<MJWorkspaceTab[]>): void;
61
+ /** @deprecated Use {@link OnDrop}. */
60
62
  onDrop(event: CdkDragDrop<MJWorkspaceTab[]>): void;
61
63
  /**
62
64
  * The tab's accessible name. The dirty dot and the rejected colour/icon are the only signals for
63
65
  * those states, and neither survives being read aloud — so they are spelled out here instead.
64
66
  */
67
+ TabAccessibleName(tab: MJWorkspaceTab): string;
68
+ /** @deprecated Use {@link TabAccessibleName}. */
65
69
  tabAccessibleName(tab: MJWorkspaceTab): string;
66
70
  /** Keyboard arrow/Home/End/Enter from `mjTabList` — map the position back onto our id. */
71
+ OnActivateRequested(request: MJTabListRequest): void;
72
+ /** @deprecated Use {@link OnActivateRequested}. */
67
73
  onActivateRequested(request: MJTabListRequest): void;
68
74
  /** Delete/Backspace on a focused tab — the APG close gesture for a closeable tab. */
75
+ OnCloseRequested(request: MJTabListRequest): void;
76
+ /** @deprecated Use {@link OnCloseRequested}. */
69
77
  onCloseRequested(request: MJTabListRequest): void;
70
78
  /** The close button sits inside the tab, so its click would otherwise also select the tab. */
79
+ OnCloseClick(event: MouseEvent, id: string): void;
80
+ /** @deprecated Use {@link OnCloseClick}. */
71
81
  onCloseClick(event: MouseEvent, id: string): void;
72
82
  static ɵfac: i0.ɵɵFactoryDeclaration<MJWorkspaceTabStripComponent, never>;
73
83
  static ɵcmp: i0.ɵɵComponentDeclaration<MJWorkspaceTabStripComponent, "mj-workspace-tab-strip", never, { "Tabs": { "alias": "Tabs"; "required": false; }; "ActiveId": { "alias": "ActiveId"; "required": false; }; "ShowNewTab": { "alias": "ShowNewTab"; "required": false; }; "NewTabLabel": { "alias": "NewTabLabel"; "required": false; }; "AllowReorder": { "alias": "AllowReorder"; "required": false; }; }, { "TabSelected": "TabSelected"; "TabClosed": "TabClosed"; "NewTabRequested": "NewTabRequested"; "TabReordered": "TabReordered"; }, never, never, true, never>;
@@ -1 +1 @@
1
- {"version":3,"file":"workspace-tab-strip.component.d.ts","sourceRoot":"","sources":["../../../src/lib/workspace-tabs/workspace-tab-strip.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkD,YAAY,EAAyB,MAAM,eAAe,CAAC;AAEnI,OAAO,EAAwB,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAsB,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;;AAGlF,gGAAgG;AAChG,MAAM,WAAW,YAAY;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAoEa,4BAA6B,YAAW,aAAa;IAChE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAsB;IAEjD,eAAe,IAAI,IAAI;IAId,IAAI,EAAE,cAAc,EAAE,CAAM;IAC5B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAC/B,UAAU,UAAQ;IAClB,WAAW,SAAS;IAE7B;;;;OAIG;IACM,YAAY,UAAQ;IAE7B;;;;;;;;OAQG;IACH,SAAgB,cAAc;;;MAA4B;IAEhD,WAAW,uBAA8B;IACzC,SAAS,uBAA8B;IACvC,eAAe,qBAA4B;IAC3C,YAAY,6BAAoC;IAE1D,mGAAmG;IAC5F,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,cAAc,EAAE,CAAC,GAAG,IAAI;IAMzD;;;OAGG;IACI,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM;IAOrD,0FAA0F;IACnF,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAO3D,qFAAqF;IAC9E,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,I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MAAM;IAOrD,iDAAiD;IAC1C,iBAAiB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM;IAIrD,0FAA0F;IACnF,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAO3D,mDAAmD;IAC5C,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAI3D,qFAAqF;IAC9E,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAOxD,gDAAgD;IACzC,gBAAgB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI;IAIxD,8FAA8F;IACvF,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;IAKxD,4CAA4C;IACrC,YAAY,CAAC,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,GAAG,IAAI;yCAhG7C,4BAA4B;2CAA5B,4BAA4B;CAmGxC"}
@@ -3,7 +3,7 @@ import { CommonModule } from '@angular/common';
3
3
  import { CdkDropList, CdkDrag } from '@angular/cdk/drag-drop';
4
4
  import { MJWorkspaceTipDirective } from './workspace-tip.directive';
5
5
  import { MJTabListDirective } from '../tabs/tab-list.directive';
6
- import { warnIfTabChromeMissing } from '../tabs/tab-chrome-guard';
6
+ import { WarnIfTabChromeMissing } from '../tabs/tab-chrome-guard';
7
7
  import * as i0 from "@angular/core";
8
8
  const _forTrack0 = ($index, $item) => $item.Id;
9
9
  function MJWorkspaceTabStripComponent_For_3_Conditional_1_Template(rf, ctx) { if (rf & 1) {
@@ -88,7 +88,7 @@ function MJWorkspaceTabStripComponent_Conditional_4_Template(rf, ctx) { if (rf &
88
88
  export class MJWorkspaceTabStripComponent {
89
89
  elementRef = inject(ElementRef);
90
90
  ngAfterViewInit() {
91
- warnIfTabChromeMissing(this.elementRef.nativeElement);
91
+ WarnIfTabChromeMissing(this.elementRef.nativeElement);
92
92
  }
93
93
  Tabs = [];
94
94
  ActiveId = null;
@@ -115,16 +115,20 @@ export class MJWorkspaceTabStripComponent {
115
115
  NewTabRequested = new EventEmitter();
116
116
  TabReordered = new EventEmitter();
117
117
  /** CDK drop — emit the reorder intent; the host applies it to the store (the strip stays dumb). */
118
- onDrop(event) {
118
+ OnDrop(event) {
119
119
  if (event.previousIndex !== event.currentIndex) {
120
120
  this.TabReordered.emit({ previousIndex: event.previousIndex, currentIndex: event.currentIndex });
121
121
  }
122
122
  }
123
+ /** @deprecated Use {@link OnDrop}. */
124
+ onDrop(event) {
125
+ return this.OnDrop(event);
126
+ }
123
127
  /**
124
128
  * The tab's accessible name. The dirty dot and the rejected colour/icon are the only signals for
125
129
  * those states, and neither survives being read aloud — so they are spelled out here instead.
126
130
  */
127
- tabAccessibleName(tab) {
131
+ TabAccessibleName(tab) {
128
132
  const parts = [tab.Label];
129
133
  if (tab.Status === 'rejected')
130
134
  parts.push('(rejected)');
@@ -132,25 +136,41 @@ export class MJWorkspaceTabStripComponent {
132
136
  parts.push('(unsaved changes)');
133
137
  return parts.join(' ');
134
138
  }
139
+ /** @deprecated Use {@link TabAccessibleName}. */
140
+ tabAccessibleName(tab) {
141
+ return this.TabAccessibleName(tab);
142
+ }
135
143
  /** Keyboard arrow/Home/End/Enter from `mjTabList` — map the position back onto our id. */
136
- onActivateRequested(request) {
144
+ OnActivateRequested(request) {
137
145
  const tab = this.Tabs[request.Index];
138
146
  if (tab) {
139
147
  this.TabSelected.emit(tab.Id);
140
148
  }
141
149
  }
150
+ /** @deprecated Use {@link OnActivateRequested}. */
151
+ onActivateRequested(request) {
152
+ return this.OnActivateRequested(request);
153
+ }
142
154
  /** Delete/Backspace on a focused tab — the APG close gesture for a closeable tab. */
143
- onCloseRequested(request) {
155
+ OnCloseRequested(request) {
144
156
  const tab = this.Tabs[request.Index];
145
157
  if (tab) {
146
158
  this.TabClosed.emit(tab.Id);
147
159
  }
148
160
  }
161
+ /** @deprecated Use {@link OnCloseRequested}. */
162
+ onCloseRequested(request) {
163
+ return this.OnCloseRequested(request);
164
+ }
149
165
  /** The close button sits inside the tab, so its click would otherwise also select the tab. */
150
- onCloseClick(event, id) {
166
+ OnCloseClick(event, id) {
151
167
  event.stopPropagation();
152
168
  this.TabClosed.emit(id);
153
169
  }
170
+ /** @deprecated Use {@link OnCloseClick}. */
171
+ onCloseClick(event, id) {
172
+ return this.OnCloseClick(event, id);
173
+ }
154
174
  static ɵfac = function MJWorkspaceTabStripComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJWorkspaceTabStripComponent)(); };
155
175
  static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJWorkspaceTabStripComponent, selectors: [["mj-workspace-tab-strip"]], inputs: { Tabs: "Tabs", ActiveId: "ActiveId", ShowNewTab: "ShowNewTab", NewTabLabel: "NewTabLabel", AllowReorder: "AllowReorder" }, outputs: { TabSelected: "TabSelected", TabClosed: "TabClosed", NewTabRequested: "NewTabRequested", TabReordered: "TabReordered" }, decls: 5, vars: 1, consts: [[1, "mj-tabs", "mj-tabs__bar"], ["mjTabList", "", "cdkDropList", "", "cdkDropListOrientation", "horizontal", 1, "mj-tabs__list", 3, "TabActivateRequested", "TabCloseRequested", "cdkDropListDropped"], ["cdkDrag", "", "role", "tab", 1, "mj-tabs__tab", 3, "cdkDragDisabled", "cdkDragStartDelay", "mj-tabs__tab--active", "mj-tabs__tab--rejected", "mj-tabs__tab--complete"], ["type", "button", 1, "mj-tabs__new"], ["cdkDrag", "", "role", "tab", 1, "mj-tabs__tab", 3, "click", "cdkDragDisabled", "cdkDragStartDelay"], ["aria-hidden", "true", 1, "mj-tabs__icon", 3, "class"], ["aria-hidden", "true", 1, "fa-solid", "fa-triangle-exclamation", "mj-tabs__status-icon"], [1, "mj-tabs__label", 3, "mjTip"], ["aria-hidden", "true", 1, "mj-tabs__dirty"], ["type", "button", "tabindex", "-1", 1, "mj-tabs__close", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-xmark"], ["aria-hidden", "true", 1, "mj-tabs__icon"], ["type", "button", 1, "mj-tabs__new", 3, "click"], ["aria-hidden", "true", 1, "fa-solid", "fa-plus"]], template: function MJWorkspaceTabStripComponent_Template(rf, ctx) { if (rf & 1) {
156
176
  i0.ɵɵelementStart(0, "div", 0)(1, "div", 1);