@camaradesuk/m3e-angular 0.2.0-alpha.12 → 0.2.0-alpha.13
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.
|
@@ -5680,6 +5680,7 @@ const options$2 = matExpCreateOptions({
|
|
|
5680
5680
|
closeLabel: 'Close dialog',
|
|
5681
5681
|
adaptiveWidth: undefined,
|
|
5682
5682
|
compactActions: 'header',
|
|
5683
|
+
closeButton: 'visible',
|
|
5683
5684
|
});
|
|
5684
5685
|
const MAT_EXP_DIALOG_OPTIONS = options$2.token;
|
|
5685
5686
|
const provideMatExpDialogOptions = options$2.provide;
|
|
@@ -8689,6 +8690,19 @@ class MatExpDialogRef {
|
|
|
8689
8690
|
*/
|
|
8690
8691
|
disableClose;
|
|
8691
8692
|
/** @internal */
|
|
8693
|
+
_closeButton = signal('visible', /* @ts-ignore */
|
|
8694
|
+
...(ngDevMode ? [{ debugName: "_closeButton" }] : /* istanbul ignore next */ []));
|
|
8695
|
+
/** @internal */
|
|
8696
|
+
_closeLabel = signal('', /* @ts-ignore */
|
|
8697
|
+
...(ngDevMode ? [{ debugName: "_closeLabel" }] : /* istanbul ignore next */ []));
|
|
8698
|
+
/**
|
|
8699
|
+
* Whether the adaptive layout shows its close button. Alert dialogs never have one.
|
|
8700
|
+
* @default 'visible'
|
|
8701
|
+
*/
|
|
8702
|
+
closeButton = this._closeButton.asReadonly();
|
|
8703
|
+
/** The adaptive close button's accessible label. @default 'Close dialog' */
|
|
8704
|
+
closeLabel = this._closeLabel.asReadonly();
|
|
8705
|
+
/** @internal */
|
|
8692
8706
|
_state = MatDialogState.OPEN;
|
|
8693
8707
|
/** @internal */
|
|
8694
8708
|
_result;
|
|
@@ -8715,6 +8729,8 @@ class MatExpDialogRef {
|
|
|
8715
8729
|
this._container = _container;
|
|
8716
8730
|
this._position = _position;
|
|
8717
8731
|
this.disableClose = !!_config.disableClose;
|
|
8732
|
+
this._closeButton.set(_config.closeButton ?? 'visible');
|
|
8733
|
+
this._closeLabel.set(_config.closeLabel ?? '');
|
|
8718
8734
|
_container.opened.subscribe(() => {
|
|
8719
8735
|
this._opened.next();
|
|
8720
8736
|
this._opened.complete();
|
|
@@ -8784,6 +8800,33 @@ class MatExpDialogRef {
|
|
|
8784
8800
|
closeButtonClick() {
|
|
8785
8801
|
return this._closeButtonClicks.asObservable();
|
|
8786
8802
|
}
|
|
8803
|
+
/**
|
|
8804
|
+
* Show or hide the adaptive layout's close button while the dialog is open, for example to hide
|
|
8805
|
+
* it while work that must not be interrupted runs. Escape and backdrop clicks keep following
|
|
8806
|
+
* `disableClose`, and focus stays trapped in the dialog. Hiding the button while it has focus
|
|
8807
|
+
* moves focus to the dialog's initial focus target (the first tabbable control by default).
|
|
8808
|
+
* No effect on alert dialogs, which have no close button.
|
|
8809
|
+
*/
|
|
8810
|
+
updateCloseButton(closeButton) {
|
|
8811
|
+
if (closeButton !== 'visible' && closeButton !== 'hidden')
|
|
8812
|
+
throw new Error("closeButton must be 'visible' or 'hidden'.");
|
|
8813
|
+
if (closeButton === this._closeButton())
|
|
8814
|
+
return this;
|
|
8815
|
+
if (closeButton === 'hidden')
|
|
8816
|
+
this._container.closeButtonHiding();
|
|
8817
|
+
this._closeButton.set(closeButton);
|
|
8818
|
+
return this;
|
|
8819
|
+
}
|
|
8820
|
+
/**
|
|
8821
|
+
* Change the adaptive close button's accessible label while the dialog is open, for example to
|
|
8822
|
+
* say what closing does in the current state. Must not be blank.
|
|
8823
|
+
*/
|
|
8824
|
+
updateCloseLabel(closeLabel) {
|
|
8825
|
+
if (!closeLabel.trim())
|
|
8826
|
+
throw new Error('closeLabel must not be empty.');
|
|
8827
|
+
this._closeLabel.set(closeLabel);
|
|
8828
|
+
return this;
|
|
8829
|
+
}
|
|
8787
8830
|
/** @internal The adaptive close button is a dismissal gesture, like Escape and the backdrop. */
|
|
8788
8831
|
_closeButtonClick(event) {
|
|
8789
8832
|
this._closeButtonClicks.next(event);
|
|
@@ -9300,6 +9343,15 @@ class MatExpDialogContainer extends CdkDialogContainer {
|
|
|
9300
9343
|
this.exited.next();
|
|
9301
9344
|
});
|
|
9302
9345
|
}
|
|
9346
|
+
/**
|
|
9347
|
+
* The layout's close button is about to be removed. If it has focus, move focus to the dialog's
|
|
9348
|
+
* initial focus target once it is gone, so focus never falls out of the trap to the page.
|
|
9349
|
+
*/
|
|
9350
|
+
closeButtonHiding() {
|
|
9351
|
+
const button = this._elementRef.nativeElement.querySelector('.mat-exp-dialog-close');
|
|
9352
|
+
if (button?.contains(this._document?.activeElement ?? null))
|
|
9353
|
+
this._trapFocus({ preventScroll: true });
|
|
9354
|
+
}
|
|
9303
9355
|
/** Follow content that animates its own size, without a competing surface spring. */
|
|
9304
9356
|
followContentSize(active) {
|
|
9305
9357
|
this._following = active;
|
|
@@ -9375,14 +9427,14 @@ class MatExpDialogLayout {
|
|
|
9375
9427
|
_actions = contentChild(MatExpDialogActions, /* @ts-ignore */
|
|
9376
9428
|
...(ngDevMode ? [{ debugName: "_actions" }] : /* istanbul ignore next */ []));
|
|
9377
9429
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogLayout, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
9378
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: MatExpDialogLayout, isStandalone: true, selector: "mat-exp-dialog-layout", host: { properties: { "attr.data-mode": "_context.mode", "attr.data-compact-actions": "_context.mode === 'adaptive' ? _context.compactActions : null" } }, queries: [{ propertyName: "_actions", first: true, predicate: MatExpDialogActions, descendants: true, isSignal: true }], exportAs: ["matExpDialogLayout"], ngImport: i0, template: `
|
|
9379
|
-
@if (_context.mode === 'adaptive') {
|
|
9430
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.2.3", type: MatExpDialogLayout, isStandalone: true, selector: "mat-exp-dialog-layout", host: { properties: { "attr.data-mode": "_context.mode", "attr.data-compact-actions": "_context.mode === 'adaptive' ? _context.compactActions : null", "attr.data-close-button": "_context.mode === 'adaptive' ? _ref.closeButton() : null" } }, queries: [{ propertyName: "_actions", first: true, predicate: MatExpDialogActions, descendants: true, isSignal: true }], exportAs: ["matExpDialogLayout"], ngImport: i0, template: `
|
|
9431
|
+
@if (_context.mode === 'adaptive' && _ref.closeButton() === 'visible') {
|
|
9380
9432
|
<button
|
|
9381
9433
|
type="button"
|
|
9382
9434
|
matIconButton
|
|
9383
9435
|
class="mat-exp-dialog-close"
|
|
9384
9436
|
(click)="_ref._closeButtonClick($event)"
|
|
9385
|
-
[attr.aria-label]="
|
|
9437
|
+
[attr.aria-label]="_ref.closeLabel()"
|
|
9386
9438
|
>
|
|
9387
9439
|
<svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24">
|
|
9388
9440
|
<path
|
|
@@ -9399,18 +9451,18 @@ class MatExpDialogLayout {
|
|
|
9399
9451
|
<ng-container [ngTemplateOutlet]="actions.template" />
|
|
9400
9452
|
</div>
|
|
9401
9453
|
}
|
|
9402
|
-
`, isInline: true, styles: ["mat-exp-dialog-layout{display:grid;grid-template:\"heading close\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/1fr auto;min-height:0;max-height:inherit;height:100%}mat-exp-dialog-layout>.mat-exp-dialog-heading{grid-area:heading;margin:0;min-width:0;overflow-wrap:anywhere}mat-exp-dialog-layout>.mat-exp-dialog-body{grid-area:body;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}mat-exp-dialog-layout>.mat-exp-dialog-actions{grid-area:actions}mat-exp-dialog-layout>.mat-exp-dialog-close{grid-area:close;align-self:center;margin-inline-end:16px}mat-exp-dialog-layout>.mat-exp-dialog-close.cdk-program-focused:not(:focus-visible,:hover)>.mat-mdc-button-persistent-ripple:before{opacity:0}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]{grid-template:\"close heading actions\" auto \"body body body\" minmax(0,1fr)/auto minmax(0,1fr) auto;padding-top:env(safe-area-inset-top,0px)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-close{grid-area:close;display:inline-flex;align-self:center;margin-inline-start:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading{align-self:center;padding:.75rem .5rem;font:var(--mat-sys-title-large)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading:before{display:none}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-actions{align-self:center;min-height:3.5rem;padding:0;padding-inline-end:max(8px,env(safe-area-inset-right,0px));border:0;flex-wrap:wrap;max-width:45vw}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-close{margin-inline-start:max(8px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-actions{padding-inline-end:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-body{padding-top:1.5rem;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]{grid-template:\"close heading\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/auto minmax(0,1fr)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:1rem max(24px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-body{padding-bottom:1.5rem}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-left,0px))}}mat-exp-dialog-layout>.mat-exp-dialog-heading{padding:24px 24px 16px;color:var(--mat-sys-on-surface);font:var(--mat-sys-headline-small)}mat-exp-dialog-layout>.mat-exp-dialog-body{padding:0 24px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}mat-exp-dialog-layout>.mat-exp-dialog-body>:first-child{margin-top:0}mat-exp-dialog-layout>.mat-exp-dialog-body>:last-child{margin-bottom:0}mat-exp-dialog-layout>.mat-exp-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
9454
|
+
`, isInline: true, styles: ["mat-exp-dialog-layout{display:grid;grid-template:\"heading close\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/1fr auto;min-height:0;max-height:inherit;height:100%}mat-exp-dialog-layout>.mat-exp-dialog-heading{grid-area:heading;margin:0;min-width:0;overflow-wrap:anywhere}mat-exp-dialog-layout>.mat-exp-dialog-body{grid-area:body;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}mat-exp-dialog-layout>.mat-exp-dialog-actions{grid-area:actions}mat-exp-dialog-layout>.mat-exp-dialog-close{grid-area:close;align-self:center;margin-inline-end:16px}mat-exp-dialog-layout>.mat-exp-dialog-close.cdk-program-focused:not(:focus-visible,:hover)>.mat-mdc-button-persistent-ripple:before{opacity:0}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]{grid-template:\"close heading actions\" auto \"body body body\" minmax(0,1fr)/auto minmax(0,1fr) auto;padding-top:env(safe-area-inset-top,0px)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-close{grid-area:close;display:inline-flex;align-self:center;margin-inline-start:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading{align-self:center;padding:.75rem .5rem;font:var(--mat-sys-title-large)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading:before{display:none}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-actions{align-self:center;min-height:3.5rem;padding:0;padding-inline-end:max(8px,env(safe-area-inset-right,0px));border:0;flex-wrap:wrap;max-width:45vw}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-close{margin-inline-start:max(8px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-actions{padding-inline-end:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-body{padding-top:1.5rem;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-close-button=hidden]>.mat-exp-dialog-heading{padding-inline-start:max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-close-button=hidden]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-start:max(24px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]{grid-template:\"close heading\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/auto minmax(0,1fr)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:1rem max(24px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-body{padding-bottom:1.5rem}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-left,0px))}}mat-exp-dialog-layout>.mat-exp-dialog-heading{padding:24px 24px 16px;color:var(--mat-sys-on-surface);font:var(--mat-sys-headline-small)}mat-exp-dialog-layout>.mat-exp-dialog-body{padding:0 24px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}mat-exp-dialog-layout>.mat-exp-dialog-body>:first-child{margin-top:0}mat-exp-dialog-layout>.mat-exp-dialog-body>:last-child{margin-bottom:0}mat-exp-dialog-layout>.mat-exp-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i1$2.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
9403
9455
|
}
|
|
9404
9456
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImport: i0, type: MatExpDialogLayout, decorators: [{
|
|
9405
9457
|
type: Component,
|
|
9406
9458
|
args: [{ selector: 'mat-exp-dialog-layout', exportAs: 'matExpDialogLayout', imports: [MatButtonModule, NgTemplateOutlet], template: `
|
|
9407
|
-
@if (_context.mode === 'adaptive') {
|
|
9459
|
+
@if (_context.mode === 'adaptive' && _ref.closeButton() === 'visible') {
|
|
9408
9460
|
<button
|
|
9409
9461
|
type="button"
|
|
9410
9462
|
matIconButton
|
|
9411
9463
|
class="mat-exp-dialog-close"
|
|
9412
9464
|
(click)="_ref._closeButtonClick($event)"
|
|
9413
|
-
[attr.aria-label]="
|
|
9465
|
+
[attr.aria-label]="_ref.closeLabel()"
|
|
9414
9466
|
>
|
|
9415
9467
|
<svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24">
|
|
9416
9468
|
<path
|
|
@@ -9430,7 +9482,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.2.3", ngImpor
|
|
|
9430
9482
|
`, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
9431
9483
|
'[attr.data-mode]': '_context.mode',
|
|
9432
9484
|
'[attr.data-compact-actions]': "_context.mode === 'adaptive' ? _context.compactActions : null",
|
|
9433
|
-
|
|
9485
|
+
'[attr.data-close-button]': "_context.mode === 'adaptive' ? _ref.closeButton() : null",
|
|
9486
|
+
}, styles: ["mat-exp-dialog-layout{display:grid;grid-template:\"heading close\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/1fr auto;min-height:0;max-height:inherit;height:100%}mat-exp-dialog-layout>.mat-exp-dialog-heading{grid-area:heading;margin:0;min-width:0;overflow-wrap:anywhere}mat-exp-dialog-layout>.mat-exp-dialog-body{grid-area:body;min-height:0;max-height:none;overflow:auto;overscroll-behavior:contain}mat-exp-dialog-layout>.mat-exp-dialog-actions{grid-area:actions}mat-exp-dialog-layout>.mat-exp-dialog-close{grid-area:close;align-self:center;margin-inline-end:16px}mat-exp-dialog-layout>.mat-exp-dialog-close.cdk-program-focused:not(:focus-visible,:hover)>.mat-mdc-button-persistent-ripple:before{opacity:0}@media(max-width:599px){.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]{grid-template:\"close heading actions\" auto \"body body body\" minmax(0,1fr)/auto minmax(0,1fr) auto;padding-top:env(safe-area-inset-top,0px)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-close{grid-area:close;display:inline-flex;align-self:center;margin-inline-start:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading{align-self:center;padding:.75rem .5rem;font:var(--mat-sys-title-large)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-heading:before{display:none}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-actions{align-self:center;min-height:3.5rem;padding:0;padding-inline-end:max(8px,env(safe-area-inset-right,0px));border:0;flex-wrap:wrap;max-width:45vw}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-close{margin-inline-start:max(8px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]:dir(rtl)>.mat-exp-dialog-actions{padding-inline-end:max(8px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive]>.mat-exp-dialog-body{padding-top:1.5rem;padding-bottom:max(24px,env(safe-area-inset-bottom,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-close-button=hidden]>.mat-exp-dialog-heading{padding-inline-start:max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-close-button=hidden]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-start:max(24px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]{grid-template:\"close heading\" auto \"body body\" minmax(0,1fr) \"actions actions\" auto/auto minmax(0,1fr)}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-right,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-actions{align-self:stretch;max-width:none;min-height:0;padding:1rem max(24px,env(safe-area-inset-right,0px)) max(16px,env(safe-area-inset-bottom,0px)) max(24px,env(safe-area-inset-left,0px))}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]>.mat-exp-dialog-body{padding-bottom:1.5rem}.mat-exp-dialog-panel mat-exp-dialog-layout[data-mode=adaptive][data-compact-actions=footer]:dir(rtl)>.mat-exp-dialog-heading{padding-inline-end:max(16px,env(safe-area-inset-left,0px))}}mat-exp-dialog-layout>.mat-exp-dialog-heading{padding:24px 24px 16px;color:var(--mat-sys-on-surface);font:var(--mat-sys-headline-small)}mat-exp-dialog-layout>.mat-exp-dialog-body{padding:0 24px;color:var(--mat-sys-on-surface-variant);font:var(--mat-sys-body-medium)}mat-exp-dialog-layout>.mat-exp-dialog-body>:first-child{margin-top:0}mat-exp-dialog-layout>.mat-exp-dialog-body>:last-child{margin-bottom:0}mat-exp-dialog-layout>.mat-exp-dialog-actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;padding:24px}\n"] }]
|
|
9434
9487
|
}], propDecorators: { _actions: [{ type: i0.ContentChild, args: [i0.forwardRef(() => MatExpDialogActions), { isSignal: true }] }] } });
|
|
9435
9488
|
|
|
9436
9489
|
/** @internal Built-in content for the one-call plain-text confirmation. */
|
|
@@ -9531,7 +9584,7 @@ class MatExpDialog {
|
|
|
9531
9584
|
if (config.mode === 'alert' && (!config.role || !config.ariaDescribedBy?.trim())) {
|
|
9532
9585
|
throw new Error('Alert mode requires an explicit role and ariaDescribedBy.');
|
|
9533
9586
|
}
|
|
9534
|
-
const { mode, title, motion = this._options.motion, closeLabel = this._options.closeLabel, origin, adaptiveWidth = this._options.adaptiveWidth, compactActions = this._options.compactActions, ...native } = config;
|
|
9587
|
+
const { mode, title, motion = this._options.motion, closeLabel = this._options.closeLabel, origin, adaptiveWidth = this._options.adaptiveWidth, compactActions = this._options.compactActions, closeButton = this._options.closeButton, ...native } = config;
|
|
9535
9588
|
if (mode === 'adaptive' && !closeLabel.trim())
|
|
9536
9589
|
throw new Error('Adaptive mode requires a non-empty closeLabel.');
|
|
9537
9590
|
if (mode === 'adaptive' &&
|
|
@@ -9545,6 +9598,8 @@ class MatExpDialog {
|
|
|
9545
9598
|
throw new Error('Adaptive mode requires a valid CSS adaptiveWidth.');
|
|
9546
9599
|
if (compactActions !== 'header' && compactActions !== 'footer')
|
|
9547
9600
|
throw new Error("compactActions must be 'header' or 'footer'.");
|
|
9601
|
+
if (closeButton !== 'visible' && closeButton !== 'hidden')
|
|
9602
|
+
throw new Error("closeButton must be 'visible' or 'hidden'.");
|
|
9548
9603
|
const effective = { ...this._nativeDefaults, ...native };
|
|
9549
9604
|
const classes = (value) => typeof value === 'string' ? [value] : (value ?? []);
|
|
9550
9605
|
const injector = Injector.create({
|
|
@@ -9552,7 +9607,16 @@ class MatExpDialog {
|
|
|
9552
9607
|
providers: [
|
|
9553
9608
|
{
|
|
9554
9609
|
provide: MAT_EXP_DIALOG_CONTEXT,
|
|
9555
|
-
useValue: {
|
|
9610
|
+
useValue: {
|
|
9611
|
+
mode,
|
|
9612
|
+
title,
|
|
9613
|
+
closeLabel,
|
|
9614
|
+
motion,
|
|
9615
|
+
adaptiveWidth,
|
|
9616
|
+
origin,
|
|
9617
|
+
compactActions,
|
|
9618
|
+
closeButton,
|
|
9619
|
+
},
|
|
9556
9620
|
},
|
|
9557
9621
|
],
|
|
9558
9622
|
});
|
|
@@ -9566,7 +9630,7 @@ class MatExpDialog {
|
|
|
9566
9630
|
motion,
|
|
9567
9631
|
closeLabel,
|
|
9568
9632
|
origin,
|
|
9569
|
-
...(mode === 'adaptive' ? { adaptiveWidth, compactActions } : {}),
|
|
9633
|
+
...(mode === 'adaptive' ? { adaptiveWidth, compactActions, closeButton } : {}),
|
|
9570
9634
|
};
|
|
9571
9635
|
this._dialog.open(component, {
|
|
9572
9636
|
...effective,
|