_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
components/src/material/datepicker/date-selection-model.ts_0_7131 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {FactoryProvider, Injectable, Optional, SkipSelf, OnDestroy} from '@angular/core';
import {DateAdapter} from ... | {
"end_byte": 7131,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-selection-model.ts"
} |
components/src/material/datepicker/date-range-selection-strategy.spec.ts_0_3876 | import {TestBed} from '@angular/core/testing';
import {MatNativeDateModule} from '@angular/material/core';
import {JAN, FEB, MAR} from '../testing';
import {
MAT_DATE_RANGE_SELECTION_STRATEGY,
DefaultMatCalendarRangeStrategy,
} from './date-range-selection-strategy';
import {DateRange} from './date-selection-model... | {
"end_byte": 3876,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-selection-strategy.spec.ts"
} |
components/src/material/datepicker/month-view.spec.ts_0_8168 | import {Direction, Directionality} from '@angular/cdk/bidi';
import {
DOWN_ARROW,
END,
ENTER,
ESCAPE,
HOME,
LEFT_ARROW,
PAGE_DOWN,
PAGE_UP,
RIGHT_ARROW,
SPACE,
UP_ARROW,
} from '@angular/cdk/keycodes';
import {
createKeyboardEvent,
dispatchEvent,
dispatchFakeEvent,
dispatchKeyboardEvent,
... | {
"end_byte": 8168,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/month-view.spec.ts"
} |
components/src/material/datepicker/month-view.spec.ts_8176_17912 | describe('a11y', () => {
it('should set the correct role on the internal table node', () => {
const table = monthViewNativeElement.querySelector('table')!;
expect(table.getAttribute('role')).toBe('grid');
});
it('should set the correct scope on the table headers', () => {
... | {
"end_byte": 17912,
"start_byte": 8176,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/month-view.spec.ts"
} |
components/src/material/datepicker/month-view.spec.ts_17924_28620 | it(
'should not cancel the current range selection when pressing escape with a ' +
'modifier key',
() => {
const cellEls = monthViewNativeElement.querySelectorAll('.mat-calendar-body-cell');
testComponent.selected = new DateRange(new Date(2017, JAN, 10),... | {
"end_byte": 28620,
"start_byte": 17924,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/month-view.spec.ts"
} |
components/src/material/datepicker/month-view.spec.ts_28626_34859 | describe('month view with date filter', () => {
it('should disable filtered dates', () => {
const fixture = TestBed.createComponent(MonthViewWithDateFilter);
fixture.detectChanges();
let cells = fixture.nativeElement.querySelectorAll('.mat-calendar-body-cell');
expect(cells[0].cla... | {
"end_byte": 34859,
"start_byte": 28626,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/month-view.spec.ts"
} |
components/src/material/datepicker/datepicker-content.html_0_1694 | <div
cdkTrapFocus
role="dialog"
[attr.aria-modal]="true"
[attr.aria-labelledby]="_dialogLabelId ?? undefined"
class="mat-datepicker-content-container"
[class.mat-datepicker-content-container-with-custom-header]="datepicker.calendarHeaderComponent"
[class.mat-datepicker-content-container-with-actions]="_ac... | {
"end_byte": 1694,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-content.html"
} |
components/src/material/datepicker/multi-year-view.spec.ts_0_684 | import {Direction, Directionality} from '@angular/cdk/bidi';
import {
DOWN_ARROW,
END,
HOME,
LEFT_ARROW,
PAGE_DOWN,
PAGE_UP,
RIGHT_ARROW,
UP_ARROW,
} from '@angular/cdk/keycodes';
import {dispatchFakeEvent, dispatchKeyboardEvent} from '@angular/cdk/testing/private';
import {Component, ViewChild} from '@... | {
"end_byte": 684,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/multi-year-view.spec.ts"
} |
components/src/material/datepicker/multi-year-view.spec.ts_686_9374 | describe('MatMultiYearView', () => {
let dir: {value: Direction};
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
MatNativeDateModule,
MatCalendarBody,
MatMultiYearView,
// Test components.
StandardMultiYearView,
MultiYearViewWit... | {
"end_byte": 9374,
"start_byte": 686,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/multi-year-view.spec.ts"
} |
components/src/material/datepicker/multi-year-view.spec.ts_9378_17166 | describe('multi year view with date filter', () => {
it('should disable years with no enabled days', () => {
const fixture = TestBed.createComponent(MultiYearViewWithDateFilter);
fixture.detectChanges();
const cells = fixture.nativeElement.querySelectorAll('.mat-calendar-body-cell');
expect... | {
"end_byte": 17166,
"start_byte": 9378,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/multi-year-view.spec.ts"
} |
components/src/material/datepicker/calendar-body.scss_0_8511 | @use 'sass:math';
@use '@angular/cdk';
@use '../core/style/button-common';
@use '../core/tokens/m2/mat/datepicker' as tokens-mat-datepicker;
@use '../core/tokens/token-utils';
$calendar-body-label-padding-start: 5% !default;
// We don't want the label to jump around when we switch between month and year views, so we ... | {
"end_byte": 8511,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-body.scss"
} |
components/src/material/datepicker/calendar-body.scss_8511_14207 | .high-contrast {
opacity: 0.5;
}
}
.mat-calendar-body-cell-content {
top: $calendar-body-cell-content-margin;
left: $calendar-body-cell-content-margin;
z-index: 1;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
width: $calendar-body-cell-content-size;
hei... | {
"end_byte": 14207,
"start_byte": 8511,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-body.scss"
} |
components/src/material/datepicker/aria-accessible-name.spec.ts_0_5935 | import {_computeAriaAccessibleName} from './aria-accessible-name';
describe('_computeAriaAccessibleName', () => {
let rootElement: HTMLSpanElement;
beforeEach(() => {
rootElement = document.createElement('span');
document.body.appendChild(rootElement);
});
afterEach(() => {
rootElement.remove();
... | {
"end_byte": 5935,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/aria-accessible-name.spec.ts"
} |
components/src/material/datepicker/public-api.ts_0_1473 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export * from './datepicker-module';
export * from './calendar';
export * from './calendar-body';
export * from './d... | {
"end_byte": 1473,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/public-api.ts"
} |
components/src/material/datepicker/datepicker.ts_0_1189 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';
import {MatDatepickerBase, MatD... | {
"end_byte": 1189,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.ts"
} |
components/src/material/datepicker/datepicker-intl.ts_0_2623 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Injectable} from '@angular/core';
import {Subject} from 'rxjs';
/** Datepicker data that requires internati... | {
"end_byte": 2623,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-intl.ts"
} |
components/src/material/datepicker/calendar.spec.ts_0_1181 | import {Directionality} from '@angular/cdk/bidi';
import {ENTER, RIGHT_ARROW, SPACE} from '@angular/cdk/keycodes';
import {
dispatchFakeEvent,
dispatchKeyboardEvent,
dispatchMouseEvent,
} from '@angular/cdk/testing/private';
import {Component} from '@angular/core';
import {ComponentFixture, TestBed, inject, waitF... | {
"end_byte": 1181,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar.spec.ts"
} |
components/src/material/datepicker/calendar.spec.ts_1182_11599 | {
let fixture: ComponentFixture<StandardCalendar>;
let testComponent: StandardCalendar;
let calendarElement: HTMLElement;
let periodButton: HTMLElement;
let calendarInstance: MatCalendar<Date>;
beforeEach(() => {
fixture = TestBed.createComponent(StandardCalendar);
fixture.detectCha... | {
"end_byte": 11599,
"start_byte": 1182,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar.spec.ts"
} |
components/src/material/datepicker/calendar.spec.ts_11605_20874 | it('should re-render the multi-year view when the locale changes', inject(
[DateAdapter],
(adapter: DateAdapter<Date>) => {
periodButton.click();
fixture.detectChanges();
spyOn(calendarInstance.multiYearView, '_init').and.callThrough();
adapter.setLocale('bg-BG');
f... | {
"end_byte": 20874,
"start_byte": 11605,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar.spec.ts"
} |
components/src/material/datepicker/calendar.spec.ts_20878_25077 | describe('calendar with date filter', () => {
let fixture: ComponentFixture<CalendarWithDateFilter>;
let testComponent: CalendarWithDateFilter;
let calendarElement: HTMLElement;
let calendarInstance: MatCalendar<Date>;
beforeEach(() => {
fixture = TestBed.createComponent(CalendarWithDateFilte... | {
"end_byte": 25077,
"start_byte": 20878,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar.spec.ts"
} |
components/src/material/datepicker/calendar-body.html_0_4506 | <!--
If there's not enough space in the first row, create a separate label row. We mark this row as
aria-hidden because we don't want it to be read out as one of the weeks in the month.
-->
@if (_firstRowOffset < labelMinRequiredCells) {
<tr aria-hidden="true">
<td class="mat-calendar-body-label"
[att... | {
"end_byte": 4506,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-body.html"
} |
components/src/material/datepicker/datepicker-module.ts_0_2518 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {A11yModule} from '@angular/cdk/a11y';
import {OverlayModule} from '@angular/cdk/overlay';
import {PortalModu... | {
"end_byte": 2518,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-module.ts"
} |
components/src/material/datepicker/datepicker-content.scss_0_4178 | @use '../core/tokens/m2/mat/datepicker' as tokens-mat-datepicker;
@use '../core/tokens/token-utils';
$calendar-padding: 8px;
$non-touch-calendar-cell-size: 40px;
$non-touch-calendar-width:
$non-touch-calendar-cell-size * 7 + $calendar-padding * 2;
// Based on the natural height of the calendar in a month with 6 ro... | {
"end_byte": 4178,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-content.scss"
} |
components/src/material/datepicker/datepicker-errors.ts_0_580 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
/** @docs-private */
export function createMissingDateImplError(provider: string) {
return Error(
`MatDatepick... | {
"end_byte": 580,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-errors.ts"
} |
components/src/material/datepicker/calendar.ts_0_8390 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {CdkPortalOutlet, ComponentPortal, ComponentType, Portal} from '@angular/cdk/portal';
import {
AfterContent... | {
"end_byte": 8390,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar.ts"
} |
components/src/material/datepicker/calendar.ts_8391_16565 | {
private _dateAdapter = inject<DateAdapter<D>>(DateAdapter, {optional: true})!;
private _dateFormats = inject<MatDateFormats>(MAT_DATE_FORMATS, {optional: true});
private _changeDetectorRef = inject(ChangeDetectorRef);
/** An input indicating the type of the header component, if set. */
@Input() headerCompo... | {
"end_byte": 16565,
"start_byte": 8391,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar.ts"
} |
components/src/material/datepicker/calendar.ts_16568_18434 | _dateSelected(event: MatCalendarUserEvent<D | null>): void {
const date = event.value;
if (
this.selected instanceof DateRange ||
(date && !this._dateAdapter.sameDate(date, this.selected))
) {
this.selectedChange.emit(date);
}
this._userSelection.emit(event);
}
/** Handles y... | {
"end_byte": 18434,
"start_byte": 16568,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar.ts"
} |
components/src/material/datepicker/multi-year-view.ts_0_7403 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {
DOWN_ARROW,
END,
ENTER,
HOME,
LEFT_ARROW,
PAGE_DOWN,
PAGE_UP,
RIGHT_ARROW,
UP_ARROW,
SP... | {
"end_byte": 7403,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/multi-year-view.ts"
} |
components/src/material/datepicker/multi-year-view.ts_7406_14850 | _handleCalendarBodyKeydown(event: KeyboardEvent): void {
const oldActiveDate = this._activeDate;
const isRtl = this._isRtl();
switch (event.keyCode) {
case LEFT_ARROW:
this.activeDate = this._dateAdapter.addCalendarYears(this._activeDate, isRtl ? 1 : -1);
break;
case RIGHT_ARROW... | {
"end_byte": 14850,
"start_byte": 7406,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/multi-year-view.ts"
} |
components/src/material/datepicker/calendar-header.spec.ts_0_9452 | import {Directionality} from '@angular/cdk/bidi';
import {Component} from '@angular/core';
import {ComponentFixture, TestBed, waitForAsync} from '@angular/core/testing';
import {MatNativeDateModule, DateAdapter} from '@angular/material/core';
import {DEC, FEB, JAN} from '../testing';
import {By} from '@angular/platform... | {
"end_byte": 9452,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-header.spec.ts"
} |
components/src/material/datepicker/calendar-header.spec.ts_9456_14593 | describe('calendar with maxDate only', () => {
let fixture: ComponentFixture<CalendarWithMinMaxDate>;
let testComponent: CalendarWithMinMaxDate;
let calendarElement: HTMLElement;
let periodButton: HTMLButtonElement;
let prevButton: HTMLButtonElement;
let nextButton: HTMLButtonElement;
let ca... | {
"end_byte": 14593,
"start_byte": 9456,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-header.spec.ts"
} |
components/src/material/datepicker/datepicker-input-base.ts_0_2420 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {DOWN_ARROW, hasModifierKey, ModifierKey} from '@angular/cdk/keycodes';
import {
Directive,
ElementRef,
... | {
"end_byte": 2420,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-input-base.ts"
} |
components/src/material/datepicker/datepicker-input-base.ts_2421_10777 | @Directive()
export abstract class MatDatepickerInputBase<S, D = ExtractDateTypeFromSelection<S>>
implements ControlValueAccessor, AfterViewInit, OnChanges, OnDestroy, Validator
{
protected _elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);
_dateAdapter = inject<DateAdapter<D>>(DateAdapter, {optional... | {
"end_byte": 10777,
"start_byte": 2421,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-input-base.ts"
} |
components/src/material/datepicker/datepicker-input-base.ts_10781_14694 | _onKeydown(event: KeyboardEvent) {
const ctrlShiftMetaModifiers: ModifierKey[] = ['ctrlKey', 'shiftKey', 'metaKey'];
const isAltDownArrow =
hasModifierKey(event, 'altKey') &&
event.keyCode === DOWN_ARROW &&
ctrlShiftMetaModifiers.every((modifier: ModifierKey) => !hasModifierKey(event, modifier... | {
"end_byte": 14694,
"start_byte": 10781,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-input-base.ts"
} |
components/src/material/datepicker/calendar-body.ts_0_2705 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Platform, normalizePassiveListenerOptions} from '@angular/cdk/platform';
import {
ChangeDetectionStrategy,... | {
"end_byte": 2705,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-body.ts"
} |
components/src/material/datepicker/calendar-body.ts_2706_11209 | class MatCalendarBody<D = any> implements OnChanges, OnDestroy, AfterViewChecked {
private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);
private _ngZone = inject(NgZone);
private _platform = inject(Platform);
/**
* Used to skip the next focus event when rendering the preview range.
* We need... | {
"end_byte": 11209,
"start_byte": 2706,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-body.ts"
} |
components/src/material/datepicker/calendar-body.ts_11212_19064 | _focusActiveCell(movePreview = true) {
afterNextRender(
() => {
setTimeout(() => {
const activeCell: HTMLElement | null = this._elementRef.nativeElement.querySelector(
'.mat-calendar-body-active',
);
if (activeCell) {
if (!movePreview) {
... | {
"end_byte": 19064,
"start_byte": 11212,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-body.ts"
} |
components/src/material/datepicker/calendar-body.ts_19067_22513 | private _mouseupHandler = (event: Event) => {
if (!this.isRange) return;
const cellElement = getCellElement(event.target as HTMLElement);
if (!cellElement) {
// Mouseup happened outside of datepicker. Cancel drag.
this._ngZone.run(() => {
this.dragEnded.emit({value: null, event});
... | {
"end_byte": 22513,
"start_byte": 19067,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-body.ts"
} |
components/src/material/datepicker/README.md_0_101 | Please see the official documentation at https://material.angular.io/components/component/datepicker
| {
"end_byte": 101,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/README.md"
} |
components/src/material/datepicker/datepicker-base.ts_0_3683 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {AnimationEvent} from '@angular/animations';
import {CdkTrapFocus} from '@angular/cdk/a11y';
import {Directio... | {
"end_byte": 3683,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-base.ts"
} |
components/src/material/datepicker/datepicker-base.ts_3684_11838 | @Component({
selector: 'mat-datepicker-content',
templateUrl: 'datepicker-content.html',
styleUrl: 'datepicker-content.css',
host: {
'class': 'mat-datepicker-content',
'[class]': 'color ? "mat-" + color : ""',
'[@transformPanel]': '_animationState',
'(@transformPanel.start)': '_handleAnimationEv... | {
"end_byte": 11838,
"start_byte": 3684,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-base.ts"
} |
components/src/material/datepicker/datepicker-base.ts_11839_20228 | @Directive()
export abstract class MatDatepickerBase<
C extends MatDatepickerControl<D>,
S,
D = ExtractDateTypeFromSelection<S>,
>
implements MatDatepickerPanel<C, S, D>, OnDestroy, OnChanges
{
private _overlay = inject(Overlay);
private _viewContainerRef = inject(ViewContainerRef);
private _dateA... | {
"end_byte": 20228,
"start_byte": 11839,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-base.ts"
} |
components/src/material/datepicker/datepicker-base.ts_20231_28910 | registerActions(portal: TemplatePortal): void {
if (this._actionsPortal && (typeof ngDevMode === 'undefined' || ngDevMode)) {
throw Error('A MatDatepicker can only be associated with a single actions row.');
}
this._actionsPortal = portal;
this._componentRef?.instance._assignActions(portal, true);... | {
"end_byte": 28910,
"start_byte": 20231,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-base.ts"
} |
components/src/material/datepicker/datepicker-actions.ts_0_2723 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {
AfterViewInit,
ChangeDetectionStrategy,
Component,
Directive,
OnDestroy,
TemplateRef,
ViewChi... | {
"end_byte": 2723,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-actions.ts"
} |
components/src/material/datepicker/calendar-header.html_0_1464 | <div class="mat-calendar-header">
<div class="mat-calendar-controls">
<!-- [Firefox Issue: https://bugzilla.mozilla.org/show_bug.cgi?id=1880533]
Relocated label next to related button and made visually hidden via cdk-visually-hidden
to enable label to appear in a11y tree for SR when using Firefox -->
... | {
"end_byte": 1464,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/calendar-header.html"
} |
components/src/material/datepicker/datepicker-actions.scss_0_314 | .mat-datepicker-actions {
$spacing: 8px;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 0 $spacing $spacing $spacing;
.mat-mdc-button-base + .mat-mdc-button-base {
margin-left: $spacing;
[dir='rtl'] & {
margin-left: 0;
margin-right: $spacing;
}
}
}
| {
"end_byte": 314,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-actions.scss"
} |
components/src/material/datepicker/aria-accessible-name.ts_0_7056 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
// This file contains the `_computeAriaAccessibleName` function, which computes what the *expected*
// ARIA accessib... | {
"end_byte": 7056,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/aria-accessible-name.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_0_2375 | import {Directionality} from '@angular/cdk/bidi';
import {
DOWN_ARROW,
ENTER,
ESCAPE,
LEFT_ARROW,
PAGE_DOWN,
PAGE_UP,
RIGHT_ARROW,
UP_ARROW,
} from '@angular/cdk/keycodes';
import {Overlay} from '@angular/cdk/overlay';
import {_supportsShadowDom} from '@angular/cdk/platform';
import {ScrollDispatcher} f... | {
"end_byte": 2375,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_2376_13248 | () => {
describe('standard datepicker', () => {
let fixture: ComponentFixture<StandardDatepicker>;
let testComponent: StandardDatepicker;
let model: MatDateSelectionModel<Date | null, Date>;
beforeEach(fakeAsync(() => {
fixture = createComponent(StandardDatepicker, [MatNativeDateMod... | {
"end_byte": 13248,
"start_byte": 2376,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_13256_23682 | it(
'pressing enter on the currently selected date should close the calendar without ' +
'firing selectedChanged',
fakeAsync(() => {
const spy = jasmine.createSpy('selectionChanged spy');
const selectedSubscription = model.selectionChanged.subscribe(spy);
testCom... | {
"end_byte": 23682,
"start_byte": 13256,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_23688_30333 | describe('datepicker that is assigned to input at a later point', () => {
it('should not throw on ALT + DOWN_ARROW for input without datepicker', fakeAsync(() => {
const fixture = createComponent(DelayedDatepicker, [MatNativeDateModule]);
fixture.detectChanges();
expect(() => {
... | {
"end_byte": 30333,
"start_byte": 23688,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_30339_36510 | describe('datepicker with ngModel', () => {
let fixture: ComponentFixture<DatepickerWithNgModel>;
let testComponent: DatepickerWithNgModel;
let model: MatDateSelectionModel<Date | null, Date>;
beforeEach(fakeAsync(() => {
fixture = createComponent(DatepickerWithNgModel, [MatNativeDateMo... | {
"end_byte": 36510,
"start_byte": 30339,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_36516_40604 | describe('datepicker with formControl', () => {
let fixture: ComponentFixture<DatepickerWithFormControl>;
let testComponent: DatepickerWithFormControl;
let model: MatDateSelectionModel<Date | null, Date>;
beforeEach(fakeAsync(() => {
fixture = createComponent(DatepickerWithFormControl, ... | {
"end_byte": 40604,
"start_byte": 36516,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_40610_50941 | describe('datepicker with mat-datepicker-toggle', () => {
let fixture: ComponentFixture<DatepickerWithToggle>;
let testComponent: DatepickerWithToggle;
beforeEach(fakeAsync(() => {
fixture = createComponent(DatepickerWithToggle, [MatNativeDateModule]);
fixture.detectChanges();
... | {
"end_byte": 50941,
"start_byte": 40610,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_50947_60556 | describe('datepicker with tabindex on mat-datepicker-toggle', () => {
it('should forward the tabindex to the underlying button', () => {
const fixture = createComponent(DatepickerWithTabindexOnToggle, [MatNativeDateModule]);
fixture.detectChanges();
const button = fixture.nativeElement.qu... | {
"end_byte": 60556,
"start_byte": 50947,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_60562_70623 | describe('datepicker with filter and validation', () => {
let fixture: ComponentFixture<DatepickerWithFilterAndValidation>;
let testComponent: DatepickerWithFilterAndValidation;
beforeEach(() => {
fixture = createComponent(DatepickerWithFilterAndValidation, [MatNativeDateModule]);
fix... | {
"end_byte": 70623,
"start_byte": 60562,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_70629_76696 | describe('datepicker that opens on focus', () => {
let fixture: ComponentFixture<DatepickerOpeningOnFocus>;
let testComponent: DatepickerOpeningOnFocus;
let input: HTMLInputElement;
beforeEach(fakeAsync(() => {
fixture = createComponent(DatepickerOpeningOnFocus, [MatNativeDateModule]);
... | {
"end_byte": 76696,
"start_byte": 70629,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_76700_86162 | describe('popup positioning', () => {
let fixture: ComponentFixture<StandardDatepicker>;
let testComponent: StandardDatepicker;
let input: HTMLElement;
beforeEach(fakeAsync(() => {
fixture = createComponent(StandardDatepicker, [MatNativeDateModule]);
fixture.detectChanges();
testCompo... | {
"end_byte": 86162,
"start_byte": 76700,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_86166_94043 | it('should not emit to `stateChanges` if new date object for same date is set for `max`', () => {
const fixture = createComponent(StandardDatepicker, [MatNativeDateModule]);
fixture.detectChanges();
const maxDate = new Date(2120, 0, 1);
const spy = jasmine.createSpy('stateChanges spy');
const subsc... | {
"end_byte": 94043,
"start_byte": 86166,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker.spec.ts_94045_98997 | @Component({
template: `
<input [matDatepicker]="d" [(ngModel)]="date" [matDatepickerFilter]="filter">
<mat-datepicker-toggle [for]="d"></mat-datepicker-toggle>
<mat-datepicker #d [touchUi]="true"></mat-datepicker>
`,
standalone: false,
})
class DatepickerWithFilterAndValidation {
@ViewChild('d') da... | {
"end_byte": 98997,
"start_byte": 94045,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker.spec.ts"
} |
components/src/material/datepicker/datepicker-toggle.ts_0_4516 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {
AfterContentInit,
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
ContentChild,
Directiv... | {
"end_byte": 4516,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-toggle.ts"
} |
components/src/material/datepicker/BUILD.bazel_0_3237 | load(
"//tools:defaults.bzl",
"extract_tokens",
"markdown_to_html",
"ng_module",
"ng_test_library",
"ng_web_test_suite",
"sass_binary",
"sass_library",
)
package(default_visibility = ["//visibility:public"])
ng_module(
name = "datepicker",
srcs = glob(
["**/*.ts"],
... | {
"end_byte": 3237,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/BUILD.bazel"
} |
components/src/material/datepicker/datepicker-toggle.html_0_731 | <button
#button
mat-icon-button
type="button"
[attr.aria-haspopup]="datepicker ? 'dialog' : null"
[attr.aria-label]="ariaLabel || _intl.openCalendarLabel"
[attr.tabindex]="disabled ? -1 : tabIndex"
[disabled]="disabled"
[disableRipple]="disableRipple">
@if (!_customIcon) {
<svg
class="mat-d... | {
"end_byte": 731,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-toggle.html"
} |
components/src/material/datepicker/index.ts_0_234 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export * from './public-api';
| {
"end_byte": 234,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/index.ts"
} |
components/src/material/datepicker/year-view.ts_0_1352 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {
DOWN_ARROW,
END,
ENTER,
HOME,
LEFT_ARROW,
PAGE_DOWN,
PAGE_UP,
RIGHT_ARROW,
UP_ARROW,
SP... | {
"end_byte": 1352,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/year-view.ts"
} |
components/src/material/datepicker/year-view.ts_1353_9680 | class MatYearView<D> implements AfterContentInit, OnDestroy {
readonly _changeDetectorRef = inject(ChangeDetectorRef);
private _dateFormats = inject<MatDateFormats>(MAT_DATE_FORMATS, {optional: true})!;
_dateAdapter = inject<DateAdapter<D>>(DateAdapter, {optional: true})!;
private _dir = inject(Directionality, ... | {
"end_byte": 9680,
"start_byte": 1353,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/year-view.ts"
} |
components/src/material/datepicker/year-view.ts_9683_14433 | _init() {
this._setSelectedMonth(this.selected);
this._todayMonth = this._getMonthInCurrentYear(this._dateAdapter.today());
this._yearLabel = this._dateAdapter.getYearName(this.activeDate);
let monthNames = this._dateAdapter.getMonthNames('short');
// First row of months only contains 5 elements so... | {
"end_byte": 14433,
"start_byte": 9683,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/year-view.ts"
} |
components/src/material/datepicker/datepicker-input.ts_0_6590 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Directive, ElementRef, forwardRef, Input, OnDestroy, signal, inject} from '@angular/core';
import {NG_VALIDA... | {
"end_byte": 6590,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-input.ts"
} |
components/src/material/datepicker/year-view.html_0_790 | <table class="mat-calendar-table" role="grid">
<thead aria-hidden="true" class="mat-calendar-table-header">
<tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr>
</thead>
<tbody mat-calendar-body
[label]="_yearLabel"
[rows]="_months"
[todayValue]="_todayMonth!"
... | {
"end_byte": 790,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/year-view.html"
} |
components/src/material/datepicker/multi-year-view.html_0_700 | <table class="mat-calendar-table" role="grid">
<thead aria-hidden="true" class="mat-calendar-table-header">
<tr><th class="mat-calendar-table-header-divider" colspan="4"></th></tr>
</thead>
<tbody mat-calendar-body
[rows]="_years"
[todayValue]="_todayYear"
[startValue]="_selectedYea... | {
"end_byte": 700,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/multi-year-view.html"
} |
components/src/material/datepicker/date-range-selection-strategy.ts_0_5631 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {Injectable, InjectionToken, Optional, SkipSelf, FactoryProvider} from '@angular/core';
import {DateAdapter} ... | {
"end_byte": 5631,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-selection-strategy.ts"
} |
components/src/material/datepicker/date-range-input.spec.ts_0_1234 | import {FocusMonitor} from '@angular/cdk/a11y';
import {Directionality} from '@angular/cdk/bidi';
import {BACKSPACE, LEFT_ARROW, RIGHT_ARROW} from '@angular/cdk/keycodes';
import {OverlayContainer} from '@angular/cdk/overlay';
import {dispatchFakeEvent, dispatchKeyboardEvent} from '@angular/cdk/testing/private';
import... | {
"end_byte": 1234,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-input.spec.ts"
} |
components/src/material/datepicker/date-range-input.spec.ts_1234_11340 | ('MatDateRangeInput', () => {
function createComponent<T>(component: Type<T>, providers: Provider[] = []): ComponentFixture<T> {
TestBed.configureTestingModule({
imports: [
FormsModule,
MatDatepickerModule,
MatFormFieldModule,
MatInputModule,
NoopAnimationsModule,
... | {
"end_byte": 11340,
"start_byte": 1234,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-input.spec.ts"
} |
components/src/material/datepicker/date-range-input.spec.ts_11344_20357 | ('should pass the maximum date from the range input to the inner inputs', () => {
const fixture = createComponent(StandardRangePicker);
fixture.componentInstance.maxDate = new Date(2020, 1, 2);
fixture.changeDetectorRef.markForCheck();
fixture.detectChanges();
const {start, end} = fixture.componentI... | {
"end_byte": 20357,
"start_byte": 11344,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-input.spec.ts"
} |
components/src/material/datepicker/date-range-input.spec.ts_20361_28750 | ("should have aria-desciredby on start and end date cells that point to the <input/>'s accessible name", fakeAsync(() => {
const fixture = createComponent(StandardRangePicker);
const {start, end} = fixture.componentInstance.range.controls;
let overlayContainerElement: HTMLElement;
start.setValue(new Dat... | {
"end_byte": 28750,
"start_byte": 20361,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-input.spec.ts"
} |
components/src/material/datepicker/date-range-input.spec.ts_28754_38466 | ('moves focus between fields with arrow keys when cursor is at edge (LTR)', () => {
const fixture = createComponent(StandardRangePicker);
fixture.detectChanges();
const {start, end} = fixture.componentInstance;
start.nativeElement.value = '09/10/2020';
end.nativeElement.value = '10/10/2020';
s... | {
"end_byte": 38466,
"start_byte": 28754,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-input.spec.ts"
} |
components/src/material/datepicker/date-range-input.spec.ts_38470_46907 | should be able to pass in a different error state matcher through an input', () => {
const fixture = createComponent(RangePickerErrorStateMatcher);
fixture.detectChanges();
const {startInput, endInput, matcher} = fixture.componentInstance;
expect(startInput.errorStateMatcher).toBe(matcher);
expect(... | {
"end_byte": 46907,
"start_byte": 38470,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-input.spec.ts"
} |
components/src/material/datepicker/date-range-input.spec.ts_46909_48324 | nent({
template: `
<mat-form-field>
<mat-date-range-input [rangePicker]="rangePicker" [min]="min" [max]="max">
<input matStartDate [(ngModel)]="start" customValidator/>
<input matEndDate [(ngModel)]="end" customValidator/>
</mat-date-range-input>
<mat-date-range-picker #rangePic... | {
"end_byte": 48324,
"start_byte": 46909,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/date-range-input.spec.ts"
} |
components/src/material/datepicker/datepicker-toggle.scss_0_1014 | @use '@angular/cdk';
@use '../core/tokens/m2/mat/datepicker' as tokens-mat-datepicker;
@use '../core/tokens/token-utils';
$_tokens: (tokens-mat-datepicker.$prefix, tokens-mat-datepicker.get-token-slots());
// We support the case where the form field is disabled, but the datepicker is not.
// MDC sets `pointer-events:... | {
"end_byte": 1014,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/datepicker-toggle.scss"
} |
components/src/material/datepicker/testing/datepicker-input-harness.ts_0_2979 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {HarnessPredicate, parallel, TestKey} from '@angular/cdk/testing';
import {DatepickerInputHarnessFilters, Cal... | {
"end_byte": 2979,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/datepicker-input-harness.ts"
} |
components/src/material/datepicker/testing/datepicker-harness-filters.ts_0_2056 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {BaseHarnessFilters} from '@angular/cdk/testing';
/** A set of criteria that can be used to filter a list of... | {
"end_byte": 2056,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/datepicker-harness-filters.ts"
} |
components/src/material/datepicker/testing/datepicker-input-harness-base.ts_0_3276 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ComponentHarnessConstructor, HarnessPredicate} from '@angular/cdk/testing';
import {MatFormFieldControlHarne... | {
"end_byte": 3276,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/datepicker-input-harness-base.ts"
} |
components/src/material/datepicker/testing/datepicker-input-harness.spec.ts_0_8353 | import {HarnessLoader, parallel} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {Component} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {FormsModule} from '@angular/forms';
import {DateAdapter, MatNativeDateMo... | {
"end_byte": 8353,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/datepicker-input-harness.spec.ts"
} |
components/src/material/datepicker/testing/datepicker-trigger-harness-base.ts_0_3926 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {ComponentHarness, LocatorFactory, parallel, TestElement} from '@angular/cdk/testing';
import {CalendarHarnes... | {
"end_byte": 3926,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/datepicker-trigger-harness-base.ts"
} |
components/src/material/datepicker/testing/public-api.ts_0_460 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export * from './datepicker-harness-filters';
export * from './datepicker-input-harness';
export * from './datepicke... | {
"end_byte": 460,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/public-api.ts"
} |
components/src/material/datepicker/testing/calendar-harness.spec.ts_0_612 | import {HarnessLoader, parallel} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {Component} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {MatNativeDateModule} from '@angular/material/core';
import {
DateRange... | {
"end_byte": 612,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/calendar-harness.spec.ts"
} |
components/src/material/datepicker/testing/calendar-harness.spec.ts_614_8892 | describe('MatCalendarHarness', () => {
let fixture: ComponentFixture<CalendarHarnessTest>;
let loader: HarnessLoader;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [MatNativeDateModule, MatDatepickerModule, CalendarHarnessTest],
providers: [
{
// Usually it's the ... | {
"end_byte": 8892,
"start_byte": 614,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/calendar-harness.spec.ts"
} |
components/src/material/datepicker/testing/calendar-harness.spec.ts_8896_14439 | ('should get the state of the cell within the preview range', async () => {
const calendar = await loader.getHarness(MatCalendarHarness.with({selector: '#range'}));
const allCells = await calendar.getCells();
const [initialStartStates, initialInRangeStates, initialEndStates] = await parallel(() => [
p... | {
"end_byte": 14439,
"start_byte": 8896,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/calendar-harness.spec.ts"
} |
components/src/material/datepicker/testing/calendar-cell-harness.ts_0_5692 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {HarnessPredicate, ComponentHarness} from '@angular/cdk/testing';
import {CalendarCellHarnessFilters} from '.... | {
"end_byte": 5692,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/calendar-cell-harness.ts"
} |
components/src/material/datepicker/testing/BUILD.bazel_0_871 | load("//tools:defaults.bzl", "ng_test_library", "ng_web_test_suite", "ts_library")
package(default_visibility = ["//visibility:public"])
ts_library(
name = "testing",
srcs = glob(
["**/*.ts"],
exclude = ["**/*.spec.ts"],
),
deps = [
"//src/cdk/coercion",
"//src/cdk/test... | {
"end_byte": 871,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/BUILD.bazel"
} |
components/src/material/datepicker/testing/calendar-harness.ts_0_3203 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {HarnessPredicate, ComponentHarness} from '@angular/cdk/testing';
import {CalendarHarnessFilters, CalendarCel... | {
"end_byte": 3203,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/calendar-harness.ts"
} |
components/src/material/datepicker/testing/index.ts_0_234 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
export * from './public-api';
| {
"end_byte": 234,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/index.ts"
} |
components/src/material/datepicker/testing/date-range-input-harness.ts_0_5057 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {HarnessPredicate, parallel, TestKey} from '@angular/cdk/testing';
import {MatDatepickerInputHarnessBase, get... | {
"end_byte": 5057,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/date-range-input-harness.ts"
} |
components/src/material/datepicker/testing/datepicker-toggle-harness.ts_0_1784 | /**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.dev/license
*/
import {HarnessPredicate} from '@angular/cdk/testing';
import {coerceBooleanProperty} from '@angular/cdk/coercion';
... | {
"end_byte": 1784,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/datepicker-toggle-harness.ts"
} |
components/src/material/datepicker/testing/date-range-input-harness.spec.ts_0_735 | import {HarnessLoader, parallel} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {Component} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {FormsModule} from '@angular/forms';
import {MatNativeDateModule} from '@... | {
"end_byte": 735,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/date-range-input-harness.spec.ts"
} |
components/src/material/datepicker/testing/date-range-input-harness.spec.ts_737_9004 | describe('matDateRangeInputHarness', () => {
let fixture: ComponentFixture<DateRangeInputHarnessTest>;
let loader: HarnessLoader;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
NoopAnimationsModule,
MatNativeDateModule,
MatDatepickerModule,
FormsModule,
... | {
"end_byte": 9004,
"start_byte": 737,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/date-range-input-harness.spec.ts"
} |
components/src/material/datepicker/testing/date-range-input-harness.spec.ts_9008_11076 | should dispatch the dateChange event when the inner input values have changed', async () => {
const input = await loader.getHarness(MatDateRangeInputHarness.with({selector: '[basic]'}));
const [start, end] = await parallel(() => [input.getStartInput(), input.getEndInput()]);
expect(fixture.componentInstanc... | {
"end_byte": 11076,
"start_byte": 9008,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/date-range-input-harness.spec.ts"
} |
components/src/material/datepicker/testing/datepicker-toggle-harness.spec.ts_0_3631 | import {HarnessLoader, parallel} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {Component} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {MatNativeDateModule} from '@angular/material/core';
import {MatDatepicke... | {
"end_byte": 3631,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/datepicker/testing/datepicker-toggle-harness.spec.ts"
} |
components/src/material/toolbar/_toolbar-theme.scss_0_3618 | @use 'sass:map';
@use '../core/theming/theming';
@use '../core/theming/inspection';
@use '../core/theming/validation';
@use '../core/typography/typography';
@use '../core/tokens/m2/mat/toolbar' as tokens-mat-toolbar;
@use '../core/tokens/token-utils';
@use '../core/style/sass-utils';
@mixin _palette-styles($theme, $pa... | {
"end_byte": 3618,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/toolbar/_toolbar-theme.scss"
} |
components/src/material/toolbar/toolbar.md_0_1862 | `<mat-toolbar>` is a container for headers, titles, or actions.
<!-- example(toolbar-overview) -->
### Single row
In the simplest case, a toolbar may be placed at the top of your application and
have a single row that includes the title of your application.
<!-- example(toolbar-simple) -->
### Multiple rows
The ... | {
"end_byte": 1862,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/toolbar/toolbar.md"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.