@memberjunction/ng-ui-components 6.2.2 → 6.3.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 (66) hide show
  1. package/README.md +28 -4
  2. package/dist/lib/accordion/accordion-sections.component.d.ts +51 -0
  3. package/dist/lib/accordion/accordion-sections.component.d.ts.map +1 -0
  4. package/dist/lib/accordion/accordion-sections.component.js +138 -0
  5. package/dist/lib/accordion/accordion-sections.component.js.map +1 -0
  6. package/dist/lib/accordion/accordion.component.d.ts +53 -4
  7. package/dist/lib/accordion/accordion.component.d.ts.map +1 -1
  8. package/dist/lib/accordion/accordion.component.js +233 -68
  9. package/dist/lib/accordion/accordion.component.js.map +1 -1
  10. package/dist/lib/accordion/accordion.scss +76 -0
  11. package/dist/lib/combobox/combobox.component.d.ts +1 -1
  12. package/dist/lib/combobox/combobox.component.js +1 -1
  13. package/dist/lib/combobox/combobox.component.js.map +1 -1
  14. package/dist/lib/confirm-dialog/confirm-dialog.component.d.ts.map +1 -1
  15. package/dist/lib/confirm-dialog/confirm-dialog.component.js +6 -2
  16. package/dist/lib/confirm-dialog/confirm-dialog.component.js.map +1 -1
  17. package/dist/lib/datepicker/datepicker.component.d.ts +1 -1
  18. package/dist/lib/datepicker/datepicker.component.js +1 -1
  19. package/dist/lib/datepicker/datepicker.component.js.map +1 -1
  20. package/dist/lib/dialog/dialog.component.d.ts +15 -6
  21. package/dist/lib/dialog/dialog.component.d.ts.map +1 -1
  22. package/dist/lib/dialog/dialog.component.js +34 -13
  23. package/dist/lib/dialog/dialog.component.js.map +1 -1
  24. package/dist/lib/dialog/dialog.scss +82 -6
  25. package/dist/lib/dialog/dialog.service.d.ts +3 -3
  26. package/dist/lib/dialog/dialog.service.js +3 -3
  27. package/dist/lib/dialog/dialog.service.js.map +1 -1
  28. package/dist/lib/dropdown/dropdown.component.d.ts +0 -1
  29. package/dist/lib/dropdown/dropdown.component.d.ts.map +1 -1
  30. package/dist/lib/dropdown/dropdown.component.js +1 -2
  31. package/dist/lib/dropdown/dropdown.component.js.map +1 -1
  32. package/dist/lib/filter-panel/filter-panel.component.d.ts.map +1 -1
  33. package/dist/lib/filter-panel/filter-panel.component.js +5 -4
  34. package/dist/lib/filter-panel/filter-panel.component.js.map +1 -1
  35. package/dist/lib/input/chip.scss +1 -1
  36. package/dist/lib/input/input.scss +4 -4
  37. package/dist/lib/numeric-input/numeric-input.component.d.ts +1 -1
  38. package/dist/lib/numeric-input/numeric-input.component.js +1 -1
  39. package/dist/lib/numeric-input/numeric-input.component.js.map +1 -1
  40. package/dist/lib/progress-bar/progress-bar.component.d.ts +1 -1
  41. package/dist/lib/progress-bar/progress-bar.component.js +1 -1
  42. package/dist/lib/progress-bar/progress-bar.component.js.map +1 -1
  43. package/dist/lib/section-picker/section-picker.component.d.ts +108 -0
  44. package/dist/lib/section-picker/section-picker.component.d.ts.map +1 -0
  45. package/dist/lib/section-picker/section-picker.component.js +429 -0
  46. package/dist/lib/section-picker/section-picker.component.js.map +1 -0
  47. package/dist/lib/splitter/splitter.component.d.ts +2 -5
  48. package/dist/lib/splitter/splitter.component.d.ts.map +1 -1
  49. package/dist/lib/splitter/splitter.component.js +2 -5
  50. package/dist/lib/splitter/splitter.component.js.map +1 -1
  51. package/dist/lib/switch/switch.component.d.ts +1 -1
  52. package/dist/lib/switch/switch.component.js +1 -1
  53. package/dist/lib/switch/switch.component.js.map +1 -1
  54. package/dist/lib/viewport/phone-viewport.d.ts +15 -0
  55. package/dist/lib/viewport/phone-viewport.d.ts.map +1 -0
  56. package/dist/lib/viewport/phone-viewport.js +29 -0
  57. package/dist/lib/viewport/phone-viewport.js.map +1 -0
  58. package/dist/lib/window/window.component.d.ts +3 -3
  59. package/dist/lib/window/window.component.js +3 -3
  60. package/dist/lib/window/window.component.js.map +1 -1
  61. package/dist/lib/window/window.scss +43 -4
  62. package/dist/public-api.d.ts +3 -0
  63. package/dist/public-api.d.ts.map +1 -1
  64. package/dist/public-api.js +3 -0
  65. package/dist/public-api.js.map +1 -1
  66. package/package.json +3 -3
@@ -6,7 +6,7 @@ import * as i0 from "@angular/core";
6
6
  /**
7
7
  * mj-combobox — Editable dropdown with filtering and optional custom values.
8
8
  *
9
- * Replaces `<kendo-combobox>`. Unlike mj-dropdown, the trigger is a text input
9
+ * Unlike mj-dropdown, the trigger is a text input
10
10
  * that filters the list as you type. When AllowCustom is true, typed text that
11
11
  * doesn't match any item is emitted as the value.
12
12
  *
@@ -73,7 +73,7 @@ function MJComboboxComponent_ng_template_12_Template(rf, ctx) { if (rf & 1) {
73
73
  /**
74
74
  * mj-combobox — Editable dropdown with filtering and optional custom values.
75
75
  *
76
- * Replaces `<kendo-combobox>`. Unlike mj-dropdown, the trigger is a text input
76
+ * Unlike mj-dropdown, the trigger is a text input
77
77
  * that filters the list as you type. When AllowCustom is true, typed text that
78
78
  * doesn't match any item is emitted as the value.
79
79
  *
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.component.js","sourceRoot":"","sources":["../../../src/lib/combobox/combobox.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,WAAW,EAEX,SAAS,EACT,YAAY,EAGZ,MAAM,EACN,iBAAiB,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAqB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;IAwFtD,iCAM0D;IAFxD,qMAAa,sBAAe,KAAC;IAG7B,wBAAiC;IACnC,iBAAS;;;;;;IAsCH,wBAA4F;;;IAA5F,0HAA6E;;;;IAA9B,AAAhC,sDAAgC,g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,IAAC;YAGvC,wBAAwC;YAE5C,AADE,iBAAS,EACL;YAEN,sFASqB;YAAnB,AADA,sHAAiB,WAAO,IAAC,2FACf,WAAO,IAAC;;;YAvElB,AADA,+CAAkC,yCACQ;YAoBxC,eAA2B;YAE3B,AADA,AADA,6CAA2B,wBACR,4BACI;;YAe4B,eAAyC;;YACzC,eAA0C;;YAC/F,eAUC;YAVD,2DAUC;YAKC,cAAuB;YAAvB,yCAAuB;;YAUzB,eAA2C;YAI3C,AADA,AADA,AADA,AADA,4DAA2C,uCACT,+CACQ,8CACD,wCACF;4BA5EjC,gBAAgB,EAAE,aAAa;;iFAsI9B,mBAAmB;cAzI/B,SAAS;2BACE,aAAa,cACX,IAAI,WACP,CAAC,gBAAgB,EAAE,aAAa,CAAC,YAChC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGT,aAuBU,CAAC;wBACV,OAAO,EAAE,iBAAiB;wBAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,oBAAoB,CAAC;wBAClD,KAAK,EAAE,IAAI;qBACZ,CAAC;;kBAGD,KAAK;;kBAUL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAOL,KAAK;;kBAQL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBAEN,YAAY;mBAAC,gBAAgB;;kBAE7B,SAAS;mBAAC,SAAS;;kBACnB,SAAS;mBAAC,YAAY;;kBAEtB,WAAW;mBAAC,wBAAwB;;kFAxC1B,mBAAmB","sourcesContent":["import {\n AfterViewInit,\n Component,\n Input,\n Output,\n EventEmitter,\n forwardRef,\n HostBinding,\n ElementRef,\n ViewChild,\n ContentChild,\n TemplateRef,\n OnDestroy,\n inject,\n ChangeDetectorRef\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { OverlayModule, ConnectedPosition } from '@angular/cdk/overlay';\nimport { MJNamedControlBase } from '../a11y/named-control.base';\nimport { WarnIfUnnamed } from '../a11y/unnamed-control-guard';\n\n/**\n * mj-combobox — Editable dropdown with filtering and optional custom values.\n *\n * Replaces `<kendo-combobox>`. Unlike mj-dropdown, the trigger is a text input\n * that filters the list as you type. When AllowCustom is true, typed text that\n * doesn't match any item is emitted as the value.\n *\n * Every combobox needs an ACCESSIBLE NAME, or it announces as \"combobox, collapsed\" with no hint of\n * what it selects (WCAG 2.1 4.1.2). Use {@link MJNamedControlBase.AriaLabelledBy} when a visible\n * label already exists and {@link MJNamedControlBase.AriaLabel} when none does. Here the trigger is\n * a real `<input>`, so {@link MJNamedControlBase.InputId} IS a valid `<label for>` target — unlike\n * `mj-dropdown`, whose trigger is a div.\n *\n * @example With a visible label (preferred)\n * ```html\n * <span id=\"category-label\">Category</span>\n * <mj-combobox AriaLabelledBy=\"category-label\" [Data]=\"categories\" TextField=\"text\"\n * ValueField=\"value\" [(ngModel)]=\"selectedCategory\" [ValuePrimitive]=\"true\">\n * </mj-combobox>\n * ```\n *\n * @example\n * ```html\n * <mj-combobox\n * [Data]=\"categories\"\n * TextField=\"text\"\n * ValueField=\"value\"\n * [(ngModel)]=\"selectedCategory\"\n * [ValuePrimitive]=\"true\"\n * [AllowCustom]=\"true\"\n * [Filterable]=\"true\"\n * Placeholder=\"Select or enter new...\">\n * </mj-combobox>\n * ```\n */\n@Component({\n selector: 'mj-combobox',\n standalone: true,\n imports: [NgTemplateOutlet, OverlayModule],\n template: `\n <div\n class=\"mj-combobox\"\n #trigger\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n [class.mj-combobox--open]=\"IsOpen\"\n [class.mj-combobox--disabled]=\"IsDisabled\">\n <!--\n role=\"combobox\" belongs on the INPUT, not on this wrapper. The wrapper is not focusable, so\n a screen reader never lands on it: its role, its name and its expanded state all went\n unannounced while the element the user actually focused announced as a plain textbox.\n -->\n <input\n #comboInput\n class=\"mj-input mj-combobox-input\"\n type=\"text\"\n role=\"combobox\"\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-expanded]=\"IsOpen\"\n aria-haspopup=\"listbox\"\n [attr.aria-autocomplete]=\"Filterable ? 'list' : 'none'\"\n [attr.aria-controls]=\"IsOpen ? ListboxId : null\"\n [attr.aria-activedescendant]=\"ActiveDescendantId\"\n [placeholder]=\"Placeholder\"\n [value]=\"InputText\"\n [disabled]=\"IsDisabled\"\n (input)=\"OnInput($event)\"\n (focus)=\"OnFocus()\"\n (keydown)=\"OnKeyDown($event)\"\n (blur)=\"OnInputBlur()\"\n autocomplete=\"off\" />\n <!--\n The fixed words live in hidden spans rather than in concatenated strings so the\n AriaLabelledBy path can name these two buttons from the same visible label that names the\n combobox: aria-labelledby takes an ID LIST, so the word plus the label's own text is\n composed by the accessibility tree without this component ever seeing that text.\n A hidden node that is DIRECTLY referenced by aria-labelledby is still included in the name\n (accname §4.1), so aria-hidden keeps the word out of the reading order without costing the\n composed name.\n -->\n <span class=\"mj-combobox-sr-only\" aria-hidden=\"true\" [attr.id]=\"SecondaryWordId('clear-word')\">Clear</span>\n <span class=\"mj-combobox-sr-only\" aria-hidden=\"true\" [attr.id]=\"SecondaryWordId('toggle-word')\">Show options for</span>\n @if (InputText && !IsDisabled) {\n <button\n class=\"mj-combobox-clear\"\n type=\"button\"\n tabindex=\"-1\"\n (mousedown)=\"OnClear($event)\"\n [attr.aria-labelledby]=\"ClearLabelledBy || null\"\n [attr.aria-label]=\"ClearLabelledBy ? null : ClearLabel\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n <button\n class=\"mj-combobox-toggle\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"IsDisabled\"\n (mousedown)=\"OnToggleMouseDown($event)\"\n [attr.aria-labelledby]=\"ToggleLabelledBy || null\"\n [attr.aria-label]=\"ToggleLabelledBy ? null : ToggleLabel\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"IsOpen\"\n [cdkConnectedOverlayPositions]=\"Positions\"\n [cdkConnectedOverlayWidth]=\"TriggerWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"mj-dropdown-backdrop\"\n (backdropClick)=\"Close()\"\n (detach)=\"Close()\">\n <div class=\"mj-dropdown-panel\" role=\"listbox\"\n [attr.id]=\"ListboxId\"\n [attr.aria-label]=\"AriaLabel || null\"\n [attr.aria-labelledby]=\"AriaLabelledBy || null\">\n @for (item of FilteredItems; track TrackByIndex($index)) {\n <div\n class=\"mj-dropdown-option\"\n [class.mj-dropdown-option--selected]=\"IsItemSelected(item)\"\n [class.mj-dropdown-option--highlighted]=\"HighlightedIndex === $index\"\n role=\"option\"\n [attr.id]=\"OptionId($index)\"\n [attr.aria-selected]=\"IsItemSelected(item)\"\n (mousedown)=\"SelectItem(item, $event)\">\n @if (ItemTemplate) {\n <ng-container *ngTemplateOutlet=\"ItemTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ GetItemText(item) }}\n }\n </div>\n }\n @if (FilteredItems.length === 0) {\n <div class=\"mj-dropdown-no-data\">No data found</div>\n }\n </div>\n </ng-template>\n `,\n styles: [`\n /*\n * Component-scoped ON PURPOSE, unlike the rest of this control's styling, which ships as a global\n * stylesheet the host application imports. A host that skips that import gets unstyled chrome —\n * survivable — but a hidden-word span that is not hidden renders its word as literal text in the\n * middle of the field. The rule that hides it therefore has to travel with the component.\n *\n * Not display:none or visibility:hidden — both remove the element from the accessibility tree,\n * which is the one thing this element exists to be in.\n */\n .mj-combobox-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MJComboboxComponent),\n multi: true\n }]\n})\nexport class MJComboboxComponent extends MJNamedControlBase implements ControlValueAccessor, AfterViewInit, OnDestroy {\n @Input()\n set Data(value: Record<string, unknown>[] | string[] | readonly unknown[] | null) {\n this._data = value;\n // Re-resolve display text when data arrives after writeValue\n if (this.SelectedValue != null && !this.InputText) {\n this.InputText = this.getDisplayText();\n }\n }\n get Data(): Record<string, unknown>[] | string[] | readonly unknown[] | null { return this._data; }\n private _data: Record<string, unknown>[] | string[] | readonly unknown[] | null = [];\n @Input() TextField = '';\n @Input() ValueField = '';\n @Input() Filterable = true;\n @Input() ValuePrimitive = false;\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) {\n this.disabledInput = value;\n this.syncDisabled();\n }\n get Disabled(): boolean {\n return this.disabledInput;\n }\n @Input() Placeholder = '';\n @Input() AllowCustom = false;\n\n @Output() ValueChange = new EventEmitter<unknown>();\n @Output() FilterChange = new EventEmitter<string>();\n\n @ContentChild('mjComboboxItem') ItemTemplate: TemplateRef<{ $implicit: unknown }> | null = null;\n\n @ViewChild('trigger') private triggerEl!: ElementRef<HTMLElement>;\n @ViewChild('comboInput') ComboInput!: ElementRef<HTMLInputElement>;\n\n @HostBinding('class.mj-combobox-host') readonly hostClass = true;\n\n private cdr = inject(ChangeDetectorRef);\n\n IsOpen = false;\n /**\n * The single gate on `Toggle()` / `Open()` — true when EITHER the `Disabled` input or Angular\n * Forms says so. Never assign it directly; go through `syncDisabled()`.\n */\n IsDisabled = false;\n HighlightedIndex = -1;\n SelectedValue: unknown = null;\n TriggerWidth = 0;\n InputText = '';\n\n Positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ];\n\n /**\n * Id of the popup listbox, so the input can point `aria-controls` at it while open — the half of\n * the combobox pattern that makes \"collapsed/expanded\" refer to something a screen reader can\n * find.\n */\n get ListboxId(): string { return `mj-combobox-listbox-${this.NamedControlId}`; }\n\n /** Id of one rendered option, referenced by {@link ActiveDescendantId}. */\n OptionId(index: number): string { return `mj-combobox-option-${this.NamedControlId}-${index}`; }\n\n /**\n * `aria-activedescendant` for the input: the option the arrow keys have moved to. Focus stays in\n * the input the whole time, so without this the highlight is a CSS class and nothing else — a\n * screen-reader user arrowing through the list hears no change at all.\n */\n get ActiveDescendantId(): string | null {\n const active = this.IsOpen && this.HighlightedIndex >= 0 && this.HighlightedIndex < this.FilteredItems.length;\n return active ? this.OptionId(this.HighlightedIndex) : null;\n }\n\n /** `aria-labelledby` id list for the clear button when a VISIBLE label names the combobox. */\n get ClearLabelledBy(): string { return this.SecondaryLabelledBy('clear-word'); }\n\n /** `aria-label` for the clear button in the no-visible-label case. */\n get ClearLabel(): string { return this.SecondaryLabel('Clear', 'Clear'); }\n\n /** `aria-labelledby` id list for the toggle button when a VISIBLE label names the combobox. */\n get ToggleLabelledBy(): string { return this.SecondaryLabelledBy('toggle-word'); }\n\n /**\n * `aria-label` for the toggle button in the no-visible-label case. It had no name at all before\n * #4116 — an unnamed button next to a named input, which announces as \"button\".\n */\n get ToggleLabel(): string { return this.SecondaryLabel('Show options for', 'Show options'); }\n\n private onChange: (value: unknown) => void = () => {};\n private onTouched: () => void = () => {};\n private isBlurring = false;\n\n get FilteredItems(): unknown[] {\n const data = (this.Data ?? []) as unknown[];\n if (!this.Filterable || !this.InputText) return data;\n const search = this.InputText.toLowerCase();\n return data.filter(item => this.GetItemText(item).toLowerCase().includes(search));\n }\n\n OnInput(event: Event): void {\n this.InputText = (event.target as HTMLInputElement).value;\n this.HighlightedIndex = 0;\n this.FilterChange.emit(this.InputText);\n if (!this.IsOpen) this.Open();\n this.cdr.detectChanges();\n }\n\n OnFocus(): void {\n if (!this.IsOpen) this.Open();\n }\n\n OnToggleMouseDown(event: Event): void {\n event.preventDefault(); // Prevent blur on the input\n this.Toggle();\n }\n\n OnClear(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.isBlurring = false;\n this.InputText = '';\n this.SelectedValue = null;\n this.onChange(null);\n this.ValueChange.emit(null);\n this.Close();\n this.cdr.detectChanges();\n }\n\n OnInputBlur(): void {\n this.isBlurring = true;\n setTimeout(() => {\n if (!this.isBlurring) return;\n this.isBlurring = false;\n this.commitValue();\n this.Close();\n this.onTouched();\n }, 150);\n }\n\n Toggle(): void {\n if (this.IsDisabled) return;\n this.IsOpen ? this.Close() : this.Open();\n }\n\n Open(): void {\n if (this.IsDisabled || this.IsOpen) return;\n this.TriggerWidth = this.triggerEl?.nativeElement.offsetWidth ?? 200;\n this.IsOpen = true;\n this.HighlightedIndex = this.getSelectedIndex();\n this.cdr.detectChanges();\n }\n\n Close(): void {\n if (!this.IsOpen) return;\n this.resetPanelState();\n this.cdr.detectChanges();\n }\n\n /**\n * Panel state only — no change detection. Split out of `Close()` because `syncDisabled()` can\n * run from an @Input setter, i.e. DURING the parent's change-detection pass, where a nested\n * `detectChanges()` re-enters CD and trips NG0100 on the parent's own bindings.\n */\n private resetPanelState(): void {\n this.IsOpen = false;\n this.HighlightedIndex = -1;\n }\n\n /** Backing field for the `Disabled` input. */\n private disabledInput = false;\n /** The forms-driven disabled state, kept SEPARATE so neither source can stomp the other. */\n private formDisabled = false;\n\n /**\n * Recompute the gate from both of its sources. Called whenever either 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 if (disabled) this.resetPanelState();\n this.cdr.markForCheck();\n }\n\n SelectItem(item: unknown, event?: Event): void {\n event?.preventDefault();\n event?.stopPropagation();\n this.isBlurring = false;\n\n const value = this.ValuePrimitive && this.ValueField ? this.GetItemValue(item) : item;\n this.SelectedValue = value;\n this.InputText = this.GetItemText(item);\n this.onChange(value);\n this.ValueChange.emit(value);\n this.Close();\n this.cdr.detectChanges();\n }\n\n /** Commit the current input text as a value (for AllowCustom or matching item) */\n private commitValue(): void {\n if (!this.InputText.trim()) {\n // Empty input — clear the value\n if (this.SelectedValue != null) {\n this.SelectedValue = null;\n this.onChange(null);\n this.ValueChange.emit(null);\n }\n return;\n }\n\n // Try to find a matching item\n const data = (this.Data ?? []) as unknown[];\n const match = data.find(item => this.GetItemText(item).toLowerCase() === this.InputText.toLowerCase());\n if (match) {\n const value = this.ValuePrimitive && this.ValueField ? this.GetItemValue(match) : match;\n if (value !== this.SelectedValue) {\n this.SelectedValue = value;\n this.InputText = this.GetItemText(match);\n this.onChange(value);\n this.ValueChange.emit(value);\n }\n } else if (this.AllowCustom) {\n // No match but custom values allowed — emit the typed text\n this.SelectedValue = this.InputText;\n this.onChange(this.InputText);\n this.ValueChange.emit(this.InputText);\n } else {\n // No match and no custom — revert to previous display\n this.InputText = this.getDisplayText();\n }\n }\n\n IsItemSelected(item: unknown): boolean {\n if (this.SelectedValue == null) return false;\n if (this.ValuePrimitive && this.ValueField) return this.GetItemValue(item) === this.SelectedValue;\n if (this.ValueField && typeof item === 'object' && typeof this.SelectedValue === 'object')\n return this.GetItemValue(item) === this.GetItemValue(this.SelectedValue);\n return item === this.SelectedValue;\n }\n\n OnKeyDown(event: KeyboardEvent): void {\n const items = this.FilteredItems;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!this.IsOpen) this.Open();\n else this.HighlightedIndex = Math.min(this.HighlightedIndex + 1, items.length - 1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (this.IsOpen) this.HighlightedIndex = Math.max(this.HighlightedIndex - 1, 0);\n break;\n case 'Enter':\n event.preventDefault();\n if (this.IsOpen && this.HighlightedIndex >= 0 && this.HighlightedIndex < items.length) {\n this.SelectItem(items[this.HighlightedIndex]);\n } else {\n this.commitValue();\n this.Close();\n }\n break;\n case 'Escape':\n event.preventDefault();\n this.InputText = this.getDisplayText();\n this.Close();\n break;\n }\n }\n\n GetItemText(item: unknown): string {\n if (item == null) return '';\n if (typeof item === 'string') return item;\n if (this.TextField && typeof item === 'object') return String((item as Record<string, unknown>)[this.TextField] ?? '');\n return String(item);\n }\n\n GetItemValue(item: unknown): unknown {\n if (typeof item === 'string') return item;\n if (this.ValueField && typeof item === 'object' && item != null) return (item as Record<string, unknown>)[this.ValueField];\n return item;\n }\n\n TrackByIndex(index: number): number { return index; }\n\n writeValue(value: unknown): void {\n this.SelectedValue = value;\n this.InputText = this.getDisplayText();\n }\n\n registerOnChange(fn: (value: unknown) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.formDisabled = isDisabled; this.syncDisabled(); }\n ngAfterViewInit(): void { WarnIfUnnamed(this.ComboInput?.nativeElement, 'mj-combobox'); }\n ngOnDestroy(): void { this.Close(); }\n\n private getDisplayText(): string {\n if (this.SelectedValue == null) return '';\n if (this.ValuePrimitive && this.ValueField) {\n const found = ((this.Data ?? []) as unknown[]).find(item => this.GetItemValue(item) === this.SelectedValue);\n return found ? this.GetItemText(found) : String(this.SelectedValue);\n }\n if (typeof this.SelectedValue === 'string') return this.SelectedValue;\n return this.GetItemText(this.SelectedValue as Record<string, unknown>);\n }\n\n private getSelectedIndex(): number {\n if (this.SelectedValue == null) return -1;\n return this.FilteredItems.findIndex(item => this.IsItemSelected(item));\n }\n}\n"]}
1
+ {"version":3,"file":"combobox.component.js","sourceRoot":"","sources":["../../../src/lib/combobox/combobox.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,EACT,KAAK,EACL,MAAM,EACN,YAAY,EACZ,UAAU,EACV,WAAW,EAEX,SAAS,EACT,YAAY,EAGZ,MAAM,EACN,iBAAiB,EAClB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAqB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;;;;;;IAwFtD,iCAM0D;IAFxD,qMAAa,sBAAe,KAAC;IAG7B,wBAAiC;IACnC,iBAAS;;;;;;IAsCH,wBAA4F;;;IAA5F,0HAA6E;;;;IAA9B,AAAhC,sDAAgC,gEAA4B;;;IAE3E,YACF;;;;IADE,4DACF;;;;IAZF,+BAOyC;IAAvC,oOAAa,kCAAwB,KAAC;IAGpC,AAFF,gHAAoB,0EAEX;IAGX,iBAAM;;;;;IAVJ,AADA,8EAA2D,0EACU;;IAKrE,cAIC;IAJD,6CAIC;;;IAIH,+BAAiC;IAAA,6BAAa;IAAA,iBAAM;;;IArBxD,+BAGkD;IAChD,uIAeC;IACD,qGAAkC;IAGpC,iBAAM;;;;IAnBJ,cAeC;IAfD,mCAeC;IACD,eAEC;IAFD,4DAEC;;AA5IT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AA0IH,MAAM,OAAO,mBAAoB,SAAQ,kBAAkB;IACzD,IACI,IAAI,CAAC,KAAuE;QAC9E,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,6DAA6D;QAC7D,IAAI,IAAI,CAAC,aAAa,IAAI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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwGT,aAuBU,CAAC;wBACV,OAAO,EAAE,iBAAiB;wBAC1B,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,oBAAoB,CAAC;wBAClD,KAAK,EAAE,IAAI;qBACZ,CAAC;;kBAGD,KAAK;;kBAUL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAOL,KAAK;;kBAQL,KAAK;;kBACL,KAAK;;kBAEL,MAAM;;kBACN,MAAM;;kBAEN,YAAY;mBAAC,gBAAgB;;kBAE7B,SAAS;mBAAC,SAAS;;kBACnB,SAAS;mBAAC,YAAY;;kBAEtB,WAAW;mBAAC,wBAAwB;;kFAxC1B,mBAAmB","sourcesContent":["import {\n AfterViewInit,\n Component,\n Input,\n Output,\n EventEmitter,\n forwardRef,\n HostBinding,\n ElementRef,\n ViewChild,\n ContentChild,\n TemplateRef,\n OnDestroy,\n inject,\n ChangeDetectorRef\n} from '@angular/core';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { OverlayModule, ConnectedPosition } from '@angular/cdk/overlay';\nimport { MJNamedControlBase } from '../a11y/named-control.base';\nimport { WarnIfUnnamed } from '../a11y/unnamed-control-guard';\n\n/**\n * mj-combobox — Editable dropdown with filtering and optional custom values.\n *\n * Unlike mj-dropdown, the trigger is a text input\n * that filters the list as you type. When AllowCustom is true, typed text that\n * doesn't match any item is emitted as the value.\n *\n * Every combobox needs an ACCESSIBLE NAME, or it announces as \"combobox, collapsed\" with no hint of\n * what it selects (WCAG 2.1 4.1.2). Use {@link MJNamedControlBase.AriaLabelledBy} when a visible\n * label already exists and {@link MJNamedControlBase.AriaLabel} when none does. Here the trigger is\n * a real `<input>`, so {@link MJNamedControlBase.InputId} IS a valid `<label for>` target — unlike\n * `mj-dropdown`, whose trigger is a div.\n *\n * @example With a visible label (preferred)\n * ```html\n * <span id=\"category-label\">Category</span>\n * <mj-combobox AriaLabelledBy=\"category-label\" [Data]=\"categories\" TextField=\"text\"\n * ValueField=\"value\" [(ngModel)]=\"selectedCategory\" [ValuePrimitive]=\"true\">\n * </mj-combobox>\n * ```\n *\n * @example\n * ```html\n * <mj-combobox\n * [Data]=\"categories\"\n * TextField=\"text\"\n * ValueField=\"value\"\n * [(ngModel)]=\"selectedCategory\"\n * [ValuePrimitive]=\"true\"\n * [AllowCustom]=\"true\"\n * [Filterable]=\"true\"\n * Placeholder=\"Select or enter new...\">\n * </mj-combobox>\n * ```\n */\n@Component({\n selector: 'mj-combobox',\n standalone: true,\n imports: [NgTemplateOutlet, OverlayModule],\n template: `\n <div\n class=\"mj-combobox\"\n #trigger\n cdkOverlayOrigin\n #overlayOrigin=\"cdkOverlayOrigin\"\n [class.mj-combobox--open]=\"IsOpen\"\n [class.mj-combobox--disabled]=\"IsDisabled\">\n <!--\n role=\"combobox\" belongs on the INPUT, not on this wrapper. The wrapper is not focusable, so\n a screen reader never lands on it: its role, its name and its expanded state all went\n unannounced while the element the user actually focused announced as a plain textbox.\n -->\n <input\n #comboInput\n class=\"mj-input mj-combobox-input\"\n type=\"text\"\n role=\"combobox\"\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-expanded]=\"IsOpen\"\n aria-haspopup=\"listbox\"\n [attr.aria-autocomplete]=\"Filterable ? 'list' : 'none'\"\n [attr.aria-controls]=\"IsOpen ? ListboxId : null\"\n [attr.aria-activedescendant]=\"ActiveDescendantId\"\n [placeholder]=\"Placeholder\"\n [value]=\"InputText\"\n [disabled]=\"IsDisabled\"\n (input)=\"OnInput($event)\"\n (focus)=\"OnFocus()\"\n (keydown)=\"OnKeyDown($event)\"\n (blur)=\"OnInputBlur()\"\n autocomplete=\"off\" />\n <!--\n The fixed words live in hidden spans rather than in concatenated strings so the\n AriaLabelledBy path can name these two buttons from the same visible label that names the\n combobox: aria-labelledby takes an ID LIST, so the word plus the label's own text is\n composed by the accessibility tree without this component ever seeing that text.\n A hidden node that is DIRECTLY referenced by aria-labelledby is still included in the name\n (accname §4.1), so aria-hidden keeps the word out of the reading order without costing the\n composed name.\n -->\n <span class=\"mj-combobox-sr-only\" aria-hidden=\"true\" [attr.id]=\"SecondaryWordId('clear-word')\">Clear</span>\n <span class=\"mj-combobox-sr-only\" aria-hidden=\"true\" [attr.id]=\"SecondaryWordId('toggle-word')\">Show options for</span>\n @if (InputText && !IsDisabled) {\n <button\n class=\"mj-combobox-clear\"\n type=\"button\"\n tabindex=\"-1\"\n (mousedown)=\"OnClear($event)\"\n [attr.aria-labelledby]=\"ClearLabelledBy || null\"\n [attr.aria-label]=\"ClearLabelledBy ? null : ClearLabel\">\n <i class=\"fa-solid fa-times\"></i>\n </button>\n }\n <button\n class=\"mj-combobox-toggle\"\n type=\"button\"\n tabindex=\"-1\"\n [disabled]=\"IsDisabled\"\n (mousedown)=\"OnToggleMouseDown($event)\"\n [attr.aria-labelledby]=\"ToggleLabelledBy || null\"\n [attr.aria-label]=\"ToggleLabelledBy ? null : ToggleLabel\">\n <i class=\"fa-solid fa-chevron-down\"></i>\n </button>\n </div>\n\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"IsOpen\"\n [cdkConnectedOverlayPositions]=\"Positions\"\n [cdkConnectedOverlayWidth]=\"TriggerWidth\"\n [cdkConnectedOverlayHasBackdrop]=\"true\"\n cdkConnectedOverlayBackdropClass=\"mj-dropdown-backdrop\"\n (backdropClick)=\"Close()\"\n (detach)=\"Close()\">\n <div class=\"mj-dropdown-panel\" role=\"listbox\"\n [attr.id]=\"ListboxId\"\n [attr.aria-label]=\"AriaLabel || null\"\n [attr.aria-labelledby]=\"AriaLabelledBy || null\">\n @for (item of FilteredItems; track TrackByIndex($index)) {\n <div\n class=\"mj-dropdown-option\"\n [class.mj-dropdown-option--selected]=\"IsItemSelected(item)\"\n [class.mj-dropdown-option--highlighted]=\"HighlightedIndex === $index\"\n role=\"option\"\n [attr.id]=\"OptionId($index)\"\n [attr.aria-selected]=\"IsItemSelected(item)\"\n (mousedown)=\"SelectItem(item, $event)\">\n @if (ItemTemplate) {\n <ng-container *ngTemplateOutlet=\"ItemTemplate; context: { $implicit: item }\"></ng-container>\n } @else {\n {{ GetItemText(item) }}\n }\n </div>\n }\n @if (FilteredItems.length === 0) {\n <div class=\"mj-dropdown-no-data\">No data found</div>\n }\n </div>\n </ng-template>\n `,\n styles: [`\n /*\n * Component-scoped ON PURPOSE, unlike the rest of this control's styling, which ships as a global\n * stylesheet the host application imports. A host that skips that import gets unstyled chrome —\n * survivable — but a hidden-word span that is not hidden renders its word as literal text in the\n * middle of the field. The rule that hides it therefore has to travel with the component.\n *\n * Not display:none or visibility:hidden — both remove the element from the accessibility tree,\n * which is the one thing this element exists to be in.\n */\n .mj-combobox-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `],\n providers: [{\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => MJComboboxComponent),\n multi: true\n }]\n})\nexport class MJComboboxComponent extends MJNamedControlBase implements ControlValueAccessor, AfterViewInit, OnDestroy {\n @Input()\n set Data(value: Record<string, unknown>[] | string[] | readonly unknown[] | null) {\n this._data = value;\n // Re-resolve display text when data arrives after writeValue\n if (this.SelectedValue != null && !this.InputText) {\n this.InputText = this.getDisplayText();\n }\n }\n get Data(): Record<string, unknown>[] | string[] | readonly unknown[] | null { return this._data; }\n private _data: Record<string, unknown>[] | string[] | readonly unknown[] | null = [];\n @Input() TextField = '';\n @Input() ValueField = '';\n @Input() Filterable = true;\n @Input() ValuePrimitive = false;\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) {\n this.disabledInput = value;\n this.syncDisabled();\n }\n get Disabled(): boolean {\n return this.disabledInput;\n }\n @Input() Placeholder = '';\n @Input() AllowCustom = false;\n\n @Output() ValueChange = new EventEmitter<unknown>();\n @Output() FilterChange = new EventEmitter<string>();\n\n @ContentChild('mjComboboxItem') ItemTemplate: TemplateRef<{ $implicit: unknown }> | null = null;\n\n @ViewChild('trigger') private triggerEl!: ElementRef<HTMLElement>;\n @ViewChild('comboInput') ComboInput!: ElementRef<HTMLInputElement>;\n\n @HostBinding('class.mj-combobox-host') readonly hostClass = true;\n\n private cdr = inject(ChangeDetectorRef);\n\n IsOpen = false;\n /**\n * The single gate on `Toggle()` / `Open()` — true when EITHER the `Disabled` input or Angular\n * Forms says so. Never assign it directly; go through `syncDisabled()`.\n */\n IsDisabled = false;\n HighlightedIndex = -1;\n SelectedValue: unknown = null;\n TriggerWidth = 0;\n InputText = '';\n\n Positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ];\n\n /**\n * Id of the popup listbox, so the input can point `aria-controls` at it while open — the half of\n * the combobox pattern that makes \"collapsed/expanded\" refer to something a screen reader can\n * find.\n */\n get ListboxId(): string { return `mj-combobox-listbox-${this.NamedControlId}`; }\n\n /** Id of one rendered option, referenced by {@link ActiveDescendantId}. */\n OptionId(index: number): string { return `mj-combobox-option-${this.NamedControlId}-${index}`; }\n\n /**\n * `aria-activedescendant` for the input: the option the arrow keys have moved to. Focus stays in\n * the input the whole time, so without this the highlight is a CSS class and nothing else — a\n * screen-reader user arrowing through the list hears no change at all.\n */\n get ActiveDescendantId(): string | null {\n const active = this.IsOpen && this.HighlightedIndex >= 0 && this.HighlightedIndex < this.FilteredItems.length;\n return active ? this.OptionId(this.HighlightedIndex) : null;\n }\n\n /** `aria-labelledby` id list for the clear button when a VISIBLE label names the combobox. */\n get ClearLabelledBy(): string { return this.SecondaryLabelledBy('clear-word'); }\n\n /** `aria-label` for the clear button in the no-visible-label case. */\n get ClearLabel(): string { return this.SecondaryLabel('Clear', 'Clear'); }\n\n /** `aria-labelledby` id list for the toggle button when a VISIBLE label names the combobox. */\n get ToggleLabelledBy(): string { return this.SecondaryLabelledBy('toggle-word'); }\n\n /**\n * `aria-label` for the toggle button in the no-visible-label case. It had no name at all before\n * #4116 — an unnamed button next to a named input, which announces as \"button\".\n */\n get ToggleLabel(): string { return this.SecondaryLabel('Show options for', 'Show options'); }\n\n private onChange: (value: unknown) => void = () => {};\n private onTouched: () => void = () => {};\n private isBlurring = false;\n\n get FilteredItems(): unknown[] {\n const data = (this.Data ?? []) as unknown[];\n if (!this.Filterable || !this.InputText) return data;\n const search = this.InputText.toLowerCase();\n return data.filter(item => this.GetItemText(item).toLowerCase().includes(search));\n }\n\n OnInput(event: Event): void {\n this.InputText = (event.target as HTMLInputElement).value;\n this.HighlightedIndex = 0;\n this.FilterChange.emit(this.InputText);\n if (!this.IsOpen) this.Open();\n this.cdr.detectChanges();\n }\n\n OnFocus(): void {\n if (!this.IsOpen) this.Open();\n }\n\n OnToggleMouseDown(event: Event): void {\n event.preventDefault(); // Prevent blur on the input\n this.Toggle();\n }\n\n OnClear(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.isBlurring = false;\n this.InputText = '';\n this.SelectedValue = null;\n this.onChange(null);\n this.ValueChange.emit(null);\n this.Close();\n this.cdr.detectChanges();\n }\n\n OnInputBlur(): void {\n this.isBlurring = true;\n setTimeout(() => {\n if (!this.isBlurring) return;\n this.isBlurring = false;\n this.commitValue();\n this.Close();\n this.onTouched();\n }, 150);\n }\n\n Toggle(): void {\n if (this.IsDisabled) return;\n this.IsOpen ? this.Close() : this.Open();\n }\n\n Open(): void {\n if (this.IsDisabled || this.IsOpen) return;\n this.TriggerWidth = this.triggerEl?.nativeElement.offsetWidth ?? 200;\n this.IsOpen = true;\n this.HighlightedIndex = this.getSelectedIndex();\n this.cdr.detectChanges();\n }\n\n Close(): void {\n if (!this.IsOpen) return;\n this.resetPanelState();\n this.cdr.detectChanges();\n }\n\n /**\n * Panel state only — no change detection. Split out of `Close()` because `syncDisabled()` can\n * run from an @Input setter, i.e. DURING the parent's change-detection pass, where a nested\n * `detectChanges()` re-enters CD and trips NG0100 on the parent's own bindings.\n */\n private resetPanelState(): void {\n this.IsOpen = false;\n this.HighlightedIndex = -1;\n }\n\n /** Backing field for the `Disabled` input. */\n private disabledInput = false;\n /** The forms-driven disabled state, kept SEPARATE so neither source can stomp the other. */\n private formDisabled = false;\n\n /**\n * Recompute the gate from both of its sources. Called whenever either 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 if (disabled) this.resetPanelState();\n this.cdr.markForCheck();\n }\n\n SelectItem(item: unknown, event?: Event): void {\n event?.preventDefault();\n event?.stopPropagation();\n this.isBlurring = false;\n\n const value = this.ValuePrimitive && this.ValueField ? this.GetItemValue(item) : item;\n this.SelectedValue = value;\n this.InputText = this.GetItemText(item);\n this.onChange(value);\n this.ValueChange.emit(value);\n this.Close();\n this.cdr.detectChanges();\n }\n\n /** Commit the current input text as a value (for AllowCustom or matching item) */\n private commitValue(): void {\n if (!this.InputText.trim()) {\n // Empty input — clear the value\n if (this.SelectedValue != null) {\n this.SelectedValue = null;\n this.onChange(null);\n this.ValueChange.emit(null);\n }\n return;\n }\n\n // Try to find a matching item\n const data = (this.Data ?? []) as unknown[];\n const match = data.find(item => this.GetItemText(item).toLowerCase() === this.InputText.toLowerCase());\n if (match) {\n const value = this.ValuePrimitive && this.ValueField ? this.GetItemValue(match) : match;\n if (value !== this.SelectedValue) {\n this.SelectedValue = value;\n this.InputText = this.GetItemText(match);\n this.onChange(value);\n this.ValueChange.emit(value);\n }\n } else if (this.AllowCustom) {\n // No match but custom values allowed — emit the typed text\n this.SelectedValue = this.InputText;\n this.onChange(this.InputText);\n this.ValueChange.emit(this.InputText);\n } else {\n // No match and no custom — revert to previous display\n this.InputText = this.getDisplayText();\n }\n }\n\n IsItemSelected(item: unknown): boolean {\n if (this.SelectedValue == null) return false;\n if (this.ValuePrimitive && this.ValueField) return this.GetItemValue(item) === this.SelectedValue;\n if (this.ValueField && typeof item === 'object' && typeof this.SelectedValue === 'object')\n return this.GetItemValue(item) === this.GetItemValue(this.SelectedValue);\n return item === this.SelectedValue;\n }\n\n OnKeyDown(event: KeyboardEvent): void {\n const items = this.FilteredItems;\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n if (!this.IsOpen) this.Open();\n else this.HighlightedIndex = Math.min(this.HighlightedIndex + 1, items.length - 1);\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (this.IsOpen) this.HighlightedIndex = Math.max(this.HighlightedIndex - 1, 0);\n break;\n case 'Enter':\n event.preventDefault();\n if (this.IsOpen && this.HighlightedIndex >= 0 && this.HighlightedIndex < items.length) {\n this.SelectItem(items[this.HighlightedIndex]);\n } else {\n this.commitValue();\n this.Close();\n }\n break;\n case 'Escape':\n event.preventDefault();\n this.InputText = this.getDisplayText();\n this.Close();\n break;\n }\n }\n\n GetItemText(item: unknown): string {\n if (item == null) return '';\n if (typeof item === 'string') return item;\n if (this.TextField && typeof item === 'object') return String((item as Record<string, unknown>)[this.TextField] ?? '');\n return String(item);\n }\n\n GetItemValue(item: unknown): unknown {\n if (typeof item === 'string') return item;\n if (this.ValueField && typeof item === 'object' && item != null) return (item as Record<string, unknown>)[this.ValueField];\n return item;\n }\n\n TrackByIndex(index: number): number { return index; }\n\n writeValue(value: unknown): void {\n this.SelectedValue = value;\n this.InputText = this.getDisplayText();\n }\n\n registerOnChange(fn: (value: unknown) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.formDisabled = isDisabled; this.syncDisabled(); }\n ngAfterViewInit(): void { WarnIfUnnamed(this.ComboInput?.nativeElement, 'mj-combobox'); }\n ngOnDestroy(): void { this.Close(); }\n\n private getDisplayText(): string {\n if (this.SelectedValue == null) return '';\n if (this.ValuePrimitive && this.ValueField) {\n const found = ((this.Data ?? []) as unknown[]).find(item => this.GetItemValue(item) === this.SelectedValue);\n return found ? this.GetItemText(found) : String(this.SelectedValue);\n }\n if (typeof this.SelectedValue === 'string') return this.SelectedValue;\n return this.GetItemText(this.SelectedValue as Record<string, unknown>);\n }\n\n private getSelectedIndex(): number {\n if (this.SelectedValue == null) return -1;\n return this.FilteredItems.findIndex(item => this.IsItemSelected(item));\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-dialog.component.d.ts","sourceRoot":"","sources":["../../../src/lib/confirm-dialog/confirm-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAmC,MAAM,eAAe,CAAC;;AAIzF;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAS5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,qBA+Ea,wBAAwB;IACnC,oEAAoE;IAC3D,OAAO,UAAS;IACzB,sFAAsF;IAC5E,aAAa,wBAA+B;IAEtD,6CAA6C;IACpC,KAAK,SAAa;IAE3B,qFAAqF;IAC5E,OAAO,SAAmB;IAEnC,2EAA2E;IAClE,aAAa,SAAM;IAE5B,4FAA4F;IACnF,IAAI,EAAE,mBAAmB,CAAa;IAE/C,gCAAgC;IACvB,WAAW,SAAa;IAEjC,4BAA4B;IACnB,UAAU,SAAY;IAE/B;;;OAGG;IACM,IAAI,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEpC;;;;OAIG;IACqC,UAAU,UAAS;IAE3D,gFAAgF;IACtE,SAAS,qBAA4B;IAE/C,yFAAyF;IAC/E,SAAS,qBAA4B;IAE/C,kFAAkF;IAClF,IAAI,cAAc,IAAI,SAAS,GAAG,QAAQ,CAEzC;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,CAKzB;IAED,SAAS,IAAI,IAAI;IAIjB,yCAAyC;IACzC,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,IAAI;IAKhB,wCAAwC;IACxC,QAAQ,IAAI,IAAI;IAIhB,gFAAgF;IAChF,SAAS,IAAI,IAAI;IAOjB,yCAAyC;IACzC,SAAS,IAAI,IAAI;IAIjB,OAAO,CAAC,KAAK;yCA3FF,wBAAwB;2CAAxB,wBAAwB;yCAgG8z9L,OAAQ;CAD129L"}
1
+ {"version":3,"file":"confirm-dialog.component.d.ts","sourceRoot":"","sources":["../../../src/lib/confirm-dialog/confirm-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,YAAY,EAAmC,MAAM,eAAe,CAAC;;AAIzF;;;;;;;;GAQG;AACH,MAAM,MAAM,mBAAmB,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AAS5E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,qBAkFa,wBAAwB;IACnC,oEAAoE;IAC3D,OAAO,UAAS;IACzB,sFAAsF;IAC5E,aAAa,wBAA+B;IAEtD,6CAA6C;IACpC,KAAK,SAAa;IAE3B,qFAAqF;IAC5E,OAAO,SAAmB;IAEnC,2EAA2E;IAClE,aAAa,SAAM;IAE5B,4FAA4F;IACnF,IAAI,EAAE,mBAAmB,CAAa;IAE/C,gCAAgC;IACvB,WAAW,SAAa;IAEjC,4BAA4B;IACnB,UAAU,SAAY;IAE/B;;;OAGG;IACM,IAAI,EAAE,MAAM,GAAG,IAAI,CAAQ;IAEpC;;;;OAIG;IACqC,UAAU,UAAS;IAE3D,gFAAgF;IACtE,SAAS,qBAA4B;IAE/C,yFAAyF;IAC/E,SAAS,qBAA4B;IAE/C,kFAAkF;IAClF,IAAI,cAAc,IAAI,SAAS,GAAG,QAAQ,CAEzC;IAED;;;OAGG;IACH,IAAI,YAAY,IAAI,MAAM,CAKzB;IAED,SAAS,IAAI,IAAI;IAIjB,yCAAyC;IACzC,SAAS,IAAI,IAAI;IAIjB,QAAQ,IAAI,IAAI;IAKhB,wCAAwC;IACxC,QAAQ,IAAI,IAAI;IAIhB,gFAAgF;IAChF,SAAS,IAAI,IAAI;IAOjB,yCAAyC;IACzC,SAAS,IAAI,IAAI;IAIjB,OAAO,CAAC,KAAK;yCA3FF,wBAAwB;2CAAxB,wBAAwB;yCAgGuk9L,OAAQ;CADnn9L"}
@@ -154,7 +154,7 @@ export class MJConfirmDialogComponent {
154
154
  this.VisibleChange.emit(false);
155
155
  }
156
156
  static ɵfac = function MJConfirmDialogComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MJConfirmDialogComponent)(); };
157
- static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJConfirmDialogComponent, selectors: [["mj-confirm-dialog"]], inputs: { Visible: "Visible", Title: "Title", Message: "Message", DetailMessage: "DetailMessage", Type: "Type", ConfirmText: "ConfirmText", CancelText: "CancelText", Icon: "Icon", Processing: [2, "Processing", "Processing", booleanAttribute] }, outputs: { VisibleChange: "VisibleChange", Confirmed: "Confirmed", Cancelled: "Cancelled" }, ngContentSelectors: _c0, decls: 13, vars: 12, consts: [["Size", "sm", "Role", "alertdialog", 3, "Close", "Visible", "Title", "Closeable"], [1, "mj-confirm"], ["aria-hidden", "true", 3, "class"], [1, "mj-confirm__body"], [1, "mj-confirm__message"], [1, "mj-confirm__detail"], ["mjButton", "", 3, "click", "variant", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-spinner", "fa-spin"], ["mjButton", "", "variant", "secondary", 3, "click", "disabled"], ["aria-hidden", "true"]], template: function MJConfirmDialogComponent_Template(rf, ctx) { if (rf & 1) {
157
+ static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MJConfirmDialogComponent, selectors: [["mj-confirm-dialog"]], inputs: { Visible: "Visible", Title: "Title", Message: "Message", DetailMessage: "DetailMessage", Type: "Type", ConfirmText: "ConfirmText", CancelText: "CancelText", Icon: "Icon", Processing: [2, "Processing", "Processing", booleanAttribute] }, outputs: { VisibleChange: "VisibleChange", Confirmed: "Confirmed", Cancelled: "Cancelled" }, ngContentSelectors: _c0, decls: 13, vars: 13, consts: [["Size", "sm", "Role", "alertdialog", 3, "Close", "Visible", "Title", "Closeable"], [1, "mj-confirm"], ["aria-hidden", "true", 3, "class"], [1, "mj-confirm__body"], [1, "mj-confirm__message"], [1, "mj-confirm__detail"], ["mjButton", "", 3, "click", "variant", "disabled"], ["aria-hidden", "true", 1, "fa-solid", "fa-spinner", "fa-spin"], ["mjButton", "", "variant", "secondary", 3, "click", "disabled"], ["aria-hidden", "true"]], template: function MJConfirmDialogComponent_Template(rf, ctx) { if (rf & 1) {
158
158
  i0.ɵɵprojectionDef();
159
159
  i0.ɵɵelementStart(0, "mj-dialog", 0);
160
160
  i0.ɵɵlistener("Close", function MJConfirmDialogComponent_Template_mj_dialog_Close_0_listener() { return ctx.onDismiss(); });
@@ -190,6 +190,7 @@ export class MJConfirmDialogComponent {
190
190
  i0.ɵɵtextInterpolate1(" ", ctx.ConfirmText, " ");
191
191
  i0.ɵɵadvance();
192
192
  i0.ɵɵproperty("disabled", ctx.Processing);
193
+ i0.ɵɵattribute("data-autofocus", ctx.Type === "danger" ? "" : null);
193
194
  i0.ɵɵadvance();
194
195
  i0.ɵɵtextInterpolate1(" ", ctx.CancelText, " ");
195
196
  } }, dependencies: [MJDialogComponent, MJDialogActionsComponent, MJButtonDirective], styles: [".mj-confirm[_ngcontent-%COMP%] {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-3);\n }\n .mj-confirm__icon[_ngcontent-%COMP%] {\n flex-shrink: 0;\n font-size: 1.5rem;\n margin-top: 0.05em;\n color: var(--mj-text-muted);\n }\n .mj-confirm__icon--danger[_ngcontent-%COMP%] { color: var(--mj-status-error); }\n .mj-confirm__icon--warning[_ngcontent-%COMP%] { color: var(--mj-status-warning); }\n .mj-confirm__icon--info[_ngcontent-%COMP%] { color: var(--mj-status-info); }\n\n .mj-confirm__body[_ngcontent-%COMP%] { flex: 1; min-width: 0; }\n .mj-confirm__message[_ngcontent-%COMP%] {\n margin: 0;\n color: var(--mj-text-primary);\n line-height: 1.5;\n }\n .mj-confirm__detail[_ngcontent-%COMP%] {\n margin: var(--mj-space-2) 0 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.45;\n }"] });
@@ -231,10 +232,13 @@ export class MJConfirmDialogComponent {
231
232
  }
232
233
  {{ ConfirmText }}
233
234
  </button>
235
+ <!-- A danger confirm opens on Cancel (WAI-ARIA alertdialog: focus the least destructive
236
+ action), so an Enter pressed as it opens does not delete or discard. -->
234
237
  <button
235
238
  mjButton
236
239
  variant="secondary"
237
240
  [disabled]="Processing"
241
+ [attr.data-autofocus]="Type === 'danger' ? '' : null"
238
242
  (click)="onCancel()">
239
243
  {{ CancelText }}
240
244
  </button>
@@ -267,5 +271,5 @@ export class MJConfirmDialogComponent {
267
271
  }], Cancelled: [{
268
272
  type: Output
269
273
  }] }); })();
270
- (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJConfirmDialogComponent, { className: "MJConfirmDialogComponent", filePath: "lib/confirm-dialog/confirm-dialog.component.ts", lineNumber: 143 }); })();
274
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(MJConfirmDialogComponent, { className: "MJConfirmDialogComponent", filePath: "lib/confirm-dialog/confirm-dialog.component.ts", lineNumber: 146 }); })();
271
275
  //# sourceMappingURL=confirm-dialog.component.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"confirm-dialog.component.js","sourceRoot":"","sources":["../../../src/lib/confirm-dialog/confirm-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;;;;IA4ErD,uBAAmG;;;IAAhG,cAAA,+FAAwE,CAAA;;;IAIzE,4BAA+B;IAAA,YAAa;IAAA,iBAAI;;;IAAjB,cAAa;IAAb,oCAAa;;;IAG5C,4BAA8B;IAAA,YAAmB;IAAA,iBAAI;;;IAAvB,cAAmB;IAAnB,0CAAmB;;;IAajD,uBAA8D;;AAnF1E,MAAM,aAAa,GAAwC;IACzD,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE,kCAAkC;IAC1C,OAAO,EAAE,kCAAkC;IAC3C,IAAI,EAAE,yBAAyB;CAChC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AAgFH,MAAM,OAAO,wBAAwB;IACnC,oEAAoE;IAC3D,OAAO,GAAG,KAAK,CAAC;IACzB,sFAAsF;IAC5E,aAAa,GAAG,IAAI,YAAY,EAAW,CAAC;IAEtD,6CAA6C;IACpC,KAAK,GAAG,SAAS,CAAC;IAE3B,qFAAqF;IAC5E,OAAO,GAAG,eAAe,CAAC;IAEnC,2EAA2E;IAClE,aAAa,GAAG,EAAE,CAAC;IAE5B,4FAA4F;IACnF,IAAI,GAAwB,SAAS,CAAC;IAE/C,gCAAgC;IACvB,WAAW,GAAG,SAAS,CAAC;IAEjC,4BAA4B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,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjC,CAAC;kHA9FU,wBAAwB;6DAAxB,wBAAwB,sQAmCf,gBAAgB;;YA7GlC,oCAMwB;YAAtB,wGAAS,eAAW,IAAC;YAErB,8BAAwB;YACtB,wFAAoB;YAGpB,8BAA8B;YAC5B,wFAAe;YAGf,wFAAqB;YAGrB,kBAAyB;YAE7B,AADE,iBAAM,EACF;YAGJ,AADF,yCAAmB,gBAKO;YAAtB,qGAAS,eAAW,IAAC;YACrB,wFAAkB;YAGlB,aACF;YAAA,iBAAS;YACT,kCAIuB;YAArB,sGAAS,cAAU,IAAC;YACpB,aACF;YAEJ,AADE,AADE,iBAAS,EACS,EACV;;YArCV,AAHA,AADA,qCAAmB,oBACJ,8BAGU;YAIvB,eAEC;YAFD,2CAEC;YAEC,eAEC;YAFD,sCAEC;YACD,cAEC;YAFD,4CAEC;YAQD,eAA0B;YAC1B,AADA,4CAA0B,4BACH;YAEvB,cAEC;YAFD,yCAEC;YACD,cACF;YADE,gDACF;YAIE,cAAuB;YAAvB,yCAAuB;YAEvB,cACF;YADE,+CACF;4BA1CI,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB;;iFA4E7D,wBAAwB;cA/EpC,SAAS;2BACE,mBAAmB,cACjB,IAAI,WACP,CAAC,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB,CAAC,YAC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CT;;kBAiCA,KAAK;;kBAEL,MAAM;;kBAGN,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBAOL,KAAK;mBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;kBAGrC,MAAM;;kBAGN,MAAM;;kFAzCI,wBAAwB","sourcesContent":["import { Component, EventEmitter, Input, Output, booleanAttribute } from '@angular/core';\nimport { MJDialogComponent, MJDialogActionsComponent } from '../dialog/dialog.component';\nimport { MJButtonDirective } from '../button/button.directive';\n\n/**\n * Visual intent of an `<mj-confirm-dialog>`. Drives the header icon and the\n * confirm button's color, so callers rarely restate either.\n *\n * - `default` — a neutral question (e.g. \"Discard unsaved changes?\"). Blue confirm button.\n * - `danger` — a destructive / irreversible action (delete). Red confirm button.\n * - `warning` — a non-destructive but consequential action. Blue confirm button, caution icon.\n * - `info` — an informational confirmation. Blue confirm button, info icon.\n */\nexport type MJConfirmDialogType = 'default' | 'danger' | 'warning' | 'info';\n\nconst DEFAULT_ICONS: Record<MJConfirmDialogType, string> = {\n default: 'fa-solid fa-circle-question',\n danger: 'fa-solid fa-triangle-exclamation',\n warning: 'fa-solid fa-triangle-exclamation',\n info: 'fa-solid fa-circle-info',\n};\n\n/**\n * mj-confirm-dialog — Canonical confirmation prompt. The shared replacement for\n * native `window.confirm()` and the many hand-rolled \"Are you sure?\" modals\n * (`@if (showDeleteConfirm) { … backdrop + centered dialog }`) scattered across\n * the app, plus the duplicate local `mj-confirm-dialog` / `mj-ev-confirm-dialog`\n * components.\n *\n * Built on `<mj-dialog>` (so it inherits the backdrop, animations, mobile\n * full-screen behavior, and Esc/backdrop handling) and uses `role=\"alertdialog\"`\n * for screen readers. Buttons follow the MJ convention: the affirmative action\n * is **leftmost**, Cancel on the right.\n *\n * Visibility is two-way bindable. Cancelling (Cancel button, backdrop, Esc, or\n * the ✕) auto-closes and emits `Cancelled`. Confirming emits `Confirmed` and\n * **leaves the dialog open** so the handler can run async work — set `Visible`\n * to `false` (or update your bound property) when done. Bind `[Processing]` to a\n * loading flag during that async work to show a spinner, disable both buttons,\n * and block dismissal until it completes.\n *\n * Usage:\n * ```html\n * <!-- Simple destructive confirm -->\n * <mj-confirm-dialog\n * [(Visible)]=\"showDeleteConfirm\"\n * Type=\"danger\"\n * Title=\"Delete view\"\n * Message=\"Are you sure you want to delete this view?\"\n * DetailMessage=\"This action cannot be undone.\"\n * ConfirmText=\"Delete\"\n * (Confirmed)=\"onDeleteConfirmed()\">\n * </mj-confirm-dialog>\n *\n * <!-- Async confirm with a spinner while the work runs -->\n * <mj-confirm-dialog\n * [(Visible)]=\"confirmOpen\"\n * [Processing]=\"isDeleting\"\n * Type=\"danger\" Title=\"Delete user\" Message=\"Remove this user permanently?\"\n * ConfirmText=\"Delete\" (Confirmed)=\"deleteUser()\">\n * </mj-confirm-dialog>\n * ```\n */\n@Component({\n selector: 'mj-confirm-dialog',\n standalone: true,\n imports: [MJDialogComponent, MJDialogActionsComponent, MJButtonDirective],\n template: `\n <mj-dialog\n [Visible]=\"Visible\"\n [Title]=\"Title\"\n Size=\"sm\"\n Role=\"alertdialog\"\n [Closeable]=\"!Processing\"\n (Close)=\"onDismiss()\">\n\n <div class=\"mj-confirm\">\n @if (ResolvedIcon) {\n <i class=\"mj-confirm__icon mj-confirm__icon--{{ Type }} {{ ResolvedIcon }}\" aria-hidden=\"true\"></i>\n }\n <div class=\"mj-confirm__body\">\n @if (Message) {\n <p class=\"mj-confirm__message\">{{ Message }}</p>\n }\n @if (DetailMessage) {\n <p class=\"mj-confirm__detail\">{{ DetailMessage }}</p>\n }\n <ng-content></ng-content>\n </div>\n </div>\n\n <mj-dialog-actions>\n <button\n mjButton\n [variant]=\"ConfirmVariant\"\n [disabled]=\"Processing\"\n (click)=\"onConfirm()\">\n @if (Processing) {\n <i class=\"fa-solid fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n }\n {{ ConfirmText }}\n </button>\n <button\n mjButton\n variant=\"secondary\"\n [disabled]=\"Processing\"\n (click)=\"onCancel()\">\n {{ CancelText }}\n </button>\n </mj-dialog-actions>\n </mj-dialog>\n `,\n styles: [`\n .mj-confirm {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-3);\n }\n .mj-confirm__icon {\n flex-shrink: 0;\n font-size: 1.5rem;\n margin-top: 0.05em;\n color: var(--mj-text-muted);\n }\n .mj-confirm__icon--danger { color: var(--mj-status-error); }\n .mj-confirm__icon--warning { color: var(--mj-status-warning); }\n .mj-confirm__icon--info { color: var(--mj-status-info); }\n\n .mj-confirm__body { flex: 1; min-width: 0; }\n .mj-confirm__message {\n margin: 0;\n color: var(--mj-text-primary);\n line-height: 1.5;\n }\n .mj-confirm__detail {\n margin: var(--mj-space-2) 0 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.45;\n }\n `]\n})\nexport class MJConfirmDialogComponent {\n /** Whether the dialog is shown. Two-way bindable: `[(Visible)]`. */\n @Input() Visible = false;\n /** Two-way `Visible` change channel — fires when the dialog auto-closes on cancel. */\n @Output() VisibleChange = new EventEmitter<boolean>();\n\n /** Heading shown in the dialog title bar. */\n @Input() Title = 'Confirm';\n\n /** Primary prompt text. For rich content, project default `<ng-content>` instead. */\n @Input() Message = 'Are you sure?';\n\n /** Optional secondary line, rendered smaller/muted beneath the message. */\n @Input() DetailMessage = '';\n\n /** Visual intent — drives the header icon + confirm button color. Defaults to 'default'. */\n @Input() Type: MJConfirmDialogType = 'default';\n\n /** Affirmative button label. */\n @Input() ConfirmText = 'Confirm';\n\n /** Dismiss button label. */\n @Input() CancelText = 'Cancel';\n\n /**\n * Font Awesome icon class (e.g. \"fa-solid fa-trash\") for the header. When\n * omitted, a sensible default is chosen from `Type`. Set to `''` for no icon.\n */\n @Input() Icon: string | null = null;\n\n /**\n * When true, shows a spinner on the confirm button, disables both buttons, and\n * blocks dismissal (Esc / backdrop / ✕) — bind this to your loading flag while\n * the `Confirmed` handler runs async work.\n */\n @Input({ transform: booleanAttribute }) Processing = false;\n\n /** Fired when the user confirms. The dialog stays open; close it when ready. */\n @Output() Confirmed = new EventEmitter<void>();\n\n /** Fired when the user cancels (button, backdrop, Esc, or ✕). The dialog auto-closes. */\n @Output() Cancelled = new EventEmitter<void>();\n\n /** mjButton variant for the confirm button — red for `danger`, blue otherwise. */\n get ConfirmVariant(): 'primary' | 'danger' {\n return this.Type === 'danger' ? 'danger' : 'primary';\n }\n\n /**\n * Icon actually rendered: the explicit `Icon` when provided (including `\"\"`\n * to suppress it), otherwise the per-type default.\n */\n get ResolvedIcon(): string {\n if (this.Icon != null) {\n return this.Icon;\n }\n return DEFAULT_ICONS[this.Type] ?? DEFAULT_ICONS.default;\n }\n\n OnConfirm(): void {\n this.Confirmed.emit();\n }\n\n /** @deprecated Use {@link OnConfirm}. */\n onConfirm(): void {\n return this.OnConfirm();\n }\n\n OnCancel(): void {\n this.close();\n this.Cancelled.emit();\n }\n\n /** @deprecated Use {@link OnCancel}. */\n onCancel(): void {\n return this.OnCancel();\n }\n\n /** Backdrop / Esc / ✕ from the underlying dialog — ignored while Processing. */\n OnDismiss(): void {\n if (this.Processing) {\n return;\n }\n this.OnCancel();\n }\n\n /** @deprecated Use {@link OnDismiss}. */\n onDismiss(): void {\n return this.OnDismiss();\n }\n\n private close(): void {\n this.Visible = false;\n this.VisibleChange.emit(false);\n }\n}\n"]}
1
+ {"version":3,"file":"confirm-dialog.component.js","sourceRoot":"","sources":["../../../src/lib/confirm-dialog/confirm-dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;;;;IA4ErD,uBAAmG;;;IAAhG,cAAA,+FAAwE,CAAA;;;IAIzE,4BAA+B;IAAA,YAAa;IAAA,iBAAI;;;IAAjB,cAAa;IAAb,oCAAa;;;IAG5C,4BAA8B;IAAA,YAAmB;IAAA,iBAAI;;;IAAvB,cAAmB;IAAnB,0CAAmB;;;IAajD,uBAA8D;;AAnF1E,MAAM,aAAa,GAAwC;IACzD,OAAO,EAAE,6BAA6B;IACtC,MAAM,EAAE,kCAAkC;IAC1C,OAAO,EAAE,kCAAkC;IAC3C,IAAI,EAAE,yBAAyB;CAChC,C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,cACjB,IAAI,WACP,CAAC,iBAAiB,EAAE,wBAAwB,EAAE,iBAAiB,CAAC,YAC/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CT;;kBAiCA,KAAK;;kBAEL,MAAM;;kBAGN,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAGL,KAAK;;kBAML,KAAK;;kBAOL,KAAK;mBAAC,EAAE,SAAS,EAAE,gBAAgB,EAAE;;kBAGrC,MAAM;;kBAGN,MAAM;;kFAzCI,wBAAwB","sourcesContent":["import { Component, EventEmitter, Input, Output, booleanAttribute } from '@angular/core';\nimport { MJDialogComponent, MJDialogActionsComponent } from '../dialog/dialog.component';\nimport { MJButtonDirective } from '../button/button.directive';\n\n/**\n * Visual intent of an `<mj-confirm-dialog>`. Drives the header icon and the\n * confirm button's color, so callers rarely restate either.\n *\n * - `default` — a neutral question (e.g. \"Discard unsaved changes?\"). Blue confirm button.\n * - `danger` — a destructive / irreversible action (delete). Red confirm button.\n * - `warning` — a non-destructive but consequential action. Blue confirm button, caution icon.\n * - `info` — an informational confirmation. Blue confirm button, info icon.\n */\nexport type MJConfirmDialogType = 'default' | 'danger' | 'warning' | 'info';\n\nconst DEFAULT_ICONS: Record<MJConfirmDialogType, string> = {\n default: 'fa-solid fa-circle-question',\n danger: 'fa-solid fa-triangle-exclamation',\n warning: 'fa-solid fa-triangle-exclamation',\n info: 'fa-solid fa-circle-info',\n};\n\n/**\n * mj-confirm-dialog — Canonical confirmation prompt. The shared replacement for\n * native `window.confirm()` and the many hand-rolled \"Are you sure?\" modals\n * (`@if (showDeleteConfirm) { … backdrop + centered dialog }`) scattered across\n * the app, plus the duplicate local `mj-confirm-dialog` / `mj-ev-confirm-dialog`\n * components.\n *\n * Built on `<mj-dialog>` (so it inherits the backdrop, animations, mobile\n * full-screen behavior, and Esc/backdrop handling) and uses `role=\"alertdialog\"`\n * for screen readers. Buttons follow the MJ convention: the affirmative action\n * is **leftmost**, Cancel on the right.\n *\n * Visibility is two-way bindable. Cancelling (Cancel button, backdrop, Esc, or\n * the ✕) auto-closes and emits `Cancelled`. Confirming emits `Confirmed` and\n * **leaves the dialog open** so the handler can run async work — set `Visible`\n * to `false` (or update your bound property) when done. Bind `[Processing]` to a\n * loading flag during that async work to show a spinner, disable both buttons,\n * and block dismissal until it completes.\n *\n * Usage:\n * ```html\n * <!-- Simple destructive confirm -->\n * <mj-confirm-dialog\n * [(Visible)]=\"showDeleteConfirm\"\n * Type=\"danger\"\n * Title=\"Delete view\"\n * Message=\"Are you sure you want to delete this view?\"\n * DetailMessage=\"This action cannot be undone.\"\n * ConfirmText=\"Delete\"\n * (Confirmed)=\"onDeleteConfirmed()\">\n * </mj-confirm-dialog>\n *\n * <!-- Async confirm with a spinner while the work runs -->\n * <mj-confirm-dialog\n * [(Visible)]=\"confirmOpen\"\n * [Processing]=\"isDeleting\"\n * Type=\"danger\" Title=\"Delete user\" Message=\"Remove this user permanently?\"\n * ConfirmText=\"Delete\" (Confirmed)=\"deleteUser()\">\n * </mj-confirm-dialog>\n * ```\n */\n@Component({\n selector: 'mj-confirm-dialog',\n standalone: true,\n imports: [MJDialogComponent, MJDialogActionsComponent, MJButtonDirective],\n template: `\n <mj-dialog\n [Visible]=\"Visible\"\n [Title]=\"Title\"\n Size=\"sm\"\n Role=\"alertdialog\"\n [Closeable]=\"!Processing\"\n (Close)=\"onDismiss()\">\n\n <div class=\"mj-confirm\">\n @if (ResolvedIcon) {\n <i class=\"mj-confirm__icon mj-confirm__icon--{{ Type }} {{ ResolvedIcon }}\" aria-hidden=\"true\"></i>\n }\n <div class=\"mj-confirm__body\">\n @if (Message) {\n <p class=\"mj-confirm__message\">{{ Message }}</p>\n }\n @if (DetailMessage) {\n <p class=\"mj-confirm__detail\">{{ DetailMessage }}</p>\n }\n <ng-content></ng-content>\n </div>\n </div>\n\n <mj-dialog-actions>\n <button\n mjButton\n [variant]=\"ConfirmVariant\"\n [disabled]=\"Processing\"\n (click)=\"onConfirm()\">\n @if (Processing) {\n <i class=\"fa-solid fa-spinner fa-spin\" aria-hidden=\"true\"></i>\n }\n {{ ConfirmText }}\n </button>\n <!-- A danger confirm opens on Cancel (WAI-ARIA alertdialog: focus the least destructive\n action), so an Enter pressed as it opens does not delete or discard. -->\n <button\n mjButton\n variant=\"secondary\"\n [disabled]=\"Processing\"\n [attr.data-autofocus]=\"Type === 'danger' ? '' : null\"\n (click)=\"onCancel()\">\n {{ CancelText }}\n </button>\n </mj-dialog-actions>\n </mj-dialog>\n `,\n styles: [`\n .mj-confirm {\n display: flex;\n align-items: flex-start;\n gap: var(--mj-space-3);\n }\n .mj-confirm__icon {\n flex-shrink: 0;\n font-size: 1.5rem;\n margin-top: 0.05em;\n color: var(--mj-text-muted);\n }\n .mj-confirm__icon--danger { color: var(--mj-status-error); }\n .mj-confirm__icon--warning { color: var(--mj-status-warning); }\n .mj-confirm__icon--info { color: var(--mj-status-info); }\n\n .mj-confirm__body { flex: 1; min-width: 0; }\n .mj-confirm__message {\n margin: 0;\n color: var(--mj-text-primary);\n line-height: 1.5;\n }\n .mj-confirm__detail {\n margin: var(--mj-space-2) 0 0;\n font-size: var(--mj-text-sm);\n color: var(--mj-text-secondary);\n line-height: 1.45;\n }\n `]\n})\nexport class MJConfirmDialogComponent {\n /** Whether the dialog is shown. Two-way bindable: `[(Visible)]`. */\n @Input() Visible = false;\n /** Two-way `Visible` change channel — fires when the dialog auto-closes on cancel. */\n @Output() VisibleChange = new EventEmitter<boolean>();\n\n /** Heading shown in the dialog title bar. */\n @Input() Title = 'Confirm';\n\n /** Primary prompt text. For rich content, project default `<ng-content>` instead. */\n @Input() Message = 'Are you sure?';\n\n /** Optional secondary line, rendered smaller/muted beneath the message. */\n @Input() DetailMessage = '';\n\n /** Visual intent — drives the header icon + confirm button color. Defaults to 'default'. */\n @Input() Type: MJConfirmDialogType = 'default';\n\n /** Affirmative button label. */\n @Input() ConfirmText = 'Confirm';\n\n /** Dismiss button label. */\n @Input() CancelText = 'Cancel';\n\n /**\n * Font Awesome icon class (e.g. \"fa-solid fa-trash\") for the header. When\n * omitted, a sensible default is chosen from `Type`. Set to `''` for no icon.\n */\n @Input() Icon: string | null = null;\n\n /**\n * When true, shows a spinner on the confirm button, disables both buttons, and\n * blocks dismissal (Esc / backdrop / ✕) — bind this to your loading flag while\n * the `Confirmed` handler runs async work.\n */\n @Input({ transform: booleanAttribute }) Processing = false;\n\n /** Fired when the user confirms. The dialog stays open; close it when ready. */\n @Output() Confirmed = new EventEmitter<void>();\n\n /** Fired when the user cancels (button, backdrop, Esc, or ✕). The dialog auto-closes. */\n @Output() Cancelled = new EventEmitter<void>();\n\n /** mjButton variant for the confirm button — red for `danger`, blue otherwise. */\n get ConfirmVariant(): 'primary' | 'danger' {\n return this.Type === 'danger' ? 'danger' : 'primary';\n }\n\n /**\n * Icon actually rendered: the explicit `Icon` when provided (including `\"\"`\n * to suppress it), otherwise the per-type default.\n */\n get ResolvedIcon(): string {\n if (this.Icon != null) {\n return this.Icon;\n }\n return DEFAULT_ICONS[this.Type] ?? DEFAULT_ICONS.default;\n }\n\n OnConfirm(): void {\n this.Confirmed.emit();\n }\n\n /** @deprecated Use {@link OnConfirm}. */\n onConfirm(): void {\n return this.OnConfirm();\n }\n\n OnCancel(): void {\n this.close();\n this.Cancelled.emit();\n }\n\n /** @deprecated Use {@link OnCancel}. */\n onCancel(): void {\n return this.OnCancel();\n }\n\n /** Backdrop / Esc / ✕ from the underlying dialog — ignored while Processing. */\n OnDismiss(): void {\n if (this.Processing) {\n return;\n }\n this.OnCancel();\n }\n\n /** @deprecated Use {@link OnDismiss}. */\n onDismiss(): void {\n return this.OnDismiss();\n }\n\n private close(): void {\n this.Visible = false;\n this.VisibleChange.emit(false);\n }\n}\n"]}
@@ -5,7 +5,7 @@ import { CalendarDay } from '../calendar/calendar-utils';
5
5
  import { MJNamedControlBase } from '../a11y/named-control.base';
6
6
  import * as i0 from "@angular/core";
7
7
  /**
8
- * mj-datepicker — Date picker with calendar popup. Replaces `<kendo-datepicker>`.
8
+ * mj-datepicker — Date picker with calendar popup.
9
9
  *
10
10
  * Without an accessible name the date field announces as "edit, blank" and its calendar popup as a
11
11
  * generic "Calendar" — so a form with a start date and an end date presents two identical grids
@@ -76,7 +76,7 @@ function MJDatepickerComponent_ng_template_11_Template(rf, ctx) { if (rf & 1) {
76
76
  i0.ɵɵrepeater(ctx_r1.Weeks);
77
77
  } }
78
78
  /**
79
- * mj-datepicker — Date picker with calendar popup. Replaces `<kendo-datepicker>`.
79
+ * mj-datepicker — Date picker with calendar popup.
80
80
  *
81
81
  * Without an accessible name the date field announces as "edit, blank" and its calendar popup as a
82
82
  * generic "Calendar" — so a form with a start date and an end date presents two identical grids
@@ -1 +1 @@
1
- {"version":3,"file":"datepicker.component.js","sourceRoot":"","sources":["../../../src/lib/datepicker/datepicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAc,SAAS,EAAa,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC5K,OAAO,EAAE,iBAAiB,EAAwB,MAAM,gBAAgB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAqB,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAe,SAAS,EAAE,kBAAkB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACvH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;;;;;sCAsElD,oBAAkB;;IAJgB,gCAAsD;IAAA,YAAS;IAAA,iBAAO;;;IAAhB,cAAS;IAAT,4BAAS;;;;IAK/F,kCAK4B;IAA1B,iOAAS,yBAAe,KAAC;IAAC,YAAmB;IAAA,iBAAS;;;;IAFtD,AADA,AADA,yEAAsD,0CACV,wDACc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KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAOL,KAAK;;kBAGL,MAAM;;kBACN,SAAS;mBAAC,SAAS;;kBACnB,SAAS;mBAAC,WAAW;;kBACrB,WAAW;mBAAC,0BAA0B;;kFAjB5B,qBAAqB","sourcesContent":["import { AfterViewInit, Component, Input, Output, EventEmitter, forwardRef, HostBinding, ElementRef, ViewChild, OnDestroy, inject, ChangeDetectorRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { OverlayModule, ConnectedPosition } from '@angular/cdk/overlay';\nimport { CalendarDay, WEEK_DAYS, BuildCalendarWeeks, FormatDate, GetMonthYearLabel } from '../calendar/calendar-utils';\nimport { MJNamedControlBase } from '../a11y/named-control.base';\nimport { WarnIfUnnamed } from '../a11y/unnamed-control-guard';\n\n/**\n * mj-datepicker — Date picker with calendar popup. Replaces `<kendo-datepicker>`.\n *\n * Without an accessible name the date field announces as \"edit, blank\" and its calendar popup as a\n * generic \"Calendar\" — so a form with a start date and an end date presents two identical grids\n * (WCAG 2.1 4.1.2). Use {@link MJNamedControlBase.AriaLabelledBy} when a visible label exists,\n * {@link MJNamedControlBase.AriaLabel} when none does; the toggle button and the calendar take\n * their names from the same source. The field is a real `<input>`, so\n * {@link MJNamedControlBase.InputId} IS a valid `<label for>` target.\n *\n * @example\n * ```html\n * <mj-datepicker AriaLabel=\"Due date\" [(ngModel)]=\"dueDate\" [Min]=\"minDate\" />\n * ```\n */\n@Component({\n selector: 'mj-datepicker',\n standalone: true,\n imports: [OverlayModule],\n template: `\n <div class=\"mj-datepicker\" #trigger cdkOverlayOrigin #overlayOrigin=\"cdkOverlayOrigin\"\n [class.mj-datepicker--disabled]=\"IsDisabled\">\n <input #dateInput class=\"mj-input mj-datepicker-input\" type=\"text\"\n [attr.id]=\"InputId || null\"\n [attr.aria-label]=\"AriaLabel || null\"\n [attr.aria-labelledby]=\"AriaLabelledBy || null\"\n [attr.aria-describedby]=\"AriaDescribedBy || null\"\n [placeholder]=\"Placeholder\" [disabled]=\"IsDisabled\" [value]=\"DisplayValue\"\n (input)=\"OnInputChange($event)\" (blur)=\"OnBlur()\" (keydown)=\"OnKeyDown($event)\" />\n <!--\n The fixed words live in hidden spans rather than in concatenated strings so the\n AriaLabelledBy path can name the toggle and the calendar from the same visible label that\n names the field: aria-labelledby takes an ID LIST, so the word plus the label's own text is\n composed by the accessibility tree without this component ever seeing that text. The\n calendar's word sits here, outside the overlay, because ids resolve document-wide.\n A hidden node that is DIRECTLY referenced by aria-labelledby is still included in the name\n (accname §4.1), so aria-hidden keeps the word out of the reading order without costing the\n composed name.\n -->\n <span class=\"mj-datepicker-sr-only\" aria-hidden=\"true\" [attr.id]=\"SecondaryWordId('toggle-word')\">Open calendar for</span>\n <span class=\"mj-datepicker-sr-only\" aria-hidden=\"true\" [attr.id]=\"SecondaryWordId('calendar-word')\">Calendar for</span>\n <button type=\"button\" class=\"mj-datepicker-toggle\" tabindex=\"-1\" [disabled]=\"IsDisabled\"\n (click)=\"Toggle()\"\n [attr.aria-labelledby]=\"ToggleLabelledBy || null\"\n [attr.aria-label]=\"ToggleLabelledBy ? null : ToggleLabel\">\n <i class=\"fa-solid fa-calendar\"></i>\n </button>\n </div>\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"IsOpen\" [cdkConnectedOverlayPositions]=\"Positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\" cdkConnectedOverlayBackdropClass=\"mj-dropdown-backdrop\"\n (backdropClick)=\"Close()\" (detach)=\"Close()\">\n <div class=\"mj-calendar\" role=\"grid\"\n [attr.aria-labelledby]=\"CalendarLabelledBy || null\"\n [attr.aria-label]=\"CalendarLabelledBy ? null : CalendarLabel\"\n (keydown)=\"OnCalendarKeyDown($event)\">\n <div class=\"mj-calendar-header\">\n <button type=\"button\" (click)=\"PreviousMonth()\" aria-label=\"Previous month\" class=\"mj-calendar-nav\">\n <i class=\"fa-solid fa-chevron-left\"></i></button>\n <span class=\"mj-calendar-title\">{{ MonthYearLabel }}</span>\n <button type=\"button\" (click)=\"NextMonth()\" aria-label=\"Next month\" class=\"mj-calendar-nav\">\n <i class=\"fa-solid fa-chevron-right\"></i></button>\n </div>\n <div class=\"mj-calendar-weekdays\" role=\"row\">\n @for (day of WeekDays; track day) { <span class=\"mj-calendar-weekday\" role=\"columnheader\">{{ day }}</span> }\n </div>\n @for (week of Weeks; track $index) {\n <div class=\"mj-calendar-row\" role=\"row\">\n @for (day of week; track day.date.getTime()) {\n <button type=\"button\" class=\"mj-calendar-day\" role=\"gridcell\"\n [class.mj-calendar-day--selected]=\"IsSelectedDay(day)\"\n [class.mj-calendar-day--today]=\"day.isToday\"\n [class.mj-calendar-day--other-month]=\"!day.isCurrentMonth\"\n [disabled]=\"IsOutOfRange(day)\" [attr.aria-selected]=\"IsSelectedDay(day)\"\n (click)=\"SelectDate(day)\">{{ day.dayNumber }}</button>\n }\n </div>\n }\n <div class=\"mj-calendar-footer\">\n <button type=\"button\" class=\"mj-calendar-today\" (click)=\"SelectToday()\">Today</button>\n </div>\n </div>\n </ng-template>\n `,\n styles: [`\n /*\n * Component-scoped ON PURPOSE, unlike the rest of this control's styling, which ships as a global\n * stylesheet the host application imports. A host that skips that import gets unstyled chrome —\n * survivable — but a hidden-word span that is not hidden renders its word as literal text in the\n * middle of the field. The rule that hides it therefore has to travel with the component.\n *\n * Not display:none or visibility:hidden — both remove the element from the accessibility tree,\n * which is the one thing this element exists to be in.\n */\n .mj-datepicker-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `],\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJDatepickerComponent), multi: true }]\n})\nexport class MJDatepickerComponent extends MJNamedControlBase implements ControlValueAccessor, AfterViewInit, OnDestroy {\n @Input() Min: Date | null = null;\n @Input() Max: Date | null = null;\n @Input() Format = 'MM/dd/yyyy';\n @Input() Placeholder = '';\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 @Output() ValueChange = new EventEmitter<Date | null>();\n @ViewChild('trigger') private triggerEl!: ElementRef<HTMLElement>;\n @ViewChild('dateInput') private dateInputEl: ElementRef<HTMLInputElement> | undefined;\n @HostBinding('class.mj-datepicker-host') readonly hostClass = true;\n private cdr = inject(ChangeDetectorRef);\n\n IsOpen = false; IsDisabled = false; DisplayValue = '';\n Weeks: CalendarDay[][] = []; WeekDays = WEEK_DAYS;\n Positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ];\n private viewDate = new Date();\n private selectedDate: Date | null = null;\n private onChange: (value: Date | null) => void = () => {};\n private onTouched: () => void = () => {};\n\n get MonthYearLabel(): string { return GetMonthYearLabel(this.viewDate); }\n\n /** `aria-labelledby` id list for the toggle button when a VISIBLE label names the field. */\n get ToggleLabelledBy(): string { return this.SecondaryLabelledBy('toggle-word'); }\n\n /** `aria-label` for the toggle button in the no-visible-label case. */\n get ToggleLabel(): string { return this.SecondaryLabel('Open calendar for', 'Open calendar'); }\n\n /** `aria-labelledby` id list for the calendar grid when a VISIBLE label names the field. */\n get CalendarLabelledBy(): string { return this.SecondaryLabelledBy('calendar-word'); }\n\n /** `aria-label` for the calendar grid in the no-visible-label case. */\n get CalendarLabel(): string { return this.SecondaryLabel('Calendar for', 'Calendar'); }\n\n ngAfterViewInit(): void { WarnIfUnnamed(this.dateInputEl?.nativeElement, 'mj-datepicker'); }\n\n Toggle(): void { if (this.IsDisabled) return; this.IsOpen ? this.Close() : this.Open(); }\n Open(): void {\n if (this.IsDisabled || this.IsOpen) return;\n this.viewDate = this.selectedDate ? new Date(this.selectedDate) : new Date();\n this.Weeks = BuildCalendarWeeks(this.viewDate); this.IsOpen = true; this.cdr.detectChanges();\n }\n Close(): void { if (!this.IsOpen) return; this.IsOpen = false; this.cdr.detectChanges(); }\n\n /** Backing field for the `Disabled` input. */\n private disabledInput = false;\n /** The forms-driven disabled state, kept SEPARATE so neither source can stomp the other. */\n private formDisabled = false;\n\n /**\n * Recompute the gate from both of its sources. Called whenever either 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 * Closes the calendar directly rather than via `Close()`: this can run from an @Input setter,\n * i.e. DURING the parent's CD pass, where a nested `detectChanges()` trips NG0100.\n */\n private syncDisabled(): void {\n const disabled = this.disabledInput || this.formDisabled;\n if (disabled === this.IsDisabled) return;\n this.IsDisabled = disabled;\n if (disabled) this.IsOpen = false;\n this.cdr.markForCheck();\n }\n PreviousMonth(): void { this.viewDate = new Date(this.viewDate.getFullYear(), this.viewDate.getMonth() - 1, 1); this.Weeks = BuildCalendarWeeks(this.viewDate); }\n NextMonth(): void { this.viewDate = new Date(this.viewDate.getFullYear(), this.viewDate.getMonth() + 1, 1); this.Weeks = BuildCalendarWeeks(this.viewDate); }\n\n SelectDate(day: CalendarDay): void {\n if (this.IsOutOfRange(day)) return;\n this.selectedDate = day.date; this.DisplayValue = FormatDate(day.date);\n this.onChange(day.date); this.ValueChange.emit(day.date); this.Close();\n }\n SelectToday(): void {\n const today = new Date(); today.setHours(0, 0, 0, 0);\n this.selectedDate = today; this.DisplayValue = FormatDate(today);\n this.onChange(today); this.ValueChange.emit(today); this.Close();\n }\n IsSelectedDay(day: CalendarDay): boolean {\n if (!this.selectedDate) return false;\n return day.date.getFullYear() === this.selectedDate.getFullYear() && day.date.getMonth() === this.selectedDate.getMonth() && day.date.getDate() === this.selectedDate.getDate();\n }\n IsOutOfRange(day: CalendarDay): boolean {\n if (this.Min && day.date < this.Min) return true;\n if (this.Max && day.date > this.Max) return true;\n return false;\n }\n OnInputChange(event: Event): void {\n const value = (event.target as HTMLInputElement).value; this.DisplayValue = value;\n const parsed = new Date(value);\n if (!isNaN(parsed.getTime())) { this.selectedDate = parsed; this.onChange(parsed); this.ValueChange.emit(parsed); }\n }\n OnBlur(): void { this.onTouched(); }\n OnKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Escape') this.Close();\n else if (event.key === 'Enter' && !this.IsOpen) this.Open();\n else if (event.key === 'Tab') this.returnTabToField();\n }\n\n /** Tab in the calendar closes it and returns to the field. The key is not cancelled, so the browser moves on from that field. */\n OnCalendarKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Tab') this.returnTabToField();\n }\n\n private returnTabToField(): void {\n if (!this.IsOpen) return;\n this.dateInputEl?.nativeElement.focus();\n this.Close();\n }\n writeValue(value: Date | string | null): void {\n if (value == null) { this.selectedDate = null; this.DisplayValue = ''; }\n else { const d = typeof value === 'string' ? new Date(value) : value; if (!isNaN(d.getTime())) { this.selectedDate = d; this.DisplayValue = FormatDate(d); } }\n }\n registerOnChange(fn: (value: Date | null) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.formDisabled = isDisabled; this.syncDisabled(); }\n ngOnDestroy(): void { this.Close(); }\n}\n"]}
1
+ {"version":3,"file":"datepicker.component.js","sourceRoot":"","sources":["../../../src/lib/datepicker/datepicker.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,WAAW,EAAc,SAA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,IAAC;;;YA9B5C,yDAA4C;YAM1C,eAA2B;YAAyB,AAAxB,AAA5B,6CAA2B,4BAAwB,2BAAuB;;YAYrB,eAA0C;;YAC1C,eAA4C;;YAClC,eAAuB;YAAvB,yCAAuB;;YAOzD,eAA2C;YAE1E,AADmC,AAAnC,AAD+B,4DAA2C,uCACxC,+CAA2C,wCACtC;4BAhCjC,aAAa;;iFA0FZ,qBAAqB;cA7FjC,SAAS;2BACE,eAAe,cACb,IAAI,WACP,CAAC,aAAa,CAAC,YACd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgET,aAuBU,CAAC,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,GAAG,EAAE,sBAAsB,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;;kBAG7G,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBACL,KAAK;;kBAOL,KAAK;;kBAGL,MAAM;;kBACN,SAAS;mBAAC,SAAS;;kBACnB,SAAS;mBAAC,WAAW;;kBACrB,WAAW;mBAAC,0BAA0B;;kFAjB5B,qBAAqB","sourcesContent":["import { AfterViewInit, Component, Input, Output, EventEmitter, forwardRef, HostBinding, ElementRef, ViewChild, OnDestroy, inject, ChangeDetectorRef } from '@angular/core';\nimport { NG_VALUE_ACCESSOR, ControlValueAccessor } from '@angular/forms';\nimport { OverlayModule, ConnectedPosition } from '@angular/cdk/overlay';\nimport { CalendarDay, WEEK_DAYS, BuildCalendarWeeks, FormatDate, GetMonthYearLabel } from '../calendar/calendar-utils';\nimport { MJNamedControlBase } from '../a11y/named-control.base';\nimport { WarnIfUnnamed } from '../a11y/unnamed-control-guard';\n\n/**\n * mj-datepicker — Date picker with calendar popup.\n *\n * Without an accessible name the date field announces as \"edit, blank\" and its calendar popup as a\n * generic \"Calendar\" — so a form with a start date and an end date presents two identical grids\n * (WCAG 2.1 4.1.2). Use {@link MJNamedControlBase.AriaLabelledBy} when a visible label exists,\n * {@link MJNamedControlBase.AriaLabel} when none does; the toggle button and the calendar take\n * their names from the same source. The field is a real `<input>`, so\n * {@link MJNamedControlBase.InputId} IS a valid `<label for>` target.\n *\n * @example\n * ```html\n * <mj-datepicker AriaLabel=\"Due date\" [(ngModel)]=\"dueDate\" [Min]=\"minDate\" />\n * ```\n */\n@Component({\n selector: 'mj-datepicker',\n standalone: true,\n imports: [OverlayModule],\n template: `\n <div class=\"mj-datepicker\" #trigger cdkOverlayOrigin #overlayOrigin=\"cdkOverlayOrigin\"\n [class.mj-datepicker--disabled]=\"IsDisabled\">\n <input #dateInput class=\"mj-input mj-datepicker-input\" type=\"text\"\n [attr.id]=\"InputId || null\"\n [attr.aria-label]=\"AriaLabel || null\"\n [attr.aria-labelledby]=\"AriaLabelledBy || null\"\n [attr.aria-describedby]=\"AriaDescribedBy || null\"\n [placeholder]=\"Placeholder\" [disabled]=\"IsDisabled\" [value]=\"DisplayValue\"\n (input)=\"OnInputChange($event)\" (blur)=\"OnBlur()\" (keydown)=\"OnKeyDown($event)\" />\n <!--\n The fixed words live in hidden spans rather than in concatenated strings so the\n AriaLabelledBy path can name the toggle and the calendar from the same visible label that\n names the field: aria-labelledby takes an ID LIST, so the word plus the label's own text is\n composed by the accessibility tree without this component ever seeing that text. The\n calendar's word sits here, outside the overlay, because ids resolve document-wide.\n A hidden node that is DIRECTLY referenced by aria-labelledby is still included in the name\n (accname §4.1), so aria-hidden keeps the word out of the reading order without costing the\n composed name.\n -->\n <span class=\"mj-datepicker-sr-only\" aria-hidden=\"true\" [attr.id]=\"SecondaryWordId('toggle-word')\">Open calendar for</span>\n <span class=\"mj-datepicker-sr-only\" aria-hidden=\"true\" [attr.id]=\"SecondaryWordId('calendar-word')\">Calendar for</span>\n <button type=\"button\" class=\"mj-datepicker-toggle\" tabindex=\"-1\" [disabled]=\"IsDisabled\"\n (click)=\"Toggle()\"\n [attr.aria-labelledby]=\"ToggleLabelledBy || null\"\n [attr.aria-label]=\"ToggleLabelledBy ? null : ToggleLabel\">\n <i class=\"fa-solid fa-calendar\"></i>\n </button>\n </div>\n <ng-template cdkConnectedOverlay [cdkConnectedOverlayOrigin]=\"overlayOrigin\"\n [cdkConnectedOverlayOpen]=\"IsOpen\" [cdkConnectedOverlayPositions]=\"Positions\"\n [cdkConnectedOverlayHasBackdrop]=\"true\" cdkConnectedOverlayBackdropClass=\"mj-dropdown-backdrop\"\n (backdropClick)=\"Close()\" (detach)=\"Close()\">\n <div class=\"mj-calendar\" role=\"grid\"\n [attr.aria-labelledby]=\"CalendarLabelledBy || null\"\n [attr.aria-label]=\"CalendarLabelledBy ? null : CalendarLabel\"\n (keydown)=\"OnCalendarKeyDown($event)\">\n <div class=\"mj-calendar-header\">\n <button type=\"button\" (click)=\"PreviousMonth()\" aria-label=\"Previous month\" class=\"mj-calendar-nav\">\n <i class=\"fa-solid fa-chevron-left\"></i></button>\n <span class=\"mj-calendar-title\">{{ MonthYearLabel }}</span>\n <button type=\"button\" (click)=\"NextMonth()\" aria-label=\"Next month\" class=\"mj-calendar-nav\">\n <i class=\"fa-solid fa-chevron-right\"></i></button>\n </div>\n <div class=\"mj-calendar-weekdays\" role=\"row\">\n @for (day of WeekDays; track day) { <span class=\"mj-calendar-weekday\" role=\"columnheader\">{{ day }}</span> }\n </div>\n @for (week of Weeks; track $index) {\n <div class=\"mj-calendar-row\" role=\"row\">\n @for (day of week; track day.date.getTime()) {\n <button type=\"button\" class=\"mj-calendar-day\" role=\"gridcell\"\n [class.mj-calendar-day--selected]=\"IsSelectedDay(day)\"\n [class.mj-calendar-day--today]=\"day.isToday\"\n [class.mj-calendar-day--other-month]=\"!day.isCurrentMonth\"\n [disabled]=\"IsOutOfRange(day)\" [attr.aria-selected]=\"IsSelectedDay(day)\"\n (click)=\"SelectDate(day)\">{{ day.dayNumber }}</button>\n }\n </div>\n }\n <div class=\"mj-calendar-footer\">\n <button type=\"button\" class=\"mj-calendar-today\" (click)=\"SelectToday()\">Today</button>\n </div>\n </div>\n </ng-template>\n `,\n styles: [`\n /*\n * Component-scoped ON PURPOSE, unlike the rest of this control's styling, which ships as a global\n * stylesheet the host application imports. A host that skips that import gets unstyled chrome —\n * survivable — but a hidden-word span that is not hidden renders its word as literal text in the\n * middle of the field. The rule that hides it therefore has to travel with the component.\n *\n * Not display:none or visibility:hidden — both remove the element from the accessibility tree,\n * which is the one thing this element exists to be in.\n */\n .mj-datepicker-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n }\n `],\n providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => MJDatepickerComponent), multi: true }]\n})\nexport class MJDatepickerComponent extends MJNamedControlBase implements ControlValueAccessor, AfterViewInit, OnDestroy {\n @Input() Min: Date | null = null;\n @Input() Max: Date | null = null;\n @Input() Format = 'MM/dd/yyyy';\n @Input() Placeholder = '';\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 @Output() ValueChange = new EventEmitter<Date | null>();\n @ViewChild('trigger') private triggerEl!: ElementRef<HTMLElement>;\n @ViewChild('dateInput') private dateInputEl: ElementRef<HTMLInputElement> | undefined;\n @HostBinding('class.mj-datepicker-host') readonly hostClass = true;\n private cdr = inject(ChangeDetectorRef);\n\n IsOpen = false; IsDisabled = false; DisplayValue = '';\n Weeks: CalendarDay[][] = []; WeekDays = WEEK_DAYS;\n Positions: ConnectedPosition[] = [\n { originX: 'start', originY: 'bottom', overlayX: 'start', overlayY: 'top' },\n { originX: 'start', originY: 'top', overlayX: 'start', overlayY: 'bottom' }\n ];\n private viewDate = new Date();\n private selectedDate: Date | null = null;\n private onChange: (value: Date | null) => void = () => {};\n private onTouched: () => void = () => {};\n\n get MonthYearLabel(): string { return GetMonthYearLabel(this.viewDate); }\n\n /** `aria-labelledby` id list for the toggle button when a VISIBLE label names the field. */\n get ToggleLabelledBy(): string { return this.SecondaryLabelledBy('toggle-word'); }\n\n /** `aria-label` for the toggle button in the no-visible-label case. */\n get ToggleLabel(): string { return this.SecondaryLabel('Open calendar for', 'Open calendar'); }\n\n /** `aria-labelledby` id list for the calendar grid when a VISIBLE label names the field. */\n get CalendarLabelledBy(): string { return this.SecondaryLabelledBy('calendar-word'); }\n\n /** `aria-label` for the calendar grid in the no-visible-label case. */\n get CalendarLabel(): string { return this.SecondaryLabel('Calendar for', 'Calendar'); }\n\n ngAfterViewInit(): void { WarnIfUnnamed(this.dateInputEl?.nativeElement, 'mj-datepicker'); }\n\n Toggle(): void { if (this.IsDisabled) return; this.IsOpen ? this.Close() : this.Open(); }\n Open(): void {\n if (this.IsDisabled || this.IsOpen) return;\n this.viewDate = this.selectedDate ? new Date(this.selectedDate) : new Date();\n this.Weeks = BuildCalendarWeeks(this.viewDate); this.IsOpen = true; this.cdr.detectChanges();\n }\n Close(): void { if (!this.IsOpen) return; this.IsOpen = false; this.cdr.detectChanges(); }\n\n /** Backing field for the `Disabled` input. */\n private disabledInput = false;\n /** The forms-driven disabled state, kept SEPARATE so neither source can stomp the other. */\n private formDisabled = false;\n\n /**\n * Recompute the gate from both of its sources. Called whenever either 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 * Closes the calendar directly rather than via `Close()`: this can run from an @Input setter,\n * i.e. DURING the parent's CD pass, where a nested `detectChanges()` trips NG0100.\n */\n private syncDisabled(): void {\n const disabled = this.disabledInput || this.formDisabled;\n if (disabled === this.IsDisabled) return;\n this.IsDisabled = disabled;\n if (disabled) this.IsOpen = false;\n this.cdr.markForCheck();\n }\n PreviousMonth(): void { this.viewDate = new Date(this.viewDate.getFullYear(), this.viewDate.getMonth() - 1, 1); this.Weeks = BuildCalendarWeeks(this.viewDate); }\n NextMonth(): void { this.viewDate = new Date(this.viewDate.getFullYear(), this.viewDate.getMonth() + 1, 1); this.Weeks = BuildCalendarWeeks(this.viewDate); }\n\n SelectDate(day: CalendarDay): void {\n if (this.IsOutOfRange(day)) return;\n this.selectedDate = day.date; this.DisplayValue = FormatDate(day.date);\n this.onChange(day.date); this.ValueChange.emit(day.date); this.Close();\n }\n SelectToday(): void {\n const today = new Date(); today.setHours(0, 0, 0, 0);\n this.selectedDate = today; this.DisplayValue = FormatDate(today);\n this.onChange(today); this.ValueChange.emit(today); this.Close();\n }\n IsSelectedDay(day: CalendarDay): boolean {\n if (!this.selectedDate) return false;\n return day.date.getFullYear() === this.selectedDate.getFullYear() && day.date.getMonth() === this.selectedDate.getMonth() && day.date.getDate() === this.selectedDate.getDate();\n }\n IsOutOfRange(day: CalendarDay): boolean {\n if (this.Min && day.date < this.Min) return true;\n if (this.Max && day.date > this.Max) return true;\n return false;\n }\n OnInputChange(event: Event): void {\n const value = (event.target as HTMLInputElement).value; this.DisplayValue = value;\n const parsed = new Date(value);\n if (!isNaN(parsed.getTime())) { this.selectedDate = parsed; this.onChange(parsed); this.ValueChange.emit(parsed); }\n }\n OnBlur(): void { this.onTouched(); }\n OnKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Escape') this.Close();\n else if (event.key === 'Enter' && !this.IsOpen) this.Open();\n else if (event.key === 'Tab') this.returnTabToField();\n }\n\n /** Tab in the calendar closes it and returns to the field. The key is not cancelled, so the browser moves on from that field. */\n OnCalendarKeyDown(event: KeyboardEvent): void {\n if (event.key === 'Tab') this.returnTabToField();\n }\n\n private returnTabToField(): void {\n if (!this.IsOpen) return;\n this.dateInputEl?.nativeElement.focus();\n this.Close();\n }\n writeValue(value: Date | string | null): void {\n if (value == null) { this.selectedDate = null; this.DisplayValue = ''; }\n else { const d = typeof value === 'string' ? new Date(value) : value; if (!isNaN(d.getTime())) { this.selectedDate = d; this.DisplayValue = FormatDate(d); } }\n }\n registerOnChange(fn: (value: Date | null) => void): void { this.onChange = fn; }\n registerOnTouched(fn: () => void): void { this.onTouched = fn; }\n setDisabledState(isDisabled: boolean): void { this.formDisabled = isDisabled; this.syncDisabled(); }\n ngOnDestroy(): void { this.Close(); }\n}\n"]}
@@ -4,7 +4,6 @@ export type MjDialogSize = 'sm' | 'md' | 'lg' | 'xl' | 'auto';
4
4
  /**
5
5
  * mj-dialog — Modal dialog component using native `<dialog>` element.
6
6
  *
7
- * Replaces `<kendo-dialog>`.
8
7
  *
9
8
  * Supports both explicit width/height and size presets.
10
9
  * Content is projected, with an optional `<mj-dialog-actions>` for the footer.
@@ -80,6 +79,13 @@ export declare class MJDialogComponent implements OnDestroy {
80
79
  Close: EventEmitter<void>;
81
80
  DialogId: number;
82
81
  get dialogId(): number;
82
+ /**
83
+ * How the dialog presents on a phone (dialog.scss applies it under 768px; desktop is unchanged).
84
+ * `sheet`: a bottom sheet sized to its content, for every alert dialog and for `sm` / `auto`
85
+ * dialogs without an explicit `Width`. `full`: full-screen with the title and actions pinned,
86
+ * for `md` / `lg` / `xl` and any dialog given a `Width` (it was laid out for a desktop width).
87
+ */
88
+ get PhoneMode(): 'sheet' | 'full';
83
89
  get ResolvedWidth(): string;
84
90
  /** @deprecated Use {@link ResolvedWidth}. */
85
91
  get resolvedWidth(): string;
@@ -114,7 +120,11 @@ export declare class MJDialogComponent implements OnDestroy {
114
120
  private cancelPendingInitialFocus;
115
121
  private focusInitial;
116
122
  private initialFocusTarget;
117
- /** First element that can take focus. The ✕ is skipped only for the button fallback. */
123
+ /**
124
+ * First element that can take focus. The ✕ is skipped only for the button fallback. A hidden or
125
+ * inert element is skipped too: `.focus()` on one is a silent no-op, which would leave focus
126
+ * outside the dialog.
127
+ */
118
128
  private firstEnabled;
119
129
  private restoreFocus;
120
130
  /** `document.body.focus()` is a no-op unless body is a focusable area; blur lands on body. */
@@ -124,8 +134,9 @@ export declare class MJDialogComponent implements OnDestroy {
124
134
  /** Real controls only. `tabindex="-1"` (including the container) is the fallback, not a stop. */
125
135
  private isTabStop;
126
136
  /**
127
- * display:none and [hidden] hide the whole subtree. visibility is inherited, and a child
128
- * can set visible again, so that check is only on the element itself.
137
+ * display:none, [hidden] and [inert] (a collapsed accordion body) take the whole subtree out of
138
+ * focus. visibility is inherited, and a child can set visible again, so that check is only on the
139
+ * element itself.
129
140
  */
130
141
  private isVisibleStop;
131
142
  private isDisabled;
@@ -135,7 +146,6 @@ export declare class MJDialogComponent implements OnDestroy {
135
146
  /**
136
147
  * mj-dialog-titlebar — Custom titlebar content for mj-dialog.
137
148
  *
138
- * Replaces `<kendo-dialog-titlebar>`.
139
149
  *
140
150
  * @example
141
151
  * ```html
@@ -154,7 +164,6 @@ export declare class MJDialogTitlebarComponent {
154
164
  /**
155
165
  * mj-dialog-actions — Footer action bar for mj-dialog.
156
166
  *
157
- * Replaces `<kendo-dialog-actions>`.
158
167
  *
159
168
  * @example
160
169
  * ```html
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.component.d.ts","sourceRoot":"","sources":["../../../src/lib/dialog/dialog.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,YAAY,EAGZ,SAAS,EAEV,MAAM,eAAe,CAAC;;AAEvB,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAU9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,qBA8Ca,iBAAkB,YAAW,SAAS;IACjD,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAiD;IACtE,OAAO,CAAC,QAAQ,CAAS;IACzB,yEAAyE;IACzE,OAAO,CAAC,iBAAi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