@angular/material 21.2.0-next.1 → 21.2.0-next.3
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/fesm2022/badge.mjs +9 -5
- package/fesm2022/badge.mjs.map +1 -1
- package/fesm2022/core.mjs +1 -1
- package/fesm2022/core.mjs.map +1 -1
- package/fesm2022/sidenav.mjs +1 -1
- package/fesm2022/sidenav.mjs.map +1 -1
- package/fesm2022/timepicker.mjs +20 -1
- package/fesm2022/timepicker.mjs.map +1 -1
- package/package.json +2 -2
- package/schematics/ng-add/index.js +1 -1
- package/types/_badge-chunk.d.ts +3 -2
- package/types/timepicker.d.ts +3 -1
package/fesm2022/badge.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AriaDescriber, _IdGenerator, InteractivityChecker, A11yModule } from '@angular/cdk/a11y';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, NgZone, ElementRef, Renderer2, DOCUMENT,
|
|
3
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, inject, NgZone, ElementRef, Renderer2, DOCUMENT, booleanAttribute, Directive, Input, NgModule } from '@angular/core';
|
|
4
4
|
import { _CdkPrivateStyleLoader, _VisuallyHiddenLoader } from '@angular/cdk/private';
|
|
5
5
|
import { _animationsDisabled } from './_animation-chunk.mjs';
|
|
6
6
|
import { BidiModule } from '@angular/cdk/bidi';
|
|
@@ -93,10 +93,6 @@ class MatBadge {
|
|
|
93
93
|
if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {
|
|
94
94
|
throw Error('matBadge must be attached to an element node.');
|
|
95
95
|
}
|
|
96
|
-
const tagName = inject(HOST_TAG_NAME);
|
|
97
|
-
if (tagName.toLowerCase() === 'mat-icon' && nativeElement.getAttribute('aria-hidden') === 'true') {
|
|
98
|
-
console.warn(`Detected a matBadge on an "aria-hidden" "<mat-icon>". ` + `Consider setting aria-hidden="false" in order to surface the information assistive technology.` + `\n${nativeElement.outerHTML}`);
|
|
99
|
-
}
|
|
100
96
|
}
|
|
101
97
|
}
|
|
102
98
|
isAbove() {
|
|
@@ -116,6 +112,14 @@ class MatBadge {
|
|
|
116
112
|
}
|
|
117
113
|
this._isInitialized = true;
|
|
118
114
|
}
|
|
115
|
+
ngAfterViewInit() {
|
|
116
|
+
if (typeof ngDevMode === 'undefined' || ngDevMode) {
|
|
117
|
+
const nativeElement = this._elementRef.nativeElement;
|
|
118
|
+
if (nativeElement.tagName.toLowerCase() === 'mat-icon' && nativeElement.getAttribute('aria-hidden') === 'true') {
|
|
119
|
+
console.warn(`Detected a matBadge on an "aria-hidden" "<mat-icon>". ` + `Consider setting aria-hidden="false" in order to surface the information assistive technology.` + `\n${nativeElement.outerHTML}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
119
123
|
ngOnDestroy() {
|
|
120
124
|
if (this._renderer.destroyNode) {
|
|
121
125
|
this._renderer.destroyNode(this._badgeElement);
|
package/fesm2022/badge.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"badge.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/badge/badge.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/badge/badge-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a11y';\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n HOST_TAG_NAME,\n DOCUMENT,\n} from '@angular/core';\nimport {_animationsDisabled, ThemePalette} from '../core';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private';\n\n/** Allowed position options for matBadgePosition */\nexport type MatBadgePosition =\n | 'above after'\n | 'above before'\n | 'below before'\n | 'below after'\n | 'before'\n | 'after'\n | 'above'\n | 'below';\n\n/** Allowed size options for matBadgeSize */\nexport type MatBadgeSize = 'small' | 'medium' | 'large';\n\nconst BADGE_CONTENT_CLASS = 'mat-badge-content';\n\n/**\n * Component used to load the structural styles of the badge.\n * @docs-private\n */\n@Component({\n styleUrl: 'badge.css',\n encapsulation: ViewEncapsulation.None,\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class _MatBadgeStyleLoader {}\n\n/** Directive to display a text badge. */\n@Directive({\n selector: '[matBadge]',\n host: {\n 'class': 'mat-badge',\n '[class.mat-badge-overlap]': 'overlap',\n '[class.mat-badge-above]': 'isAbove()',\n '[class.mat-badge-below]': '!isAbove()',\n '[class.mat-badge-before]': '!isAfter()',\n '[class.mat-badge-after]': 'isAfter()',\n '[class.mat-badge-small]': 'size === \"small\"',\n '[class.mat-badge-medium]': 'size === \"medium\"',\n '[class.mat-badge-large]': 'size === \"large\"',\n '[class.mat-badge-hidden]': 'hidden || !content',\n '[class.mat-badge-disabled]': 'disabled',\n },\n})\nexport class MatBadge implements OnInit, OnDestroy {\n private _ngZone = inject(NgZone);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ariaDescriber = inject(AriaDescriber);\n private _renderer = inject(Renderer2);\n private _animationsDisabled = _animationsDisabled();\n private _idGenerator = inject(_IdGenerator);\n\n /**\n * Theme color of the badge. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/badge/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input('matBadgeColor')\n get color(): ThemePalette {\n return this._color;\n }\n set color(value: ThemePalette) {\n this._setColor(value);\n this._color = value;\n }\n private _color: ThemePalette = 'primary';\n\n /** Whether the badge should overlap its contents or not */\n @Input({alias: 'matBadgeOverlap', transform: booleanAttribute}) overlap: boolean = true;\n\n /** Whether the badge is disabled. */\n @Input({alias: 'matBadgeDisabled', transform: booleanAttribute}) disabled: boolean = false;\n\n /**\n * Position the badge should reside.\n * Accepts any combination of 'above'|'below' and 'before'|'after'\n */\n @Input('matBadgePosition') position: MatBadgePosition = 'above after';\n\n /** The content for the badge */\n @Input('matBadge')\n get content(): string | number | undefined | null {\n return this._content;\n }\n set content(newContent: string | number | undefined | null) {\n this._updateRenderedContent(newContent);\n }\n private _content: string | number | undefined | null;\n\n /** Message used to describe the decorated element via aria-describedby */\n @Input('matBadgeDescription')\n get description(): string {\n return this._description;\n }\n set description(newDescription: string) {\n this._updateDescription(newDescription);\n }\n private _description!: string;\n\n /** Size of the badge. Can be 'small', 'medium', or 'large'. */\n @Input('matBadgeSize') size: MatBadgeSize = 'medium';\n\n /** Whether the badge is hidden. */\n @Input({alias: 'matBadgeHidden', transform: booleanAttribute}) hidden: boolean = false;\n\n /** Visible badge element. */\n private _badgeElement: HTMLElement | undefined;\n\n /** Inline badge description. Used when the badge is applied to non-interactive host elements. */\n private _inlineBadgeDescription: HTMLElement | undefined;\n\n /** Whether the OnInit lifecycle hook has run yet */\n private _isInitialized = false;\n\n /** InteractivityChecker to determine if the badge host is focusable. */\n private _interactivityChecker = inject(InteractivityChecker);\n\n private _document = inject(DOCUMENT);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_MatBadgeStyleLoader);\n styleLoader.load(_VisuallyHiddenLoader);\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = this._elementRef.nativeElement;\n\n if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {\n throw Error('matBadge must be attached to an element node.');\n }\n\n const tagName = inject(HOST_TAG_NAME);\n\n // Heads-up for developers to avoid putting matBadge on <mat-icon>\n // as it is aria-hidden by default docs mention this at:\n // https://material.angular.dev/components/badge/overview#accessibility\n if (\n tagName.toLowerCase() === 'mat-icon' &&\n nativeElement.getAttribute('aria-hidden') === 'true'\n ) {\n console.warn(\n `Detected a matBadge on an \"aria-hidden\" \"<mat-icon>\". ` +\n `Consider setting aria-hidden=\"false\" in order to surface the information assistive technology.` +\n `\\n${nativeElement.outerHTML}`,\n );\n }\n }\n }\n\n /** Whether the badge is above the host or not */\n isAbove(): boolean {\n return this.position.indexOf('below') === -1;\n }\n\n /** Whether the badge is after the host or not */\n isAfter(): boolean {\n return this.position.indexOf('before') === -1;\n }\n\n /**\n * Gets the element into which the badge's content is being rendered. Undefined if the element\n * hasn't been created (e.g. if the badge doesn't have content).\n */\n getBadgeElement(): HTMLElement | undefined {\n return this._badgeElement;\n }\n\n ngOnInit() {\n // We may have server-side rendered badge that we need to clear.\n // We need to do this in ngOnInit because the full content of the component\n // on which the badge is attached won't necessarily be in the DOM until this point.\n this._clearExistingBadges();\n\n if (this.content && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n this._updateRenderedContent(this.content);\n }\n\n this._isInitialized = true;\n }\n\n ngOnDestroy() {\n // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.\n // We have to destroy it ourselves, otherwise it'll be retained in memory.\n if (this._renderer.destroyNode) {\n this._renderer.destroyNode(this._badgeElement);\n this._inlineBadgeDescription?.remove();\n }\n\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n }\n\n /** Gets whether the badge's host element is interactive. */\n private _isHostInteractive(): boolean {\n // Ignore visibility since it requires an expensive style caluclation.\n return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {\n ignoreVisibility: true,\n });\n }\n\n /** Creates the badge element */\n private _createBadgeElement(): HTMLElement {\n const badgeElement = this._renderer.createElement('span');\n const activeClass = 'mat-badge-active';\n\n badgeElement.setAttribute('id', this._idGenerator.getId('mat-badge-content-'));\n\n // The badge is aria-hidden because we don't want it to appear in the page's navigation\n // flow. Instead, we use the badge to describe the decorated element with aria-describedby.\n badgeElement.setAttribute('aria-hidden', 'true');\n badgeElement.classList.add(BADGE_CONTENT_CLASS);\n\n if (this._animationsDisabled) {\n badgeElement.classList.add('_mat-animation-noopable');\n }\n\n this._elementRef.nativeElement.appendChild(badgeElement);\n\n // animate in after insertion\n if (typeof requestAnimationFrame === 'function' && !this._animationsDisabled) {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n badgeElement.classList.add(activeClass);\n });\n });\n } else {\n badgeElement.classList.add(activeClass);\n }\n\n return badgeElement;\n }\n\n /** Update the text content of the badge element in the DOM, creating the element if necessary. */\n private _updateRenderedContent(newContent: string | number | undefined | null): void {\n const newContentNormalized: string = `${newContent ?? ''}`.trim();\n\n // Don't create the badge element if the directive isn't initialized because we want to\n // append the badge element to the *end* of the host element's content for backwards\n // compatibility.\n if (this._isInitialized && newContentNormalized && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n }\n\n if (this._badgeElement) {\n this._badgeElement.textContent = newContentNormalized;\n }\n\n this._content = newContentNormalized;\n }\n\n /** Updates the host element's aria description via AriaDescriber. */\n private _updateDescription(newDescription: string): void {\n // Always start by removing the aria-describedby; we will add a new one if necessary.\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n\n // NOTE: We only check whether the host is interactive here, which happens during\n // when then badge content changes. It is possible that the host changes\n // interactivity status separate from one of these. However, watching the interactivity\n // status of the host would require a `MutationObserver`, which is likely more code + overhead\n // than it's worth; from usages inside Google, we see that the vats majority of badges either\n // never change interactivity, or also set `matBadgeHidden` based on the same condition.\n\n if (!newDescription || this._isHostInteractive()) {\n this._removeInlineDescription();\n }\n\n this._description = newDescription;\n\n // We don't add `aria-describedby` for non-interactive hosts elements because we\n // instead insert the description inline.\n if (this._isHostInteractive()) {\n this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);\n } else {\n this._updateInlineDescription();\n }\n }\n\n private _updateInlineDescription() {\n // Create the inline description element if it doesn't exist\n if (!this._inlineBadgeDescription) {\n this._inlineBadgeDescription = this._document.createElement('span');\n this._inlineBadgeDescription.classList.add('cdk-visually-hidden');\n }\n\n this._inlineBadgeDescription.textContent = this.description;\n this._badgeElement?.appendChild(this._inlineBadgeDescription);\n }\n\n private _removeInlineDescription() {\n this._inlineBadgeDescription?.remove();\n this._inlineBadgeDescription = undefined;\n }\n\n /** Adds css theme class given the color to the component host */\n private _setColor(colorPalette: ThemePalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-badge-${this._color}`);\n if (colorPalette) {\n classList.add(`mat-badge-${colorPalette}`);\n }\n }\n\n /** Clears any existing badges that might be left over from server-side rendering. */\n private _clearExistingBadges() {\n // Only check direct children of this host element in order to avoid deleting\n // any badges that might exist in descendant elements.\n const badges = this._elementRef.nativeElement.querySelectorAll(\n `:scope > .${BADGE_CONTENT_CLASS}`,\n );\n for (const badgeElement of Array.from(badges)) {\n if (badgeElement !== this._badgeElement) {\n badgeElement.remove();\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {MatBadge, _MatBadgeStyleLoader} from './badge';\n\n@NgModule({\n // Note: we _shouldn't_ have to import `_MatBadgeStyleLoader`,\n // but it seems to be necessary for tests.\n imports: [A11yModule, MatBadge, _MatBadgeStyleLoader],\n exports: [MatBadge, BidiModule],\n})\nexport class MatBadgeModule {}\n"],"names":["BADGE_CONTENT_CLASS","_MatBadgeStyleLoader","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","args","template","MatBadge","_ngZone","inject","NgZone","_elementRef","ElementRef","_ariaDescriber","AriaDescriber","_renderer","Renderer2","_animationsDisabled","_idGenerator","_IdGenerator","color","_color","value","_setColor","overlap","disabled","position","content","_content","newContent","_updateRenderedContent","description","_description","newDescription","_updateDescription","size","hidden","_badgeElement","_inlineBadgeDescription","_isInitialized","_interactivityChecker","InteractivityChecker","_document","DOCUMENT","constructor","styleLoader","_CdkPrivateStyleLoader","load","_VisuallyHiddenLoader","ngDevMode","nativeElement","nodeType","ELEMENT_NODE","Error","tagName","HOST_TAG_NAME","toLowerCase","getAttribute","console","warn","outerHTML","isAbove","indexOf","isAfter","getBadgeElement","ngOnInit","_clearExistingBadges","_createBadgeElement","ngOnDestroy","destroyNode","remove","removeDescription","_isHostInteractive","isFocusable","ignoreVisibility","badgeElement","createElement","activeClass","setAttribute","getId","classList","add","appendChild","requestAnimationFrame","runOutsideAngular","newContentNormalized","trim","textContent","_removeInlineDescription","describe","_updateInlineDescription","undefined","colorPalette","badges","querySelectorAll","Array","from","Directive","ɵdir","ɵɵngDeclareDirective","isStandalone","selector","inputs","booleanAttribute","host","properties","classAttribute","ngImport","Input","alias","transform","MatBadgeModule","NgModule","imports","A11yModule","exports","BidiModule"],"mappings":";;;;;;;;AA2CA,MAAMA,mBAAmB,GAAG,mBAAmB;MAYlCC,oBAAoB,CAAA;;;;;UAApBA,oBAAoB;AAAAC,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;AAApB,EAAA,OAAAC,IAAA,GAAAH,EAAA,CAAAI,oBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,QAAA;AAAAC,IAAAA,IAAA,EAAAV,oBAAoB;;;;cAHrB,EAAE;AAAAW,IAAAA,QAAA,EAAA,IAAA;IAAAC,MAAA,EAAA,CAAA,kyGAAA,CAAA;AAAAC,IAAAA,eAAA,EAAAV,EAAA,CAAAW,uBAAA,CAAAC,MAAA;AAAAC,IAAAA,aAAA,EAA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A,EAAA,CAAA;AAACwG,QAAAA,KAAK,EAAE,gBAAgB;AAAEC,QAAAA,SAAS,EAAEP;OAAiB;;;;;MCpHlDQ,cAAc,CAAA;;;;;UAAdA,cAAc;AAAA7H,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAA2H;AAAA,GAAA,CAAA;;;;;UAAdD,cAAc;AAAAE,IAAAA,OAAA,EAAA,CAHfC,UAAU,EAAE3G,QAAQ,EAAEtB,oBAAoB,CAAA;AAAAkI,IAAAA,OAAA,EAAA,CAC1C5G,QAAQ,EAAE6G,UAAU;AAAA,GAAA,CAAA;;;;;UAEnBL,cAAc;AAAAE,IAAAA,OAAA,EAAA,CAHfC,UAAU,EACAE,UAAU;AAAA,GAAA,CAAA;;;;;;QAEnBL,cAAc;AAAA3G,EAAAA,UAAA,EAAA,CAAA;UAN1B4G,QAAQ;AAAC3G,IAAAA,IAAA,EAAA,CAAA;AAGR4G,MAAAA,OAAO,EAAE,CAACC,UAAU,EAAE3G,QAAQ,EAAEtB,oBAAoB,CAAC;AACrDkI,MAAAA,OAAO,EAAE,CAAC5G,QAAQ,EAAE6G,UAAU;KAC/B;;;;;;"}
|
|
1
|
+
{"version":3,"file":"badge.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/badge/badge.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/badge/badge-module.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {_IdGenerator, AriaDescriber, InteractivityChecker} from '@angular/cdk/a11y';\n\nimport {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n Directive,\n ElementRef,\n inject,\n Input,\n NgZone,\n OnDestroy,\n OnInit,\n Renderer2,\n ViewEncapsulation,\n DOCUMENT,\n AfterViewInit,\n} from '@angular/core';\nimport {_animationsDisabled, ThemePalette} from '../core';\nimport {_CdkPrivateStyleLoader, _VisuallyHiddenLoader} from '@angular/cdk/private';\n\n/** Allowed position options for matBadgePosition */\nexport type MatBadgePosition =\n | 'above after'\n | 'above before'\n | 'below before'\n | 'below after'\n | 'before'\n | 'after'\n | 'above'\n | 'below';\n\n/** Allowed size options for matBadgeSize */\nexport type MatBadgeSize = 'small' | 'medium' | 'large';\n\nconst BADGE_CONTENT_CLASS = 'mat-badge-content';\n\n/**\n * Component used to load the structural styles of the badge.\n * @docs-private\n */\n@Component({\n styleUrl: 'badge.css',\n encapsulation: ViewEncapsulation.None,\n template: '',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class _MatBadgeStyleLoader {}\n\n/** Directive to display a text badge. */\n@Directive({\n selector: '[matBadge]',\n host: {\n 'class': 'mat-badge',\n '[class.mat-badge-overlap]': 'overlap',\n '[class.mat-badge-above]': 'isAbove()',\n '[class.mat-badge-below]': '!isAbove()',\n '[class.mat-badge-before]': '!isAfter()',\n '[class.mat-badge-after]': 'isAfter()',\n '[class.mat-badge-small]': 'size === \"small\"',\n '[class.mat-badge-medium]': 'size === \"medium\"',\n '[class.mat-badge-large]': 'size === \"large\"',\n '[class.mat-badge-hidden]': 'hidden || !content',\n '[class.mat-badge-disabled]': 'disabled',\n },\n})\nexport class MatBadge implements OnInit, AfterViewInit, OnDestroy {\n private _ngZone = inject(NgZone);\n private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private _ariaDescriber = inject(AriaDescriber);\n private _renderer = inject(Renderer2);\n private _animationsDisabled = _animationsDisabled();\n private _idGenerator = inject(_IdGenerator);\n\n /**\n * Theme color of the badge. This API is supported in M2 themes only, it\n * has no effect in M3 themes. For color customization in M3, see https://material.angular.dev/components/badge/styling.\n *\n * For information on applying color variants in M3, see\n * https://material.angular.dev/guide/material-2-theming#optional-add-backwards-compatibility-styles-for-color-variants\n */\n @Input('matBadgeColor')\n get color(): ThemePalette {\n return this._color;\n }\n set color(value: ThemePalette) {\n this._setColor(value);\n this._color = value;\n }\n private _color: ThemePalette = 'primary';\n\n /** Whether the badge should overlap its contents or not */\n @Input({alias: 'matBadgeOverlap', transform: booleanAttribute}) overlap: boolean = true;\n\n /** Whether the badge is disabled. */\n @Input({alias: 'matBadgeDisabled', transform: booleanAttribute}) disabled: boolean = false;\n\n /**\n * Position the badge should reside.\n * Accepts any combination of 'above'|'below' and 'before'|'after'\n */\n @Input('matBadgePosition') position: MatBadgePosition = 'above after';\n\n /** The content for the badge */\n @Input('matBadge')\n get content(): string | number | undefined | null {\n return this._content;\n }\n set content(newContent: string | number | undefined | null) {\n this._updateRenderedContent(newContent);\n }\n private _content: string | number | undefined | null;\n\n /** Message used to describe the decorated element via aria-describedby */\n @Input('matBadgeDescription')\n get description(): string {\n return this._description;\n }\n set description(newDescription: string) {\n this._updateDescription(newDescription);\n }\n private _description!: string;\n\n /** Size of the badge. Can be 'small', 'medium', or 'large'. */\n @Input('matBadgeSize') size: MatBadgeSize = 'medium';\n\n /** Whether the badge is hidden. */\n @Input({alias: 'matBadgeHidden', transform: booleanAttribute}) hidden: boolean = false;\n\n /** Visible badge element. */\n private _badgeElement: HTMLElement | undefined;\n\n /** Inline badge description. Used when the badge is applied to non-interactive host elements. */\n private _inlineBadgeDescription: HTMLElement | undefined;\n\n /** Whether the OnInit lifecycle hook has run yet */\n private _isInitialized = false;\n\n /** InteractivityChecker to determine if the badge host is focusable. */\n private _interactivityChecker = inject(InteractivityChecker);\n\n private _document = inject(DOCUMENT);\n\n constructor(...args: unknown[]);\n\n constructor() {\n const styleLoader = inject(_CdkPrivateStyleLoader);\n styleLoader.load(_MatBadgeStyleLoader);\n styleLoader.load(_VisuallyHiddenLoader);\n\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = this._elementRef.nativeElement;\n\n if (nativeElement.nodeType !== nativeElement.ELEMENT_NODE) {\n throw Error('matBadge must be attached to an element node.');\n }\n }\n }\n\n /** Whether the badge is above the host or not */\n isAbove(): boolean {\n return this.position.indexOf('below') === -1;\n }\n\n /** Whether the badge is after the host or not */\n isAfter(): boolean {\n return this.position.indexOf('before') === -1;\n }\n\n /**\n * Gets the element into which the badge's content is being rendered. Undefined if the element\n * hasn't been created (e.g. if the badge doesn't have content).\n */\n getBadgeElement(): HTMLElement | undefined {\n return this._badgeElement;\n }\n\n ngOnInit() {\n // We may have server-side rendered badge that we need to clear.\n // We need to do this in ngOnInit because the full content of the component\n // on which the badge is attached won't necessarily be in the DOM until this point.\n this._clearExistingBadges();\n\n if (this.content && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n this._updateRenderedContent(this.content);\n }\n\n this._isInitialized = true;\n }\n\n ngAfterViewInit() {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n const nativeElement = this._elementRef.nativeElement;\n\n // Heads-up for developers to avoid putting matBadge on <mat-icon>\n // as it is aria-hidden by default docs mention this at:\n // https://material.angular.dev/components/badge/overview#accessibility\n if (\n nativeElement.tagName.toLowerCase() === 'mat-icon' &&\n nativeElement.getAttribute('aria-hidden') === 'true'\n ) {\n console.warn(\n `Detected a matBadge on an \"aria-hidden\" \"<mat-icon>\". ` +\n `Consider setting aria-hidden=\"false\" in order to surface the information assistive technology.` +\n `\\n${nativeElement.outerHTML}`,\n );\n }\n }\n }\n\n ngOnDestroy() {\n // ViewEngine only: when creating a badge through the Renderer, Angular remembers its index.\n // We have to destroy it ourselves, otherwise it'll be retained in memory.\n if (this._renderer.destroyNode) {\n this._renderer.destroyNode(this._badgeElement);\n this._inlineBadgeDescription?.remove();\n }\n\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n }\n\n /** Gets whether the badge's host element is interactive. */\n private _isHostInteractive(): boolean {\n // Ignore visibility since it requires an expensive style caluclation.\n return this._interactivityChecker.isFocusable(this._elementRef.nativeElement, {\n ignoreVisibility: true,\n });\n }\n\n /** Creates the badge element */\n private _createBadgeElement(): HTMLElement {\n const badgeElement = this._renderer.createElement('span');\n const activeClass = 'mat-badge-active';\n\n badgeElement.setAttribute('id', this._idGenerator.getId('mat-badge-content-'));\n\n // The badge is aria-hidden because we don't want it to appear in the page's navigation\n // flow. Instead, we use the badge to describe the decorated element with aria-describedby.\n badgeElement.setAttribute('aria-hidden', 'true');\n badgeElement.classList.add(BADGE_CONTENT_CLASS);\n\n if (this._animationsDisabled) {\n badgeElement.classList.add('_mat-animation-noopable');\n }\n\n this._elementRef.nativeElement.appendChild(badgeElement);\n\n // animate in after insertion\n if (typeof requestAnimationFrame === 'function' && !this._animationsDisabled) {\n this._ngZone.runOutsideAngular(() => {\n requestAnimationFrame(() => {\n badgeElement.classList.add(activeClass);\n });\n });\n } else {\n badgeElement.classList.add(activeClass);\n }\n\n return badgeElement;\n }\n\n /** Update the text content of the badge element in the DOM, creating the element if necessary. */\n private _updateRenderedContent(newContent: string | number | undefined | null): void {\n const newContentNormalized: string = `${newContent ?? ''}`.trim();\n\n // Don't create the badge element if the directive isn't initialized because we want to\n // append the badge element to the *end* of the host element's content for backwards\n // compatibility.\n if (this._isInitialized && newContentNormalized && !this._badgeElement) {\n this._badgeElement = this._createBadgeElement();\n }\n\n if (this._badgeElement) {\n this._badgeElement.textContent = newContentNormalized;\n }\n\n this._content = newContentNormalized;\n }\n\n /** Updates the host element's aria description via AriaDescriber. */\n private _updateDescription(newDescription: string): void {\n // Always start by removing the aria-describedby; we will add a new one if necessary.\n this._ariaDescriber.removeDescription(this._elementRef.nativeElement, this.description);\n\n // NOTE: We only check whether the host is interactive here, which happens during\n // when then badge content changes. It is possible that the host changes\n // interactivity status separate from one of these. However, watching the interactivity\n // status of the host would require a `MutationObserver`, which is likely more code + overhead\n // than it's worth; from usages inside Google, we see that the vats majority of badges either\n // never change interactivity, or also set `matBadgeHidden` based on the same condition.\n\n if (!newDescription || this._isHostInteractive()) {\n this._removeInlineDescription();\n }\n\n this._description = newDescription;\n\n // We don't add `aria-describedby` for non-interactive hosts elements because we\n // instead insert the description inline.\n if (this._isHostInteractive()) {\n this._ariaDescriber.describe(this._elementRef.nativeElement, newDescription);\n } else {\n this._updateInlineDescription();\n }\n }\n\n private _updateInlineDescription() {\n // Create the inline description element if it doesn't exist\n if (!this._inlineBadgeDescription) {\n this._inlineBadgeDescription = this._document.createElement('span');\n this._inlineBadgeDescription.classList.add('cdk-visually-hidden');\n }\n\n this._inlineBadgeDescription.textContent = this.description;\n this._badgeElement?.appendChild(this._inlineBadgeDescription);\n }\n\n private _removeInlineDescription() {\n this._inlineBadgeDescription?.remove();\n this._inlineBadgeDescription = undefined;\n }\n\n /** Adds css theme class given the color to the component host */\n private _setColor(colorPalette: ThemePalette) {\n const classList = this._elementRef.nativeElement.classList;\n classList.remove(`mat-badge-${this._color}`);\n if (colorPalette) {\n classList.add(`mat-badge-${colorPalette}`);\n }\n }\n\n /** Clears any existing badges that might be left over from server-side rendering. */\n private _clearExistingBadges() {\n // Only check direct children of this host element in order to avoid deleting\n // any badges that might exist in descendant elements.\n const badges = this._elementRef.nativeElement.querySelectorAll(\n `:scope > .${BADGE_CONTENT_CLASS}`,\n );\n for (const badgeElement of Array.from(badges)) {\n if (badgeElement !== this._badgeElement) {\n badgeElement.remove();\n }\n }\n }\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule} from '@angular/core';\nimport {A11yModule} from '@angular/cdk/a11y';\nimport {BidiModule} from '@angular/cdk/bidi';\nimport {MatBadge, _MatBadgeStyleLoader} from './badge';\n\n@NgModule({\n // Note: we _shouldn't_ have to import `_MatBadgeStyleLoader`,\n // but it seems to be necessary for tests.\n imports: [A11yModule, MatBadge, _MatBadgeStyleLoader],\n exports: [MatBadge, BidiModule],\n})\nexport class MatBadgeModule {}\n"],"names":["BADGE_CONTENT_CLASS","_MatBadgeStyleLoader","deps","target","i0","ɵɵFactoryTarget","Component","ɵcmp","ɵɵngDeclareComponent","minVersion","version","type","isInline","styles","changeDetection","ChangeDetectionStrategy","OnPush","encapsulation","ViewEncapsulation","None","decorators","args","template","MatBadge","_ngZone","inject","NgZone","_elementRef","ElementRef","_ariaDescriber","AriaDescriber","_renderer","Renderer2","_animationsDisabled","_idGenerator","_IdGenerator","color","_color","value","_setColor","overlap","disabled","position","content","_content","newContent","_updateRenderedContent","description","_description","newDescription","_updateDescription","size","hidden","_badgeElement","_inlineBadgeDescription","_isInitialized","_interactivityChecker","InteractivityChecker","_document","DOCUMENT","constructor","styleLoader","_CdkPrivateStyleLoader","load","_VisuallyHiddenLoader","ngDevMode","nativeElement","nodeType","ELEMENT_NODE","Error","isAbove","indexOf","isAfter","getBadgeElement","ngOnInit","_clearExistingBadges","_createBadgeElement","ngAfterViewInit","tagName","toLowerCase","getAttribute","console","warn","outerHTML","ngOnDestroy","destroyNode","remove","removeDescription","_isHostInteractive","isFocusable","ignoreVisibility","badgeElement","createElement","activeClass","setAttribute","getId","classList","add","appendChild","requestAnimationFrame","runOutsideAngular","newContentNormalized","trim","textContent","_removeInlineDescription","describe","_updateInlineDescription","undefined","colorPalette","badges","querySelectorAll","Array","from","Directive","ɵdir","ɵɵngDeclareDirective","isStandalone","selector","inputs","booleanAttribute","host","properties","classAttribute","ngImport","Input","alias","transform","MatBadgeModule","NgModule","imports","A11yModule","exports","BidiModule"],"mappings":";;;;;;;;AA2CA,MAAMA,mBAAmB,GAAG,mBAAmB;MAYlCC,oBAAoB,CAAA;;;;;UAApBA,oBAAoB;AAAAC,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAAC;AAAA,GAAA,CAAA;AAApB,EAAA,OAAAC,IAAA,GAAAH,EAAA,CAAAI,oBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,QAAA;AAAAC,IAAAA,IAAA,EAAAV,oBAAoB;;;;cAHrB,EAAE;AAAAW,IAAAA,QAAA,EAA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,MAAAA,IAAA,EAAA,CAAA;AAACwG,QAAAA,KAAK,EAAE,kBAAkB;AAAEC,QAAAA,SAAS,EAAEP;OAAiB;;;YAM9DK,KAAK;aAAC,kBAAkB;;;YAGxBA,KAAK;aAAC,UAAU;;;YAUhBA,KAAK;aAAC,qBAAqB;;;YAU3BA,KAAK;aAAC,cAAc;;;YAGpBA,KAAK;AAACvG,MAAAA,IAAA,EAAA,CAAA;AAACwG,QAAAA,KAAK,EAAE,gBAAgB;AAAEC,QAAAA,SAAS,EAAEP;OAAiB;;;;;MCpHlDQ,cAAc,CAAA;;;;;UAAdA,cAAc;AAAA7H,IAAAA,IAAA,EAAA,EAAA;AAAAC,IAAAA,MAAA,EAAAC,EAAA,CAAAC,eAAA,CAAA2H;AAAA,GAAA,CAAA;;;;;UAAdD,cAAc;AAAAE,IAAAA,OAAA,EAAA,CAHfC,UAAU,EAAE3G,QAAQ,EAAEtB,oBAAoB,CAAA;AAAAkI,IAAAA,OAAA,EAAA,CAC1C5G,QAAQ,EAAE6G,UAAU;AAAA,GAAA,CAAA;;;;;UAEnBL,cAAc;AAAAE,IAAAA,OAAA,EAAA,CAHfC,UAAU,EACAE,UAAU;AAAA,GAAA,CAAA;;;;;;QAEnBL,cAAc;AAAA3G,EAAAA,UAAA,EAAA,CAAA;UAN1B4G,QAAQ;AAAC3G,IAAAA,IAAA,EAAA,CAAA;AAGR4G,MAAAA,OAAO,EAAE,CAACC,UAAU,EAAE3G,QAAQ,EAAEtB,oBAAoB,CAAC;AACrDkI,MAAAA,OAAO,EAAE,CAAC5G,QAAQ,EAAE6G,UAAU;KAC/B;;;;;;"}
|
package/fesm2022/core.mjs
CHANGED
|
@@ -24,7 +24,7 @@ import '@angular/cdk/private';
|
|
|
24
24
|
import '@angular/cdk/platform';
|
|
25
25
|
import '@angular/cdk/coercion';
|
|
26
26
|
|
|
27
|
-
const VERSION = new Version('21.2.0-next.
|
|
27
|
+
const VERSION = new Version('21.2.0-next.3');
|
|
28
28
|
|
|
29
29
|
const ISO_8601_REGEX = /^\d{4}-\d{2}-\d{2}(?:T\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|(?:(?:\+|-)\d{2}:\d{2}))?)?$/;
|
|
30
30
|
const TIME_REGEX = /^(\d?\d)[:.](\d?\d)(?:[:.](\d?\d))?\s*(AM|PM)?$/i;
|
package/fesm2022/core.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/version.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/datetime/native-date-adapter.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/datetime/native-date-formats.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/datetime/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of Angular Material. */\nexport const VERSION = new Version('21.2.0-next.1');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Injectable} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from './date-adapter';\n\n/**\n * Matches strings that have the form of a valid RFC 3339 string\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\n * because the regex will match strings with an out of bounds month, date, etc.\n */\nconst ISO_8601_REGEX =\n /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/;\n\n/**\n * Matches a time string. Supported formats:\n * - {{hours}}:{{minutes}}\n * - {{hours}}:{{minutes}}:{{seconds}}\n * - {{hours}}:{{minutes}} AM/PM\n * - {{hours}}:{{minutes}}:{{seconds}} AM/PM\n * - {{hours}}.{{minutes}}\n * - {{hours}}.{{minutes}}.{{seconds}}\n * - {{hours}}.{{minutes}} AM/PM\n * - {{hours}}.{{minutes}}.{{seconds}} AM/PM\n */\nconst TIME_REGEX = /^(\\d?\\d)[:.](\\d?\\d)(?:[:.](\\d?\\d))?\\s*(AM|PM)?$/i;\n\n/** Creates an array and fills it with values. */\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n/** Adapts the native JS Date for use with cdk-based components that work with dates. */\n@Injectable()\nexport class NativeDateAdapter extends DateAdapter<Date> {\n /** The injected locale. */\n private readonly _matDateLocale = inject(MAT_DATE_LOCALE, {optional: true});\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n\n const matDateLocale = inject(MAT_DATE_LOCALE, {optional: true});\n\n if (matDateLocale !== undefined) {\n this._matDateLocale = matDateLocale;\n }\n\n super.setLocale(this._matDateLocale);\n }\n\n getYear(date: Date): number {\n return date.getFullYear();\n }\n\n getMonth(date: Date): number {\n return date.getMonth();\n }\n\n getDate(date: Date): number {\n return date.getDate();\n }\n\n getDayOfWeek(date: Date): number {\n return date.getDay();\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {month: style, timeZone: 'utc'});\n return range(12, i => this._format(dtf, new Date(2017, i, 1)));\n }\n\n getDateNames(): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {day: 'numeric', timeZone: 'utc'});\n return range(31, i => this._format(dtf, new Date(2017, 0, i + 1)));\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {weekday: style, timeZone: 'utc'});\n return range(7, i => this._format(dtf, new Date(2017, 0, i + 1)));\n }\n\n getYearName(date: Date): string {\n const dtf = new Intl.DateTimeFormat(this.locale, {year: 'numeric', timeZone: 'utc'});\n return this._format(dtf, date);\n }\n\n getFirstDayOfWeek(): number {\n // At the time of writing `Intl.Locale` isn't available\n // in the internal types so we need to cast to `any`.\n if (typeof Intl !== 'undefined' && (Intl as any).Locale) {\n const locale = new (Intl as any).Locale(this.locale) as {\n getWeekInfo?: () => {firstDay: number};\n weekInfo?: {firstDay: number};\n };\n\n // Some browsers implement a `getWeekInfo` method while others have a `weekInfo` getter.\n // Note that this isn't supported in all browsers so we need to null check it.\n const firstDay = (locale.getWeekInfo?.() || locale.weekInfo)?.firstDay ?? 0;\n\n // `weekInfo.firstDay` is a number between 1 and 7 where, starting from Monday,\n // whereas our representation is 0 to 6 where 0 is Sunday so we need to normalize it.\n return firstDay === 7 ? 0 : firstDay;\n }\n\n // Default to Sunday if the browser doesn't provide the week information.\n return 0;\n }\n\n getNumDaysInMonth(date: Date): number {\n return this.getDate(\n this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0),\n );\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, date: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n\n let result = this._createDateWithOverflow(year, month, date);\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Date {\n return new Date();\n }\n\n parse(value: any, parseFormat?: any): Date | null {\n // We have no way using the native JS Date to set the parse format or locale, so we ignore these\n // parameters.\n if (typeof value == 'number') {\n return new Date(value);\n }\n return value ? new Date(Date.parse(value)) : null;\n }\n\n format(date: Date, displayFormat: Object): string {\n if (!this.isValid(date)) {\n throw Error('NativeDateAdapter: Cannot format invalid date.');\n }\n\n const dtf = new Intl.DateTimeFormat(this.locale, {...displayFormat, timeZone: 'utc'});\n return this._format(dtf, date);\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return this.addCalendarMonths(date, years * 12);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n let newDate = this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date) + months,\n this.getDate(date),\n );\n\n // It's possible to wind up in the wrong month if the original month has more days than the new\n // month. In this case we want to go to the last day of the desired month.\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\n // guarantee this.\n if (this.getMonth(newDate) != (((this.getMonth(date) + months) % 12) + 12) % 12) {\n newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);\n }\n\n return newDate;\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date) + days,\n );\n }\n\n toIso8601(date: Date): string {\n return [\n date.getUTCFullYear(),\n this._2digit(date.getUTCMonth() + 1),\n this._2digit(date.getUTCDate()),\n ].join('-');\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n override deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any) {\n return obj instanceof Date;\n }\n\n isValid(date: Date) {\n return !isNaN(date.getTime());\n }\n\n invalid(): Date {\n return new Date(NaN);\n }\n\n override setTime(target: Date, hours: number, minutes: number, seconds: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!inRange(hours, 0, 23)) {\n throw Error(`Invalid hours \"${hours}\". Hours value must be between 0 and 23.`);\n }\n\n if (!inRange(minutes, 0, 59)) {\n throw Error(`Invalid minutes \"${minutes}\". Minutes value must be between 0 and 59.`);\n }\n\n if (!inRange(seconds, 0, 59)) {\n throw Error(`Invalid seconds \"${seconds}\". Seconds value must be between 0 and 59.`);\n }\n }\n\n const clone = this.clone(target);\n clone.setHours(hours, minutes, seconds, 0);\n return clone;\n }\n\n override getHours(date: Date): number {\n return date.getHours();\n }\n\n override getMinutes(date: Date): number {\n return date.getMinutes();\n }\n\n override getSeconds(date: Date): number {\n return date.getSeconds();\n }\n\n override parseTime(userValue: any, parseFormat?: any): Date | null {\n if (typeof userValue !== 'string') {\n return userValue instanceof Date ? new Date(userValue.getTime()) : null;\n }\n\n const value = userValue.trim();\n\n if (value.length === 0) {\n return null;\n }\n\n // Attempt to parse the value directly.\n let result = this._parseTimeString(value);\n\n // Some locales add extra characters around the time, but are otherwise parseable\n // (e.g. `00:05 ч.` in bg-BG). Try replacing all non-number and non-colon characters.\n if (result === null) {\n const withoutExtras = value.replace(/[^0-9:(AM|PM)]/gi, '').trim();\n\n if (withoutExtras.length > 0) {\n result = this._parseTimeString(withoutExtras);\n }\n }\n\n return result || this.invalid();\n }\n\n override addSeconds(date: Date, amount: number): Date {\n return new Date(date.getTime() + amount * 1000);\n }\n\n /** Creates a date but allows the month and date to overflow. */\n private _createDateWithOverflow(year: number, month: number, date: number) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const d = new Date();\n d.setFullYear(year, month, date);\n d.setHours(0, 0, 0, 0);\n return d;\n }\n\n /**\n * Pads a number to make it two digits.\n * @param n The number to pad.\n * @returns The padded number.\n */\n private _2digit(n: number) {\n return ('00' + n).slice(-2);\n }\n\n /**\n * When converting Date object to string, javascript built-in functions may return wrong\n * results because it applies its internal DST rules. The DST rules around the world change\n * very frequently, and the current valid rule is not always valid in previous years though.\n * We work around this problem building a new Date object which has its internal UTC\n * representation with the local date and time.\n * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have\n * timeZone set to 'utc' to work fine.\n * @param date Date from which we want to get the string representation according to dtf\n * @returns A Date object with its UTC representation based on the passed in date info\n */\n private _format(dtf: Intl.DateTimeFormat, date: Date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }\n\n /**\n * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.\n * @param value Time string to parse.\n */\n private _parseTimeString(value: string): Date | null {\n // Note: we can technically rely on the browser for the time parsing by generating\n // an ISO string and appending the string to the end of it. We don't do it, because\n // browsers aren't consistent in what they support. Some examples:\n // - Safari doesn't support AM/PM.\n // - Firefox produces a valid date object if the time string has overflows (e.g. 12:75) while\n // other browsers produce an invalid date.\n // - Safari doesn't allow padded numbers.\n const parsed = value.toUpperCase().match(TIME_REGEX);\n\n if (parsed) {\n let hours = parseInt(parsed[1]);\n const minutes = parseInt(parsed[2]);\n let seconds: number | undefined = parsed[3] == null ? undefined : parseInt(parsed[3]);\n const amPm = parsed[4] as 'AM' | 'PM' | undefined;\n\n if (hours === 12) {\n hours = amPm === 'AM' ? 0 : hours;\n } else if (amPm === 'PM') {\n hours += 12;\n }\n\n if (\n inRange(hours, 0, 23) &&\n inRange(minutes, 0, 59) &&\n (seconds == null || inRange(seconds, 0, 59))\n ) {\n return this.setTime(this.today(), hours, minutes, seconds || 0);\n }\n }\n\n return null;\n }\n}\n\n/** Checks whether a number is within a certain range. */\nfunction inRange(value: number, min: number, max: number): boolean {\n return !isNaN(value) && value >= min && value <= max;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {MatDateFormats} from './date-formats';\n\nexport const MAT_NATIVE_DATE_FORMATS: MatDateFormats = {\n parse: {\n dateInput: null,\n timeInput: null,\n },\n display: {\n dateInput: {year: 'numeric', month: 'numeric', day: 'numeric'},\n timeInput: {hour: 'numeric', minute: 'numeric'},\n monthYearLabel: {year: 'numeric', month: 'short'},\n dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},\n monthYearA11yLabel: {year: 'numeric', month: 'long'},\n timeOptionLabel: {hour: 'numeric', minute: 'numeric'},\n },\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule, Provider} from '@angular/core';\nimport {DateAdapter} from './date-adapter';\nimport {MAT_DATE_FORMATS, MatDateFormats} from './date-formats';\nimport {NativeDateAdapter} from './native-date-adapter';\nimport {MAT_NATIVE_DATE_FORMATS} from './native-date-formats';\n\nexport * from './date-adapter';\nexport * from './date-formats';\nexport * from './native-date-adapter';\nexport * from './native-date-formats';\n\n@NgModule({\n providers: [{provide: DateAdapter, useClass: NativeDateAdapter}],\n})\nexport class NativeDateModule {}\n\n@NgModule({\n providers: [provideNativeDateAdapter()],\n})\nexport class MatNativeDateModule {}\n\nexport function provideNativeDateAdapter(\n formats: MatDateFormats = MAT_NATIVE_DATE_FORMATS,\n): Provider[] {\n return [\n {provide: DateAdapter, useClass: NativeDateAdapter},\n {provide: MAT_DATE_FORMATS, useValue: formats},\n ];\n}\n"],"names":["VERSION","Version","ISO_8601_REGEX","TIME_REGEX","range","length","valueFunction","valuesArray","Array","i","NativeDateAdapter","DateAdapter","_matDateLocale","inject","MAT_DATE_LOCALE","optional","constructor","matDateLocale","undefined","setLocale","getYear","date","getFullYear","getMonth","getDate","getDayOfWeek","getDay","getMonthNames","style","dtf","Intl","DateTimeFormat","locale","month","timeZone","_format","Date","getDateNames","day","getDayOfWeekNames","weekday","getYearName","year","getFirstDayOfWeek","Locale","firstDay","getWeekInfo","weekInfo","getNumDaysInMonth","_createDateWithOverflow","clone","getTime","createDate","ngDevMode","Error","result","today","parse","value","parseFormat","format","displayFormat","isValid","addCalendarYears","years","addCalendarMonths","months","newDate","addCalendarDays","days","toIso8601","getUTCFullYear","_2digit","getUTCMonth","getUTCDate","join","deserialize","test","isDateInstance","obj","isNaN","invalid","NaN","setTime","target","hours","minutes","seconds","inRange","setHours","getHours","getMinutes","getSeconds","parseTime","userValue","trim","_parseTimeString","withoutExtras","replace","addSeconds","amount","d","setFullYear","n","slice","setUTCFullYear","setUTCHours","getMilliseconds","parsed","toUpperCase","match","parseInt","amPm","deps","i0","ɵɵFactoryTarget","Injectable","decorators","min","max","MAT_NATIVE_DATE_FORMATS","dateInput","timeInput","display","hour","minute","monthYearLabel","dateA11yLabel","monthYearA11yLabel","timeOptionLabel","NativeDateModule","NgModule","providers","provide","useClass","args","MatNativeDateModule","ɵinj","ɵɵngDeclareInjector","minVersion","version","ngImport","type","provideNativeDateAdapter","formats","MAT_DATE_FORMATS","useValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;ACKtD,MAAMC,cAAc,GAClB,oFAAoF;AAatF,MAAMC,UAAU,GAAG,kDAAkD;AAGrE,SAASC,KAAKA,CAAIC,MAAc,EAAEC,aAAmC,EAAA;AACnE,EAAA,MAAMC,WAAW,GAAGC,KAAK,CAACH,MAAM,CAAC;EACjC,KAAK,IAAII,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGJ,MAAM,EAAEI,CAAC,EAAE,EAAE;AAC/BF,IAAAA,WAAW,CAACE,CAAC,CAAC,GAAGH,aAAa,CAACG,CAAC,CAAC;AACnC;AACA,EAAA,OAAOF,WAAW;AACpB;AAIM,MAAOG,iBAAkB,SAAQC,WAAiB,CAAA;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A,QAAA;AAAAC,IAAAA,OAAA,EAAA,QAAA;AAAAC,IAAAA,QAAA,EAAA3B,EAAA;AAAA4B,IAAAA,IAAA,EAAAN,mBAAmB;AAFnBJ,IAAAA,SAAA,EAAA,CAACW,wBAAwB,EAAE;AAAC,GAAA,CAAA;;;;;;QAE5BP,mBAAmB;AAAAnB,EAAAA,UAAA,EAAA,CAAA;UAH/Bc,QAAQ;AAACI,IAAAA,IAAA,EAAA,CAAA;AACRH,MAAAA,SAAS,EAAE,CAACW,wBAAwB,EAAE;KACvC;;;AAGe,SAAAA,wBAAwBA,CACtCC,OAAA,GAA0BxB,uBAAuB,EAAA;AAEjD,EAAA,OAAO,CACL;AAACa,IAAAA,OAAO,EAAE1H,WAAW;AAAE2H,IAAAA,QAAQ,EAAE5H;AAAkB,GAAA,EACnD;AAAC2H,IAAAA,OAAO,EAAEY,gBAAgB;AAAEC,IAAAA,QAAQ,EAAEF;AAAQ,GAAA,CAC/C;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"core.mjs","sources":["../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/version.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/datetime/native-date-adapter.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/datetime/native-date-formats.ts","../../../../../darwin_arm64-fastbuild-ST-fdfa778d11ba/bin/src/material/core/datetime/index.ts"],"sourcesContent":["/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {Version} from '@angular/core';\n\n/** Current version of Angular Material. */\nexport const VERSION = new Version('21.2.0-next.3');\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {inject, Injectable} from '@angular/core';\nimport {DateAdapter, MAT_DATE_LOCALE} from './date-adapter';\n\n/**\n * Matches strings that have the form of a valid RFC 3339 string\n * (https://tools.ietf.org/html/rfc3339). Note that the string may not actually be a valid date\n * because the regex will match strings with an out of bounds month, date, etc.\n */\nconst ISO_8601_REGEX =\n /^\\d{4}-\\d{2}-\\d{2}(?:T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?(?:Z|(?:(?:\\+|-)\\d{2}:\\d{2}))?)?$/;\n\n/**\n * Matches a time string. Supported formats:\n * - {{hours}}:{{minutes}}\n * - {{hours}}:{{minutes}}:{{seconds}}\n * - {{hours}}:{{minutes}} AM/PM\n * - {{hours}}:{{minutes}}:{{seconds}} AM/PM\n * - {{hours}}.{{minutes}}\n * - {{hours}}.{{minutes}}.{{seconds}}\n * - {{hours}}.{{minutes}} AM/PM\n * - {{hours}}.{{minutes}}.{{seconds}} AM/PM\n */\nconst TIME_REGEX = /^(\\d?\\d)[:.](\\d?\\d)(?:[:.](\\d?\\d))?\\s*(AM|PM)?$/i;\n\n/** Creates an array and fills it with values. */\nfunction range<T>(length: number, valueFunction: (index: number) => T): T[] {\n const valuesArray = Array(length);\n for (let i = 0; i < length; i++) {\n valuesArray[i] = valueFunction(i);\n }\n return valuesArray;\n}\n\n/** Adapts the native JS Date for use with cdk-based components that work with dates. */\n@Injectable()\nexport class NativeDateAdapter extends DateAdapter<Date> {\n /** The injected locale. */\n private readonly _matDateLocale = inject(MAT_DATE_LOCALE, {optional: true});\n\n constructor(...args: unknown[]);\n\n constructor() {\n super();\n\n const matDateLocale = inject(MAT_DATE_LOCALE, {optional: true});\n\n if (matDateLocale !== undefined) {\n this._matDateLocale = matDateLocale;\n }\n\n super.setLocale(this._matDateLocale);\n }\n\n getYear(date: Date): number {\n return date.getFullYear();\n }\n\n getMonth(date: Date): number {\n return date.getMonth();\n }\n\n getDate(date: Date): number {\n return date.getDate();\n }\n\n getDayOfWeek(date: Date): number {\n return date.getDay();\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {month: style, timeZone: 'utc'});\n return range(12, i => this._format(dtf, new Date(2017, i, 1)));\n }\n\n getDateNames(): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {day: 'numeric', timeZone: 'utc'});\n return range(31, i => this._format(dtf, new Date(2017, 0, i + 1)));\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n const dtf = new Intl.DateTimeFormat(this.locale, {weekday: style, timeZone: 'utc'});\n return range(7, i => this._format(dtf, new Date(2017, 0, i + 1)));\n }\n\n getYearName(date: Date): string {\n const dtf = new Intl.DateTimeFormat(this.locale, {year: 'numeric', timeZone: 'utc'});\n return this._format(dtf, date);\n }\n\n getFirstDayOfWeek(): number {\n // At the time of writing `Intl.Locale` isn't available\n // in the internal types so we need to cast to `any`.\n if (typeof Intl !== 'undefined' && (Intl as any).Locale) {\n const locale = new (Intl as any).Locale(this.locale) as {\n getWeekInfo?: () => {firstDay: number};\n weekInfo?: {firstDay: number};\n };\n\n // Some browsers implement a `getWeekInfo` method while others have a `weekInfo` getter.\n // Note that this isn't supported in all browsers so we need to null check it.\n const firstDay = (locale.getWeekInfo?.() || locale.weekInfo)?.firstDay ?? 0;\n\n // `weekInfo.firstDay` is a number between 1 and 7 where, starting from Monday,\n // whereas our representation is 0 to 6 where 0 is Sunday so we need to normalize it.\n return firstDay === 7 ? 0 : firstDay;\n }\n\n // Default to Sunday if the browser doesn't provide the week information.\n return 0;\n }\n\n getNumDaysInMonth(date: Date): number {\n return this.getDate(\n this._createDateWithOverflow(this.getYear(date), this.getMonth(date) + 1, 0),\n );\n }\n\n clone(date: Date): Date {\n return new Date(date.getTime());\n }\n\n createDate(year: number, month: number, date: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n // Check for invalid month and date (except upper bound on date which we have to check after\n // creating the Date).\n if (month < 0 || month > 11) {\n throw Error(`Invalid month index \"${month}\". Month index has to be between 0 and 11.`);\n }\n\n if (date < 1) {\n throw Error(`Invalid date \"${date}\". Date has to be greater than 0.`);\n }\n }\n\n let result = this._createDateWithOverflow(year, month, date);\n // Check that the date wasn't above the upper bound for the month, causing the month to overflow\n if (result.getMonth() != month && (typeof ngDevMode === 'undefined' || ngDevMode)) {\n throw Error(`Invalid date \"${date}\" for month with index \"${month}\".`);\n }\n\n return result;\n }\n\n today(): Date {\n return new Date();\n }\n\n parse(value: any, parseFormat?: any): Date | null {\n // We have no way using the native JS Date to set the parse format or locale, so we ignore these\n // parameters.\n if (typeof value == 'number') {\n return new Date(value);\n }\n return value ? new Date(Date.parse(value)) : null;\n }\n\n format(date: Date, displayFormat: Object): string {\n if (!this.isValid(date)) {\n throw Error('NativeDateAdapter: Cannot format invalid date.');\n }\n\n const dtf = new Intl.DateTimeFormat(this.locale, {...displayFormat, timeZone: 'utc'});\n return this._format(dtf, date);\n }\n\n addCalendarYears(date: Date, years: number): Date {\n return this.addCalendarMonths(date, years * 12);\n }\n\n addCalendarMonths(date: Date, months: number): Date {\n let newDate = this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date) + months,\n this.getDate(date),\n );\n\n // It's possible to wind up in the wrong month if the original month has more days than the new\n // month. In this case we want to go to the last day of the desired month.\n // Note: the additional + 12 % 12 ensures we end up with a positive number, since JS % doesn't\n // guarantee this.\n if (this.getMonth(newDate) != (((this.getMonth(date) + months) % 12) + 12) % 12) {\n newDate = this._createDateWithOverflow(this.getYear(newDate), this.getMonth(newDate), 0);\n }\n\n return newDate;\n }\n\n addCalendarDays(date: Date, days: number): Date {\n return this._createDateWithOverflow(\n this.getYear(date),\n this.getMonth(date),\n this.getDate(date) + days,\n );\n }\n\n toIso8601(date: Date): string {\n return [\n date.getUTCFullYear(),\n this._2digit(date.getUTCMonth() + 1),\n this._2digit(date.getUTCDate()),\n ].join('-');\n }\n\n /**\n * Returns the given value if given a valid Date or null. Deserializes valid ISO 8601 strings\n * (https://www.ietf.org/rfc/rfc3339.txt) into valid Dates and empty string into null. Returns an\n * invalid date for all other values.\n */\n override deserialize(value: any): Date | null {\n if (typeof value === 'string') {\n if (!value) {\n return null;\n }\n // The `Date` constructor accepts formats other than ISO 8601, so we need to make sure the\n // string is the right format first.\n if (ISO_8601_REGEX.test(value)) {\n let date = new Date(value);\n if (this.isValid(date)) {\n return date;\n }\n }\n }\n return super.deserialize(value);\n }\n\n isDateInstance(obj: any) {\n return obj instanceof Date;\n }\n\n isValid(date: Date) {\n return !isNaN(date.getTime());\n }\n\n invalid(): Date {\n return new Date(NaN);\n }\n\n override setTime(target: Date, hours: number, minutes: number, seconds: number): Date {\n if (typeof ngDevMode === 'undefined' || ngDevMode) {\n if (!inRange(hours, 0, 23)) {\n throw Error(`Invalid hours \"${hours}\". Hours value must be between 0 and 23.`);\n }\n\n if (!inRange(minutes, 0, 59)) {\n throw Error(`Invalid minutes \"${minutes}\". Minutes value must be between 0 and 59.`);\n }\n\n if (!inRange(seconds, 0, 59)) {\n throw Error(`Invalid seconds \"${seconds}\". Seconds value must be between 0 and 59.`);\n }\n }\n\n const clone = this.clone(target);\n clone.setHours(hours, minutes, seconds, 0);\n return clone;\n }\n\n override getHours(date: Date): number {\n return date.getHours();\n }\n\n override getMinutes(date: Date): number {\n return date.getMinutes();\n }\n\n override getSeconds(date: Date): number {\n return date.getSeconds();\n }\n\n override parseTime(userValue: any, parseFormat?: any): Date | null {\n if (typeof userValue !== 'string') {\n return userValue instanceof Date ? new Date(userValue.getTime()) : null;\n }\n\n const value = userValue.trim();\n\n if (value.length === 0) {\n return null;\n }\n\n // Attempt to parse the value directly.\n let result = this._parseTimeString(value);\n\n // Some locales add extra characters around the time, but are otherwise parseable\n // (e.g. `00:05 ч.` in bg-BG). Try replacing all non-number and non-colon characters.\n if (result === null) {\n const withoutExtras = value.replace(/[^0-9:(AM|PM)]/gi, '').trim();\n\n if (withoutExtras.length > 0) {\n result = this._parseTimeString(withoutExtras);\n }\n }\n\n return result || this.invalid();\n }\n\n override addSeconds(date: Date, amount: number): Date {\n return new Date(date.getTime() + amount * 1000);\n }\n\n /** Creates a date but allows the month and date to overflow. */\n private _createDateWithOverflow(year: number, month: number, date: number) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setFullYear` and `setHours` instead.\n const d = new Date();\n d.setFullYear(year, month, date);\n d.setHours(0, 0, 0, 0);\n return d;\n }\n\n /**\n * Pads a number to make it two digits.\n * @param n The number to pad.\n * @returns The padded number.\n */\n private _2digit(n: number) {\n return ('00' + n).slice(-2);\n }\n\n /**\n * When converting Date object to string, javascript built-in functions may return wrong\n * results because it applies its internal DST rules. The DST rules around the world change\n * very frequently, and the current valid rule is not always valid in previous years though.\n * We work around this problem building a new Date object which has its internal UTC\n * representation with the local date and time.\n * @param dtf Intl.DateTimeFormat object, containing the desired string format. It must have\n * timeZone set to 'utc' to work fine.\n * @param date Date from which we want to get the string representation according to dtf\n * @returns A Date object with its UTC representation based on the passed in date info\n */\n private _format(dtf: Intl.DateTimeFormat, date: Date) {\n // Passing the year to the constructor causes year numbers <100 to be converted to 19xx.\n // To work around this we use `setUTCFullYear` and `setUTCHours` instead.\n const d = new Date();\n d.setUTCFullYear(date.getFullYear(), date.getMonth(), date.getDate());\n d.setUTCHours(date.getHours(), date.getMinutes(), date.getSeconds(), date.getMilliseconds());\n return dtf.format(d);\n }\n\n /**\n * Attempts to parse a time string into a date object. Returns null if it cannot be parsed.\n * @param value Time string to parse.\n */\n private _parseTimeString(value: string): Date | null {\n // Note: we can technically rely on the browser for the time parsing by generating\n // an ISO string and appending the string to the end of it. We don't do it, because\n // browsers aren't consistent in what they support. Some examples:\n // - Safari doesn't support AM/PM.\n // - Firefox produces a valid date object if the time string has overflows (e.g. 12:75) while\n // other browsers produce an invalid date.\n // - Safari doesn't allow padded numbers.\n const parsed = value.toUpperCase().match(TIME_REGEX);\n\n if (parsed) {\n let hours = parseInt(parsed[1]);\n const minutes = parseInt(parsed[2]);\n let seconds: number | undefined = parsed[3] == null ? undefined : parseInt(parsed[3]);\n const amPm = parsed[4] as 'AM' | 'PM' | undefined;\n\n if (hours === 12) {\n hours = amPm === 'AM' ? 0 : hours;\n } else if (amPm === 'PM') {\n hours += 12;\n }\n\n if (\n inRange(hours, 0, 23) &&\n inRange(minutes, 0, 59) &&\n (seconds == null || inRange(seconds, 0, 59))\n ) {\n return this.setTime(this.today(), hours, minutes, seconds || 0);\n }\n }\n\n return null;\n }\n}\n\n/** Checks whether a number is within a certain range. */\nfunction inRange(value: number, min: number, max: number): boolean {\n return !isNaN(value) && value >= min && value <= max;\n}\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {MatDateFormats} from './date-formats';\n\nexport const MAT_NATIVE_DATE_FORMATS: MatDateFormats = {\n parse: {\n dateInput: null,\n timeInput: null,\n },\n display: {\n dateInput: {year: 'numeric', month: 'numeric', day: 'numeric'},\n timeInput: {hour: 'numeric', minute: 'numeric'},\n monthYearLabel: {year: 'numeric', month: 'short'},\n dateA11yLabel: {year: 'numeric', month: 'long', day: 'numeric'},\n monthYearA11yLabel: {year: 'numeric', month: 'long'},\n timeOptionLabel: {hour: 'numeric', minute: 'numeric'},\n },\n};\n","/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.dev/license\n */\n\nimport {NgModule, Provider} from '@angular/core';\nimport {DateAdapter} from './date-adapter';\nimport {MAT_DATE_FORMATS, MatDateFormats} from './date-formats';\nimport {NativeDateAdapter} from './native-date-adapter';\nimport {MAT_NATIVE_DATE_FORMATS} from './native-date-formats';\n\nexport * from './date-adapter';\nexport * from './date-formats';\nexport * from './native-date-adapter';\nexport * from './native-date-formats';\n\n@NgModule({\n providers: [{provide: DateAdapter, useClass: NativeDateAdapter}],\n})\nexport class NativeDateModule {}\n\n@NgModule({\n providers: [provideNativeDateAdapter()],\n})\nexport class MatNativeDateModule {}\n\nexport function provideNativeDateAdapter(\n formats: MatDateFormats = MAT_NATIVE_DATE_FORMATS,\n): Provider[] {\n return [\n {provide: DateAdapter, useClass: NativeDateAdapter},\n {provide: MAT_DATE_FORMATS, useValue: formats},\n ];\n}\n"],"names":["VERSION","Version","ISO_8601_REGEX","TIME_REGEX","range","length","valueFunction","valuesArray","Array","i","NativeDateAdapter","DateAdapter","_matDateLocale","inject","MAT_DATE_LOCALE","optional","constructor","matDateLocale","undefined","setLocale","getYear","date","getFullYear","getMonth","getDate","getDayOfWeek","getDay","getMonthNames","style","dtf","Intl","DateTimeFormat","locale","month","timeZone","_format","Date","getDateNames","day","getDayOfWeekNames","weekday","getYearName","year","getFirstDayOfWeek","Locale","firstDay","getWeekInfo","weekInfo","getNumDaysInMonth","_createDateWithOverflow","clone","getTime","createDate","ngDevMode","Error","result","today","parse","value","parseFormat","format","displayFormat","isValid","addCalendarYears","years","addCalendarMonths","months","newDate","addCalendarDays","days","toIso8601","getUTCFullYear","_2digit","getUTCMonth","getUTCDate","join","deserialize","test","isDateInstance","obj","isNaN","invalid","NaN","setTime","target","hours","minutes","seconds","inRange","setHours","getHours","getMinutes","getSeconds","parseTime","userValue","trim","_parseTimeString","withoutExtras","replace","addSeconds","amount","d","setFullYear","n","slice","setUTCFullYear","setUTCHours","getMilliseconds","parsed","toUpperCase","match","parseInt","amPm","deps","i0","ɵɵFactoryTarget","Injectable","decorators","min","max","MAT_NATIVE_DATE_FORMATS","dateInput","timeInput","display","hour","minute","monthYearLabel","dateA11yLabel","monthYearA11yLabel","timeOptionLabel","NativeDateModule","NgModule","providers","provide","useClass","args","MatNativeDateModule","ɵinj","ɵɵngDeclareInjector","minVersion","version","ngImport","type","provideNativeDateAdapter","formats","MAT_DATE_FORMATS","useValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;MAWaA,OAAO,GAAG,IAAIC,OAAO,CAAC,mBAAmB;;ACKtD,MAAMC,cAAc,GAClB,oFAAoF;AAatF,MAAMC,UAAU,GAAG,kDAAkD;AA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AAAA,OAAO,EAAE1H,WAAW;AAAE2H,QAAAA,QAAQ,EAAE5H;OAAkB;KAChE;;;MAMY8H,mBAAmB,CAAA;;;;;UAAnBA,mBAAmB;AAAAvB,IAAAA,IAAA,EAAA,EAAA;AAAA7B,IAAAA,MAAA,EAAA8B,EAAA,CAAAC,eAAA,CAAAgB;AAAA,GAAA,CAAA;;;;;UAAnBK;AAAmB,GAAA,CAAA;AAAnB,EAAA,OAAAC,IAAA,GAAAvB,EAAA,CAAAwB,mBAAA,CAAA;AAAAC,IAAAA,UAAA,EAAA,QAAA;AAAAC,IAAAA,OAAA,EAAA,QAAA;AAAAC,IAAAA,QAAA,EAAA3B,EAAA;AAAA4B,IAAAA,IAAA,EAAAN,mBAAmB;AAFnBJ,IAAAA,SAAA,EAAA,CAACW,wBAAwB,EAAE;AAAC,GAAA,CAAA;;;;;;QAE5BP,mBAAmB;AAAAnB,EAAAA,UAAA,EAAA,CAAA;UAH/Bc,QAAQ;AAACI,IAAAA,IAAA,EAAA,CAAA;AACRH,MAAAA,SAAS,EAAE,CAACW,wBAAwB,EAAE;KACvC;;;AAGe,SAAAA,wBAAwBA,CACtCC,OAAA,GAA0BxB,uBAAuB,EAAA;AAEjD,EAAA,OAAO,CACL;AAACa,IAAAA,OAAO,EAAE1H,WAAW;AAAE2H,IAAAA,QAAQ,EAAE5H;AAAkB,GAAA,EACnD;AAAC2H,IAAAA,OAAO,EAAEY,gBAAgB;AAAEC,IAAAA,QAAQ,EAAEF;AAAQ,GAAA,CAC/C;AACH;;;;"}
|
package/fesm2022/sidenav.mjs
CHANGED
|
@@ -353,7 +353,7 @@ class MatDrawer {
|
|
|
353
353
|
}
|
|
354
354
|
_updateFocusTrapState() {
|
|
355
355
|
if (this._focusTrap) {
|
|
356
|
-
this._focusTrap.enabled =
|
|
356
|
+
this._focusTrap.enabled = this.opened && !!this._container?._isShowingBackdrop();
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
_updatePositionInParent(newPosition) {
|