@ng-matero/extensions 14.4.1 → 14.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alert/alert.component.d.ts +4 -4
- package/datetimepicker/datetimepicker.d.ts +1 -0
- package/esm2020/alert/alert.component.mjs +5 -5
- package/esm2020/datetimepicker/datetimepicker.mjs +29 -14
- package/esm2020/grid/cell.component.mjs +1 -1
- package/esm2020/grid/grid.component.mjs +84 -23
- package/esm2020/grid/grid.interface.mjs +1 -1
- package/esm2020/loader/loader.component.mjs +10 -4
- package/esm2020/progress/progress.component.mjs +5 -5
- package/fesm2015/mtxAlert.mjs +4 -4
- package/fesm2015/mtxAlert.mjs.map +1 -1
- package/fesm2015/mtxDatetimepicker.mjs +28 -14
- package/fesm2015/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2015/mtxGrid.mjs +83 -22
- package/fesm2015/mtxGrid.mjs.map +1 -1
- package/fesm2015/mtxLoader.mjs +9 -3
- package/fesm2015/mtxLoader.mjs.map +1 -1
- package/fesm2015/mtxProgress.mjs +4 -4
- package/fesm2015/mtxProgress.mjs.map +1 -1
- package/fesm2020/mtxAlert.mjs +4 -4
- package/fesm2020/mtxAlert.mjs.map +1 -1
- package/fesm2020/mtxDatetimepicker.mjs +28 -14
- package/fesm2020/mtxDatetimepicker.mjs.map +1 -1
- package/fesm2020/mtxGrid.mjs +83 -22
- package/fesm2020/mtxGrid.mjs.map +1 -1
- package/fesm2020/mtxLoader.mjs +9 -3
- package/fesm2020/mtxLoader.mjs.map +1 -1
- package/fesm2020/mtxProgress.mjs +4 -4
- package/fesm2020/mtxProgress.mjs.map +1 -1
- package/grid/cell.component.d.ts +1 -1
- package/grid/grid.component.d.ts +89 -11
- package/grid/grid.interface.d.ts +3 -2
- package/loader/loader.component.d.ts +9 -3
- package/package.json +1 -1
- package/progress/progress.component.d.ts +8 -8
package/fesm2015/mtxLoader.mjs
CHANGED
|
@@ -11,25 +11,31 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
|
11
11
|
class MtxLoaderComponent {
|
|
12
12
|
constructor(_changeDetectorRef) {
|
|
13
13
|
this._changeDetectorRef = _changeDetectorRef;
|
|
14
|
+
/** The loader's type. Can be `spinner` or `progressbar` */
|
|
14
15
|
this.type = 'spinner';
|
|
16
|
+
/** Theme color palette for the component. */
|
|
15
17
|
this.color = 'primary';
|
|
18
|
+
/** Mode of the progress circle or the progress bar. */
|
|
16
19
|
this.mode = 'indeterminate';
|
|
17
|
-
/**
|
|
20
|
+
/** Stroke width of the spinner loader. */
|
|
18
21
|
this.strokeWidth = 4;
|
|
19
|
-
/**
|
|
22
|
+
/** The diameter of the spinner loader (will set width and height of svg). */
|
|
20
23
|
this.diameter = 48;
|
|
21
|
-
/**
|
|
24
|
+
/** Buffer value of the progressbar loader. */
|
|
22
25
|
this.bufferValue = 0;
|
|
26
|
+
/** Value of the progress circle or the progress bar. */
|
|
23
27
|
this.value = 0;
|
|
24
28
|
this._loading = true;
|
|
25
29
|
this._hasBackdrop = true;
|
|
26
30
|
}
|
|
31
|
+
/** Whether the loader is loading. */
|
|
27
32
|
get loading() {
|
|
28
33
|
return this._loading;
|
|
29
34
|
}
|
|
30
35
|
set loading(value) {
|
|
31
36
|
this._loading = coerceBooleanProperty(value);
|
|
32
37
|
}
|
|
38
|
+
/** Whether the loader has a backdrop. */
|
|
33
39
|
get hasBackdrop() {
|
|
34
40
|
return this._hasBackdrop;
|
|
35
41
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxLoader.mjs","sources":["../../../projects/extensions/loader/loader.component.ts","../../../projects/extensions/loader/loader.component.html","../../../projects/extensions/loader/loader.module.ts","../../../projects/extensions/loader/mtxLoader.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Input,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ThemePalette } from '@angular/material/core';\nimport { ProgressBarMode } from '@angular/material/progress-bar';\nimport { ProgressSpinnerMode } from '@angular/material/progress-spinner';\n\nexport type MtxLoaderType = 'spinner' | 'progressbar';\n\n@Component({\n selector: 'mtx-loader',\n exportAs: 'mtxLoader',\n host: {\n 'class': 'mtx-loader',\n '[class.mtx-loader-loading]': 'loading',\n },\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxLoaderComponent {\n @Input() type: MtxLoaderType = 'spinner';\n\n @Input() color: ThemePalette = 'primary';\n\n @Input() mode: ProgressSpinnerMode | ProgressBarMode = 'indeterminate';\n\n /**
|
|
1
|
+
{"version":3,"file":"mtxLoader.mjs","sources":["../../../projects/extensions/loader/loader.component.ts","../../../projects/extensions/loader/loader.component.html","../../../projects/extensions/loader/loader.module.ts","../../../projects/extensions/loader/mtxLoader.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Input,\n ChangeDetectorRef,\n} from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { ThemePalette } from '@angular/material/core';\nimport { ProgressBarMode } from '@angular/material/progress-bar';\nimport { ProgressSpinnerMode } from '@angular/material/progress-spinner';\n\nexport type MtxLoaderType = 'spinner' | 'progressbar';\n\n@Component({\n selector: 'mtx-loader',\n exportAs: 'mtxLoader',\n host: {\n 'class': 'mtx-loader',\n '[class.mtx-loader-loading]': 'loading',\n },\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxLoaderComponent {\n /** The loader's type. Can be `spinner` or `progressbar` */\n @Input() type: MtxLoaderType = 'spinner';\n\n /** Theme color palette for the component. */\n @Input() color: ThemePalette = 'primary';\n\n /** Mode of the progress circle or the progress bar. */\n @Input() mode: ProgressSpinnerMode | ProgressBarMode = 'indeterminate';\n\n /** Stroke width of the spinner loader. */\n @Input() strokeWidth = 4;\n\n /** The diameter of the spinner loader (will set width and height of svg). */\n @Input() diameter = 48;\n\n /** Buffer value of the progressbar loader. */\n @Input() bufferValue = 0;\n\n /** Value of the progress circle or the progress bar. */\n @Input() value = 0;\n\n /** Whether the loader is loading. */\n @Input()\n get loading(): boolean {\n return this._loading;\n }\n set loading(value: boolean) {\n this._loading = coerceBooleanProperty(value);\n }\n private _loading = true;\n\n /** Whether the loader has a backdrop. */\n @Input()\n get hasBackdrop(): boolean {\n return this._hasBackdrop;\n }\n set hasBackdrop(value: boolean) {\n this._hasBackdrop = coerceBooleanProperty(value);\n }\n private _hasBackdrop = true;\n\n constructor(private _changeDetectorRef: ChangeDetectorRef) {}\n\n static ngAcceptInputType_loading: BooleanInput;\n static ngAcceptInputType_hasBackdrop: BooleanInput;\n}\n","<div class=\"mtx-loader-backdrop\" *ngIf=\"loading && hasBackdrop\"></div>\r\n<div class=\"mtx-loader-main\" *ngIf=\"loading\">\r\n <mat-spinner *ngIf=\"type==='spinner'\"\r\n [color]=\"color\"\r\n [strokeWidth]=\"strokeWidth\"\r\n [diameter]=\"diameter\"\r\n [mode]=\"$any(mode)\"\r\n [value]=\"value\">\r\n </mat-spinner>\r\n\r\n <mat-progress-bar *ngIf=\"type==='progressbar'\"\r\n [color]=\"color\"\r\n [mode]=\"$any(mode)\"\r\n [value]=\"value\"\r\n [bufferValue]=\"bufferValue\">\r\n </mat-progress-bar>\r\n</div>\r\n<ng-content></ng-content>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\n\r\nimport { MtxLoaderComponent } from './loader.component';\r\n\r\n@NgModule({\r\n imports: [CommonModule, MatProgressSpinnerModule, MatProgressBarModule],\r\n exports: [MtxLoaderComponent],\r\n declarations: [M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/mtxProgress.mjs
CHANGED
|
@@ -6,21 +6,21 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
|
6
6
|
|
|
7
7
|
class MtxProgressComponent {
|
|
8
8
|
constructor() {
|
|
9
|
-
/** The progress type */
|
|
9
|
+
/** The progress's type. Can be `default`, `info`, `success`, `warning` or `danger`. */
|
|
10
10
|
this.type = 'info';
|
|
11
|
-
/** The progress
|
|
11
|
+
/** The value of the progress. */
|
|
12
12
|
this.value = 0;
|
|
13
13
|
this._striped = false;
|
|
14
14
|
this._animate = false;
|
|
15
15
|
}
|
|
16
|
-
/** Whether
|
|
16
|
+
/** Whether to apply the striped class. */
|
|
17
17
|
get striped() {
|
|
18
18
|
return this._striped;
|
|
19
19
|
}
|
|
20
20
|
set striped(value) {
|
|
21
21
|
this._striped = coerceBooleanProperty(value);
|
|
22
22
|
}
|
|
23
|
-
/** Whether
|
|
23
|
+
/** Whether to apply the animated class. */
|
|
24
24
|
get animate() {
|
|
25
25
|
return this._animate;
|
|
26
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxProgress.mjs","sources":["../../../projects/extensions/progress/progress.component.ts","../../../projects/extensions/progress/progress.component.html","../../../projects/extensions/progress/progress.module.ts","../../../projects/extensions/progress/mtxProgress.ts"],"sourcesContent":["import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\nexport type MtxProgressType = 'default' | 'info' | 'success' | 'warning' | 'danger';\n\n@Component({\n selector: 'mtx-progress',\n exportAs: 'mtxProgress',\n host: {\n 'class': 'mtx-progress',\n '[style.height]': 'height',\n '[style.backgroundColor]': 'background',\n },\n templateUrl: './progress.component.html',\n styleUrls: ['./progress.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxProgressComponent {\n /** The progress type */\n @Input() type: MtxProgressType = 'info';\n\n /** The progress
|
|
1
|
+
{"version":3,"file":"mtxProgress.mjs","sources":["../../../projects/extensions/progress/progress.component.ts","../../../projects/extensions/progress/progress.component.html","../../../projects/extensions/progress/progress.module.ts","../../../projects/extensions/progress/mtxProgress.ts"],"sourcesContent":["import { Component, Input, ViewEncapsulation, ChangeDetectionStrategy } from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\nexport type MtxProgressType = 'default' | 'info' | 'success' | 'warning' | 'danger';\n\n@Component({\n selector: 'mtx-progress',\n exportAs: 'mtxProgress',\n host: {\n 'class': 'mtx-progress',\n '[style.height]': 'height',\n '[style.backgroundColor]': 'background',\n },\n templateUrl: './progress.component.html',\n styleUrls: ['./progress.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxProgressComponent {\n /** The progress's type. Can be `default`, `info`, `success`, `warning` or `danger`. */\n @Input() type: MtxProgressType = 'info';\n\n /** The value of the progress. */\n @Input() value = 0;\n\n /** The height of the progress. */\n @Input() height!: string;\n\n /** The text color of the progress. */\n @Input() color!: string;\n\n /** The bar color of the progress. */\n @Input() foreground!: string;\n\n /** The track color of the progress. */\n @Input() background!: string;\n\n /** Whether to apply the striped class. */\n @Input()\n get striped(): boolean {\n return this._striped;\n }\n set striped(value: boolean) {\n this._striped = coerceBooleanProperty(value);\n }\n private _striped = false;\n\n /** Whether to apply the animated class. */\n @Input()\n get animate(): boolean {\n return this._animate;\n }\n set animate(value: boolean) {\n this._animate = coerceBooleanProperty(value);\n }\n private _animate = false;\n\n static ngAcceptInputType_striped: BooleanInput;\n static ngAcceptInputType_animate: BooleanInput;\n}\n","<div [class]=\"'mtx-progress-fill mtx-progress-fill-' + type\"\n [ngClass]=\"{'mtx-progress-fill-striped': striped, 'mtx-progress-fill-animated': animate}\"\n [ngStyle]=\"{ 'width.%': value, 'background-color': foreground }\"\n role=\"progress-fill\">\n <ng-content></ng-content>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MtxProgressComponent } from './progress.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [MtxProgressComponent],\n declarations: [MtxProgressComponent],\n})\nexport class MtxProgressModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAkBa,oBAAoB,CAAA;AAbjC,IAAA,WAAA,GAAA;;AAeW,QAAA,IAAI,CAAA,IAAA,GAAoB,MAAM,CAAC;;AAG/B,QAAA,IAAK,CAAA,KAAA,GAAG,CAAC,CAAC;AAsBX,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAUjB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;KAI1B;;AArBC,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;IACD,IAAI,OAAO,CAAC,KAAc,EAAA;AACxB,QAAA,IAAI,CAAC,QAAQ,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;KAC9C;;AAID,IAAA,IACI,OAAO,GAAA;QACT,OAAO,IAAI,CAAC,QAAQ,CAAC;KACtB;IACD,IAAI,OAAO,CAAC,KAAc,EAAA;AACxB,QAAA,IAAI,CAAC,QAAQ,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;KAC9C;;oIApCU,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAApB,mBAAA,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,oBAAoB,kXClBjC,gTAMA,EAAA,MAAA,EAAA,CAAA,otBAAA,CAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAAA,QAAA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EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,EAFb,YAAA,EAAA,CAAA,oBAAoB,CAFzB,EAAA,OAAA,EAAA,CAAA,YAAY,aACZ,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAGnB,mBAAA,iBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAJlB,YAAY,CAAA,EAAA,CAAA,CAAA;2FAIX,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAL7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,oBAAoB,CAAC;oBAC/B,YAAY,EAAE,CAAC,oBAAoB,CAAC;iBACrC,CAAA;;;ACTD;;AAEG;;;;"}
|
package/fesm2020/mtxAlert.mjs
CHANGED
|
@@ -7,18 +7,18 @@ import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
|
7
7
|
class MtxAlertComponent {
|
|
8
8
|
constructor(_changeDetectorRef) {
|
|
9
9
|
this._changeDetectorRef = _changeDetectorRef;
|
|
10
|
-
/** The alert type */
|
|
10
|
+
/** The alert's type. Can be `default`, `info`, `success`, `warning` or `danger`. */
|
|
11
11
|
this.type = 'default';
|
|
12
12
|
this._dismissible = false;
|
|
13
|
-
/**
|
|
13
|
+
/** The alert's elevation (0~24). */
|
|
14
14
|
this.elevation = 0;
|
|
15
|
-
/**
|
|
15
|
+
/** Event emitted when the alert closed. */
|
|
16
16
|
this.closed = new EventEmitter();
|
|
17
17
|
}
|
|
18
18
|
get _hostClassList() {
|
|
19
19
|
return `mtx-alert-${this.type} mat-elevation-z${this.elevation}`;
|
|
20
20
|
}
|
|
21
|
-
/** Whether
|
|
21
|
+
/** Whether to display an inline close button. */
|
|
22
22
|
get dismissible() {
|
|
23
23
|
return this._dismissible;
|
|
24
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mtxAlert.mjs","sources":["../../../projects/extensions/alert/alert.component.ts","../../../projects/extensions/alert/alert.component.html","../../../projects/extensions/alert/alert.module.ts","../../../projects/extensions/alert/mtxAlert.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n HostBinding,\n} from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\nexport type MtxAlertType = 'default' | 'info' | 'success' | 'warning' | 'danger';\n\n@Component({\n selector: 'mtx-alert',\n exportAs: 'mtxAlert',\n host: {\n '[class.mtx-alert]': 'true',\n '[class.mtx-alert-dismissible]': 'dismissible',\n 'role': 'alert',\n },\n templateUrl: './alert.component.html',\n styleUrls: ['./alert.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxAlertComponent {\n @HostBinding('class')\n get _hostClassList() {\n return `mtx-alert-${this.type} mat-elevation-z${this.elevation}`;\n }\n\n /** The alert type */\n @Input() type: MtxAlertType = 'default';\n\n /** Whether
|
|
1
|
+
{"version":3,"file":"mtxAlert.mjs","sources":["../../../projects/extensions/alert/alert.component.ts","../../../projects/extensions/alert/alert.component.html","../../../projects/extensions/alert/alert.module.ts","../../../projects/extensions/alert/mtxAlert.ts"],"sourcesContent":["import {\n Component,\n ChangeDetectionStrategy,\n ViewEncapsulation,\n Input,\n Output,\n EventEmitter,\n ChangeDetectorRef,\n HostBinding,\n} from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\n\nexport type MtxAlertType = 'default' | 'info' | 'success' | 'warning' | 'danger';\n\n@Component({\n selector: 'mtx-alert',\n exportAs: 'mtxAlert',\n host: {\n '[class.mtx-alert]': 'true',\n '[class.mtx-alert-dismissible]': 'dismissible',\n 'role': 'alert',\n },\n templateUrl: './alert.component.html',\n styleUrls: ['./alert.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class MtxAlertComponent {\n @HostBinding('class')\n get _hostClassList() {\n return `mtx-alert-${this.type} mat-elevation-z${this.elevation}`;\n }\n\n /** The alert's type. Can be `default`, `info`, `success`, `warning` or `danger`. */\n @Input() type: MtxAlertType = 'default';\n\n /** Whether to display an inline close button. */\n @Input()\n get dismissible(): boolean {\n return this._dismissible;\n }\n set dismissible(value: boolean) {\n this._dismissible = coerceBooleanProperty(value);\n }\n private _dismissible = false;\n\n /** The alert's elevation (0~24). */\n @Input() elevation = 0;\n\n /** Event emitted when the alert closed. */\n @Output() closed = new EventEmitter<MtxAlertComponent>();\n\n constructor(private _changeDetectorRef: ChangeDetectorRef) {}\n\n _onClosed(): void {\n this._changeDetectorRef.markForCheck();\n this.closed.emit(this);\n }\n\n static ngAcceptInputType_dismissible: BooleanInput;\n}\n","<ng-content></ng-content>\n<ng-template [ngIf]=\"dismissible\">\n <button type=\"button\" class=\"mtx-alert-close\" aria-label=\"Close\" (click)=\"_onClosed()\">\n <span aria-hidden=\"true\">×</span>\n </button>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { MtxAlertComponent } from './alert.component';\n\n@NgModule({\n imports: [CommonModule],\n exports: [MtxAlertComponent],\n declarations: [MtxAlertComponent],\n})\nexport class MtxAlertModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MA2Ba,iBAAiB,CAAA;AAyB5B,IAAA,WAAA,CAAoB,kBAAqC,EAAA;QAArC,IAAkB,CAAA,kBAAA,GAAlB,kBAAkB,CAAmB;;QAlBhD,IAAI,CAAA,IAAA,GAAiB,SAAS,CAAC;QAUhC,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;;QAGpB,IAAS,CAAA,SA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AO,EAAE,CAAC,YAAY,CAAC;oBACvB,OAAO,EAAE,CAAC,iBAAiB,CAAC;oBAC5B,YAAY,EAAE,CAAC,iBAAiB,CAAC;AAClC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -4,9 +4,9 @@ import * as i4$1 from '@angular/cdk/overlay';
|
|
|
4
4
|
import { Overlay, OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
5
5
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
6
6
|
import * as i2 from '@angular/common';
|
|
7
|
-
import { CommonModule } from '@angular/common';
|
|
7
|
+
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
8
8
|
import * as i0 from '@angular/core';
|
|
9
|
-
import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, Inject, InjectionToken, ViewChild, forwardRef, Directive, ContentChild, NgModule } from '@angular/core';
|
|
9
|
+
import { EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, Optional, Inject, InjectionToken, ViewChild, inject, forwardRef, Directive, ContentChild, NgModule } from '@angular/core';
|
|
10
10
|
import * as i4 from '@angular/material/button';
|
|
11
11
|
import { MatButtonModule } from '@angular/material/button';
|
|
12
12
|
import { ENTER, PAGE_DOWN, PAGE_UP, END, HOME, DOWN_ARROW, UP_ARROW, RIGHT_ARROW, LEFT_ARROW, ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
@@ -1584,6 +1584,7 @@ class MtxDatetimepicker {
|
|
|
1584
1584
|
this._scrollStrategy = _scrollStrategy;
|
|
1585
1585
|
this._dateAdapter = _dateAdapter;
|
|
1586
1586
|
this._dir = _dir;
|
|
1587
|
+
this._document = inject(DOCUMENT);
|
|
1587
1588
|
this._multiYearSelector = false;
|
|
1588
1589
|
this._twelvehour = false;
|
|
1589
1590
|
/** The view that the calendar should start in. */
|
|
@@ -1780,27 +1781,40 @@ class MtxDatetimepicker {
|
|
|
1780
1781
|
if (!this._opened) {
|
|
1781
1782
|
return;
|
|
1782
1783
|
}
|
|
1783
|
-
|
|
1784
|
-
this.
|
|
1785
|
-
|
|
1784
|
+
const canRestoreFocus = this._restoreFocus &&
|
|
1785
|
+
this._focusedElementBeforeOpen &&
|
|
1786
|
+
typeof this._focusedElementBeforeOpen.focus === 'function';
|
|
1786
1787
|
const completeClose = () => {
|
|
1787
1788
|
// The `_opened` could've been reset already if
|
|
1788
1789
|
// we got two events in quick succession.
|
|
1789
1790
|
if (this._opened) {
|
|
1790
1791
|
this._opened = false;
|
|
1791
1792
|
this.closedStream.emit();
|
|
1792
|
-
this._focusedElementBeforeOpen = null;
|
|
1793
1793
|
}
|
|
1794
1794
|
};
|
|
1795
|
-
if (this.
|
|
1796
|
-
this.
|
|
1797
|
-
|
|
1795
|
+
if (this._componentRef) {
|
|
1796
|
+
const { instance, location } = this._componentRef;
|
|
1797
|
+
instance._startExitAnimation();
|
|
1798
|
+
instance._animationDone.pipe(take(1)).subscribe(() => {
|
|
1799
|
+
const activeElement = this._document.activeElement;
|
|
1800
|
+
// Since we restore focus after the exit animation, we have to check that
|
|
1801
|
+
// the user didn't move focus themselves inside the `close` handler.
|
|
1802
|
+
if (canRestoreFocus &&
|
|
1803
|
+
(!activeElement ||
|
|
1804
|
+
activeElement === this._document.activeElement ||
|
|
1805
|
+
location.nativeElement.contains(activeElement))) {
|
|
1806
|
+
this._focusedElementBeforeOpen.focus();
|
|
1807
|
+
}
|
|
1808
|
+
this._focusedElementBeforeOpen = null;
|
|
1809
|
+
this._destroyOverlay();
|
|
1810
|
+
});
|
|
1811
|
+
}
|
|
1812
|
+
if (canRestoreFocus) {
|
|
1798
1813
|
// Because IE moves focus asynchronously, we can't count on it being restored before we've
|
|
1799
|
-
// marked the
|
|
1800
|
-
//
|
|
1801
|
-
//
|
|
1802
|
-
// the
|
|
1803
|
-
this._focusedElementBeforeOpen.focus();
|
|
1814
|
+
// marked the datepicker as closed. If the event fires out of sequence and the element that
|
|
1815
|
+
// we're refocusing opens the datepicker on focus, the user could be stuck with not being
|
|
1816
|
+
// able to close the calendar at all. We work around it by making the logic, that marks
|
|
1817
|
+
// the datepicker as closed, async as well.
|
|
1804
1818
|
setTimeout(completeClose);
|
|
1805
1819
|
}
|
|
1806
1820
|
else {
|