_id stringlengths 21 254 | text stringlengths 1 93.7k | metadata dict |
|---|---|---|
components/src/material/tabs/testing/BUILD.bazel_0_803 | 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/testing",
],
)
filegroup(
... | {
"end_byte": 803,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tabs/testing/BUILD.bazel"
} |
components/src/material/tabs/testing/tab-nav-bar-harness.ts_0_2927 | /**
* @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,
ComponentHarnessConstructor,
HarnessPredicate,
parallel,
} from '@angular/cdk/tes... | {
"end_byte": 2927,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tabs/testing/tab-nav-bar-harness.ts"
} |
components/src/material/tabs/testing/tab-link-harness.ts_0_1788 | /**
* @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,
ComponentHarnessConstructor,
HarnessPredicate,
} from '@angular/cdk/testing';
impor... | {
"end_byte": 1788,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tabs/testing/tab-link-harness.ts"
} |
components/src/material/tabs/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/tabs/testing/index.ts"
} |
components/src/material/tabs/testing/tab-nav-bar-harness.spec.ts_0_4597 | import {Component, signal} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {HarnessLoader} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {MatTabsModule} from '@angular/material/tabs';
import {NoopAnimationsModule... | {
"end_byte": 4597,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tabs/testing/tab-nav-bar-harness.spec.ts"
} |
components/src/material/tabs/testing/tab-harness-filters.ts_0_1484 | /**
* @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": 1484,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tabs/testing/tab-harness-filters.ts"
} |
components/src/material/tabs/testing/tab-group-harness.spec.ts_0_7191 | import {Component, signal} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {ComponentHarness, HarnessLoader, parallel} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {MatTabsModule} from '@angular/material/tabs';
... | {
"end_byte": 7191,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tabs/testing/tab-group-harness.spec.ts"
} |
components/src/material/tree/padding.ts_0_1193 | /**
* @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 {CdkTreeNodePadding} from '@angular/cdk/tree';
import {Directive, Input, numberAttribute} from '@angular/core'... | {
"end_byte": 1193,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/padding.ts"
} |
components/src/material/tree/node.ts_0_5942 | /**
* @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 {
CDK_TREE_NODE_OUTLET_NODE,
CdkNestedTreeNode,
CdkTreeNode,
CdkTreeNodeDef,
} from '@angular/cdk/tre... | {
"end_byte": 5942,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/node.ts"
} |
components/src/material/tree/tree.scss_0_1219 | @use '../core/tokens/m2/mat/tree' as tokens-mat-tree;
@use '../core/tokens/token-utils';
.mat-tree {
display: block;
@include token-utils.use-tokens(tokens-mat-tree.$prefix, tokens-mat-tree.get-token-slots()) {
@include token-utils.create-token-slot(background-color, container-background-color);
}
}
.mat-t... | {
"end_byte": 1219,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.scss"
} |
components/src/material/tree/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 './node';
export * from './padding';
export * from './tree';
export * from './tree-module';
export * f... | {
"end_byte": 460,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/public-api.ts"
} |
components/src/material/tree/tree-using-legacy-key-manager.spec.ts_0_4118 | import {Component, ElementRef, QueryList, ViewChild, ViewChildren} from '@angular/core';
import {of} from 'rxjs';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {MatTreeModule} from './tree-module';
import {NOOP_TREE_KEY_MANAGER_FACTORY_PROVIDER} from '@angular/cdk/a11y';
import {DOWN_ARROW} fr... | {
"end_byte": 4118,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-using-legacy-key-manager.spec.ts"
} |
components/src/material/tree/outlet.ts_0_801 | /**
* @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 {CDK_TREE_NODE_OUTLET_NODE, CdkTreeNodeOutlet} from '@angular/cdk/tree';
import {Directive, ViewContainerRef, ... | {
"end_byte": 801,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/outlet.ts"
} |
components/src/material/tree/_tree-theme.scss_0_3044 | @use 'sass:map';
@use '../core/theming/theming';
@use '../core/theming/inspection';
@use '../core/theming/validation';
@use '../core/typography/typography';
@use '../core/style/sass-utils';
@use '../core/tokens/token-utils';
@use '../core/tokens/m2/mat/tree' as tokens-mat-tree;
@mixin base($theme) {
@if inspection.g... | {
"end_byte": 3044,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/_tree-theme.scss"
} |
components/src/material/tree/tree.spec.ts_0_484 | /**
* @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 {Component, ViewChild, Type} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/test... | {
"end_byte": 484,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.spec.ts"
} |
components/src/material/tree/tree.spec.ts_486_8982 | describe('MatTree', () => {
/** Represents an indent for expectNestedTreeToMatch */
const _ = {};
let treeElement: HTMLElement;
let underlyingDataSource: FakeDataSource;
function configureMatTreeTestingModule(declarations: Type<any>[]) {
TestBed.configureTestingModule({
imports: [MatTreeModule],
... | {
"end_byte": 8982,
"start_byte": 486,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.spec.ts"
} |
components/src/material/tree/tree.spec.ts_8986_14996 | describe('flat tree with undefined or null children', () => {
describe('should initialize', () => {
let fixture: ComponentFixture<MatTreeWithNullOrUndefinedChild>;
beforeEach(() => {
configureMatTreeTestingModule([MatTreeWithNullOrUndefinedChild]);
fixture = TestBed.createComponent(MatT... | {
"end_byte": 14996,
"start_byte": 8986,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.spec.ts"
} |
components/src/material/tree/tree.spec.ts_15002_19559 | describe('with toggle', () => {
let fixture: ComponentFixture<NestedMatTreeAppWithToggle>;
let component: NestedMatTreeAppWithToggle;
beforeEach(() => {
configureMatTreeTestingModule([NestedMatTreeAppWithToggle]);
fixture = TestBed.createComponent(NestedMatTreeAppWithToggle);
... | {
"end_byte": 19559,
"start_byte": 15002,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.spec.ts"
} |
components/src/material/tree/tree.spec.ts_19563_27692 | describe('accessibility', () => {
let fixture: ComponentFixture<NestedMatTreeApp>;
let component: NestedMatTreeApp;
let nodes: HTMLElement[];
let tree: MatTree<TestData>;
beforeEach(() => {
configureMatTreeTestingModule([NestedMatTreeApp]);
fixture = TestBed.createComponent(NestedMatTre... | {
"end_byte": 27692,
"start_byte": 19563,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.spec.ts"
} |
components/src/material/tree/tree.spec.ts_27694_36025 | function expectNestedTreeToMatch(treeElement: Element, ...expectedTree: any[]) {
const missedExpectations: string[] = [];
function checkNodeContent(node: Element, expectedNode: any[]) {
const expectedTextContent = expectedNode[expectedNode.length - 1];
const actualTextContent = node.childNodes.item(0).textC... | {
"end_byte": 36025,
"start_byte": 27694,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.spec.ts"
} |
components/src/material/tree/tree.spec.ts_36027_37093 | @Component({
template: `
<mat-tree [dataSource]="dataSource" [childrenAccessor]="childrenAccessor">
<mat-tree-node *matTreeNodeDef="let node" class="customNodeClass"
matTreeNodePadding [matTreeNodePaddingIndent]="28"
matTreeNodeToggle>
{{node.pi... | {
"end_byte": 37093,
"start_byte": 36027,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.spec.ts"
} |
components/src/material/tree/BUILD.bazel_0_1433 | 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 = "tree",
srcs = glob(
["**/*.ts"],
ex... | {
"end_byte": 1433,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/BUILD.bazel"
} |
components/src/material/tree/tree-module.ts_0_916 | /**
* @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 {NgModule} from '@angular/core';
import {CdkTreeModule} from '@angular/cdk/tree';
import {MatCommonModule} f... | {
"end_byte": 916,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-module.ts"
} |
components/src/material/tree/tree.md_0_8007 | The `mat-tree` provides a Material Design styled tree that can be used to display hierarchical
data.
This tree builds on the foundation of the CDK tree and uses a similar interface for its
data source input and template, except that its element and attribute selectors will be prefixed
with `mat-` instead of `cdk-`.
T... | {
"end_byte": 8007,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.md"
} |
components/src/material/tree/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/tree/index.ts"
} |
components/src/material/tree/tree.ts_0_1311 | /**
* @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 {CdkTree} from '@angular/cdk/tree';
import {ChangeDetectionStrategy, Component, ViewChild, ViewEncapsulation}... | {
"end_byte": 1311,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree.ts"
} |
components/src/material/tree/tree-using-tree-control.spec.ts_0_621 | /**
* @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 {FlatTreeControl, NestedTreeControl, TreeControl} from '@angular/cdk/tree';
import {Component, ViewChild, Type... | {
"end_byte": 621,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-using-tree-control.spec.ts"
} |
components/src/material/tree/tree-using-tree-control.spec.ts_623_8929 | describe('MatTree', () => {
/** Represents an indent for expectNestedTreeToMatch */
const _ = {};
let treeElement: HTMLElement;
let underlyingDataSource: FakeDataSource;
function configureMatTreeTestingModule(declarations: Type<any>[]) {
TestBed.configureTestingModule({
imports: [MatTreeModule],
... | {
"end_byte": 8929,
"start_byte": 623,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-using-tree-control.spec.ts"
} |
components/src/material/tree/tree-using-tree-control.spec.ts_8933_10403 | describe('flat tree with undefined or null children', () => {
describe('should initialize', () => {
let fixture: ComponentFixture<MatTreeWithNullOrUndefinedChild>;
beforeEach(() => {
configureMatTreeTestingModule([MatTreeWithNullOrUndefinedChild]);
fixture = TestBed.createComponent(MatT... | {
"end_byte": 10403,
"start_byte": 8933,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-using-tree-control.spec.ts"
} |
components/src/material/tree/tree-using-tree-control.spec.ts_10406_19232 | describe('nested tree', () => {
describe('should initialize', () => {
let fixture: ComponentFixture<NestedMatTreeApp>;
let component: NestedMatTreeApp;
beforeEach(() => {
configureMatTreeTestingModule([NestedMatTreeApp]);
fixture = TestBed.createComponent(NestedMatTreeApp);
... | {
"end_byte": 19232,
"start_byte": 10406,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-using-tree-control.spec.ts"
} |
components/src/material/tree/tree-using-tree-control.spec.ts_19236_27287 | describe('accessibility', () => {
let fixture: ComponentFixture<NestedMatTreeApp>;
let component: NestedMatTreeApp;
let nodes: HTMLElement[];
let tree: MatTree<TestData>;
beforeEach(() => {
configureMatTreeTestingModule([NestedMatTreeApp]);
fixture = TestBed.createComponent(NestedMatTre... | {
"end_byte": 27287,
"start_byte": 19236,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-using-tree-control.spec.ts"
} |
components/src/material/tree/tree-using-tree-control.spec.ts_27289_34690 | function expectNestedTreeToMatch(treeElement: Element, ...expectedTree: any[]) {
const missedExpectations: string[] = [];
function checkNodeContent(node: Element, expectedNode: any[]) {
const expectedTextContent = expectedNode[expectedNode.length - 1];
const actualTextContent = node.childNodes.item(0).textC... | {
"end_byte": 34690,
"start_byte": 27289,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-using-tree-control.spec.ts"
} |
components/src/material/tree/tree-using-tree-control.spec.ts_34692_38978 | @Component({
template: `
<mat-tree [dataSource]="dataSource" [treeControl]="treeControl">
<mat-tree-node *matTreeNodeDef="let node" class="customNodeClass"
[isExpandable]="isExpandable(node)"
[isDisabled]="node.isDisabled"
matTreeNodePadding
... | {
"end_byte": 38978,
"start_byte": 34692,
"url": "https://github.com/angular/components/blob/main/src/material/tree/tree-using-tree-control.spec.ts"
} |
components/src/material/tree/toggle.ts_0_646 | /**
* @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 {CdkTreeNodeToggle} from '@angular/cdk/tree';
import {Directive} from '@angular/core';
/**
* Wrapper for th... | {
"end_byte": 646,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/toggle.ts"
} |
components/src/material/tree/testing/tree-harness.ts_0_4789 | /**
* @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, HarnessPredicate, parallel} from '@angular/cdk/testing';
import {MatTreeNodeHarness} from ... | {
"end_byte": 4789,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/testing/tree-harness.ts"
} |
components/src/material/tree/testing/tree-harness-filters.ts_0_944 | /**
* @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": 944,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/testing/tree-harness-filters.ts"
} |
components/src/material/tree/testing/public-api.ts_0_308 | /**
* @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 './node-harness';
export * from './tree-harness';
export * from './tree-harness-filters';
| {
"end_byte": 308,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/testing/public-api.ts"
} |
components/src/material/tree/testing/tree-harness.spec.ts_0_6714 | import {Component} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {FlatTreeControl, NestedTreeControl} from '@angular/cdk/tree';
import {
MatTreeFlatDataSource,
MatTreeFlattener,
MatTreeModule,
MatTreeNestedDataSource,
} from '@angular/material/tree';
import {Harne... | {
"end_byte": 6714,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/testing/tree-harness.spec.ts"
} |
components/src/material/tree/testing/tree-harness.spec.ts_6716_9077 | @Component({
template: `
<mat-tree [dataSource]="flatTreeDataSource" [treeControl]="flatTreeControl">
<!-- This is the tree node template for leaf nodes -->
<mat-tree-node *matTreeNodeDef="let node" matTreeNodePadding>
{{node.name}}
</mat-tree-node>
<!-- This is the tree node templ... | {
"end_byte": 9077,
"start_byte": 6716,
"url": "https://github.com/angular/components/blob/main/src/material/tree/testing/tree-harness.spec.ts"
} |
components/src/material/tree/testing/BUILD.bazel_0_732 | 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": 732,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/testing/BUILD.bazel"
} |
components/src/material/tree/testing/node-harness.ts_0_3510 | /**
* @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,
ContentContainerComponentHarness,
HarnessPredicate,
} from '@angular/cdk... | {
"end_byte": 3510,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/testing/node-harness.ts"
} |
components/src/material/tree/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/tree/testing/index.ts"
} |
components/src/material/tree/data-source/flat-data-source.ts_0_5455 | /**
* @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 {CollectionViewer, DataSource} from '@angular/cdk/collections';
import {FlatTreeControl, TreeControl} from '@... | {
"end_byte": 5455,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/data-source/flat-data-source.ts"
} |
components/src/material/tree/data-source/nested-data-source.ts_0_1111 | /**
* @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 {CollectionViewer, DataSource} from '@angular/cdk/collections';
import {BehaviorSubject, merge, Observable} f... | {
"end_byte": 1111,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tree/data-source/nested-data-source.ts"
} |
components/src/material/timepicker/_timepicker-theme.scss_0_4483 | @use 'sass:map';
@use '../core/theming/theming';
@use '../core/theming/inspection';
@use '../core/theming/validation';
@use '../core/typography/typography';
@use '../core/style/sass-utils';
@use '../core/tokens/m2/mat/timepicker' as tokens-mat-timepicker;
@use '../core/tokens/token-utils';
/// Outputs base theme style... | {
"end_byte": 4483,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/_timepicker-theme.scss"
} |
components/src/material/timepicker/timepicker-input.ts_0_2146 | /**
* @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 {
booleanAttribute,
computed,
Directive,
effect,
ElementRef,
inject,
input,
InputSignal,
In... | {
"end_byte": 2146,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker-input.ts"
} |
components/src/material/timepicker/timepicker-input.ts_2147_10514 | {
private _elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);
private _document = inject(DOCUMENT);
private _dateAdapter = inject<DateAdapter<D>>(DateAdapter, {optional: true})!;
private _dateFormats = inject(MAT_DATE_FORMATS, {optional: true})!;
private _formField = inject(MAT_FORM_FIELD, {option... | {
"end_byte": 10514,
"start_byte": 2147,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker-input.ts"
} |
components/src/material/timepicker/timepicker-input.ts_10518_13904 | /**
* Assigns a value set by the user to the input's model.
* @param selection Time selected by the user that should be assigned.
* @param propagateToAccessor Whether the value should be propagated to the ControlValueAccessor.
*/
private _assignUserSelection(selection: D | null, propagateToAccessor: boole... | {
"end_byte": 13904,
"start_byte": 10518,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker-input.ts"
} |
components/src/material/timepicker/timepicker.md_0_5 | TODO
| {
"end_byte": 5,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.md"
} |
components/src/material/timepicker/timepicker.spec.ts_0_5040 | import {Component, Provider, signal, ViewChild} from '@angular/core';
import {ComponentFixture, fakeAsync, flush, TestBed} from '@angular/core/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations';
import {DateAdapter, provideNativeDateAdapter} from '@angular/material/core';
import {
cle... | {
"end_byte": 5040,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.spec.ts"
} |
components/src/material/timepicker/timepicker.spec.ts_5044_11447 | describe('input behavior', () => {
it('should reformat the input value when the model changes', () => {
const fixture = TestBed.createComponent(StandaloneTimepicker);
const input = getInput(fixture);
fixture.componentInstance.value.set(createTime(13, 45));
fixture.detectChanges();
expe... | {
"end_byte": 11447,
"start_byte": 5044,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.spec.ts"
} |
components/src/material/timepicker/timepicker.spec.ts_11451_16847 | describe('opening and closing', () => {
it('should open the timepicker on click', () => {
const fixture = TestBed.createComponent(StandaloneTimepicker);
fixture.detectChanges();
getInput(fixture).click();
fixture.detectChanges();
expect(getPanel()).toBeTruthy();
});
it('should... | {
"end_byte": 16847,
"start_byte": 11451,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.spec.ts"
} |
components/src/material/timepicker/timepicker.spec.ts_16850_22931 | describe('panel options behavior', () => {
it('should set the selected state of the options based on the input value', () => {
const getStates = () => {
return getOptions().map(
o => `${o.textContent} - ${o.classList.contains('mdc-list-item--selected')}`,
);
};
const fixt... | {
"end_byte": 22931,
"start_byte": 16850,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.spec.ts"
} |
components/src/material/timepicker/timepicker.spec.ts_22935_31650 | describe('accessibility', () => {
it('should set the correct roles', () => {
const fixture = TestBed.createComponent(StandaloneTimepicker);
const input = getInput(fixture);
fixture.detectChanges();
input.click();
fixture.detectChanges();
const panel = getPanel();
const opti... | {
"end_byte": 31650,
"start_byte": 22935,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.spec.ts"
} |
components/src/material/timepicker/timepicker.spec.ts_31654_40800 | describe('forms integration', () => {
it('should propagate value typed into the input to the form control', () => {
const fixture = TestBed.createComponent(TimepickerWithForms);
const input = getInput(fixture);
const control = fixture.componentInstance.control;
fixture.detectChanges();
... | {
"end_byte": 40800,
"start_byte": 31654,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.spec.ts"
} |
components/src/material/timepicker/timepicker.spec.ts_40804_49107 | describe('timepicker toggle', () => {
it('should open the timepicker when clicking the toggle', () => {
const fixture = TestBed.createComponent(StandaloneTimepicker);
fixture.detectChanges();
expect(getPanel()).toBeFalsy();
getToggle(fixture).click();
fixture.detectChanges();
ex... | {
"end_byte": 49107,
"start_byte": 40804,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.spec.ts"
} |
components/src/material/timepicker/timepicker-toggle.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 {
booleanAttribute,
ChangeDetectionStrategy,
Component,
HostAttributeToken,
inject,
input,
Inpu... | {
"end_byte": 2623,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker-toggle.ts"
} |
components/src/material/timepicker/util.spec.ts_0_6251 | import {TestBed} from '@angular/core/testing';
import {
DateAdapter,
MAT_DATE_FORMATS,
MatDateFormats,
provideNativeDateAdapter,
} from '@angular/material/core';
import {generateOptions, parseInterval} from './util';
describe('timepicker utilities', () => {
describe('parseInterval', () => {
it('should pa... | {
"end_byte": 6251,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/util.spec.ts"
} |
components/src/material/timepicker/public-api.ts_0_432 | /**
* @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 './timepicker';
export * from './timepicker-input';
export * from './timepicker-toggle';
export * from... | {
"end_byte": 432,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/public-api.ts"
} |
components/src/material/timepicker/timepicker.ts_0_2534 | /**
* @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 {
afterNextRender,
AfterRenderRef,
booleanAttribute,
ChangeDetectionStrategy,
Component,
effect,
... | {
"end_byte": 2534,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.ts"
} |
components/src/material/timepicker/timepicker.ts_2535_10441 | class MatTimepicker<D> implements OnDestroy, MatOptionParentComponent {
private _overlay = inject(Overlay);
private _dir = inject(Directionality, {optional: true});
private _viewContainerRef = inject(ViewContainerRef);
private _injector = inject(Injector);
private _defaultConfig = inject(MAT_TIMEPICKER_CONFIG... | {
"end_byte": 10441,
"start_byte": 2535,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.ts"
} |
components/src/material/timepicker/timepicker.ts_10444_14437 | private _generateOptions(): void {
// Default the interval to 30 minutes.
const interval = this.interval() ?? 30 * 60;
const options = this.options();
if (options !== null) {
this._timeOptions = options;
} else {
const adapter = this._dateAdapter;
const timeFormat = this._dateForm... | {
"end_byte": 14437,
"start_byte": 10444,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.ts"
} |
components/src/material/timepicker/README.md_0_102 | Please see the official documentation at https://material.angular.dev/components/component/timepicker
| {
"end_byte": 102,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/README.md"
} |
components/src/material/timepicker/timepicker-module.ts_0_671 | /**
* @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 {NgModule} from '@angular/core';
import {CdkScrollableModule} from '@angular/cdk/scrolling';
import {MatTimep... | {
"end_byte": 671,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker-module.ts"
} |
components/src/material/timepicker/util.ts_0_4193 | /**
* @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 {InjectionToken} from '@angular/core';
import {DateAdapter, MatDateFormats} from '@angular/material/core';
/... | {
"end_byte": 4193,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/util.ts"
} |
components/src/material/timepicker/BUILD.bazel_0_1753 | 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 = "timepicker",
srcs = glob(
["**/*.ts"],
... | {
"end_byte": 1753,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/BUILD.bazel"
} |
components/src/material/timepicker/timepicker.html_0_435 | <ng-template #panelTemplate>
<div
role="listbox"
class="mat-timepicker-panel"
[attr.aria-label]="ariaLabel() || null"
[attr.aria-labelledby]="_getAriaLabelledby()"
[id]="panelId"
@panel>
@for (option of _timeOptions; track option.value) {
<mat-option
[value]="option.value"
... | {
"end_byte": 435,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.html"
} |
components/src/material/timepicker/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/timepicker/index.ts"
} |
components/src/material/timepicker/timepicker-toggle.html_0_920 | <button
mat-icon-button
type="button"
aria-haspopup="listbox"
[attr.aria-label]="ariaLabel()"
[attr.aria-expanded]="timepicker().isOpen()"
[attr.tabindex]="disabled() ? -1 : tabIndex()"
[disabled]="disabled()"
[disableRipple]="disableRipple()">
<ng-content select="[matTimepickerToggleIcon]">
<svg... | {
"end_byte": 920,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker-toggle.html"
} |
components/src/material/timepicker/timepicker.scss_0_1665 | @use '@angular/cdk';
@use '../core/tokens/token-utils';
@use '../core/tokens/m2/mat/timepicker' as tokens-mat-timepicker;
mat-timepicker {
display: none;
}
.mat-timepicker-panel {
width: 100%;
max-height: 256px;
transform-origin: center top;
overflow: auto;
padding: 8px 0;
box-sizing: border-box;
@in... | {
"end_byte": 1665,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/timepicker.scss"
} |
components/src/material/timepicker/testing/timepicker-input-harness.spec.ts_0_6791 | import {HarnessLoader, parallel} from '@angular/cdk/testing';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
import {Component, signal} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {NoopAnimationsModule} from '@angular/platform-browser/animations... | {
"end_byte": 6791,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/timepicker-input-harness.spec.ts"
} |
components/src/material/timepicker/testing/public-api.ts_0_377 | /**
* @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 './timepicker-harness';
export * from './timepicker-harness-filters';
export * from './timepicker-inpu... | {
"end_byte": 377,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/public-api.ts"
} |
components/src/material/timepicker/testing/timepicker-harness-filters.ts_0_940 | /**
* @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": 940,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/timepicker-harness-filters.ts"
} |
components/src/material/timepicker/testing/timepicker-toggle-harness.spec.ts_0_2458 | import {Component, signal} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {HarnessLoader} from '@angular/cdk/testing';
import {DateAdapter, provideNativeDateAdapter} from '@angular/material/core';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/testbed';
impo... | {
"end_byte": 2458,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/timepicker-toggle-harness.spec.ts"
} |
components/src/material/timepicker/testing/timepicker-toggle-harness.ts_0_1940 | /**
* @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, HarnessPredicate} from '@angular/cdk/testing';
import {coerceBooleanProperty} from '@angul... | {
"end_byte": 1940,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/timepicker-toggle-harness.ts"
} |
components/src/material/timepicker/testing/timepicker-harness.spec.ts_0_3323 | import {Component, signal} from '@angular/core';
import {ComponentFixture, TestBed} from '@angular/core/testing';
import {HarnessLoader, parallel} from '@angular/cdk/testing';
import {DateAdapter, provideNativeDateAdapter} from '@angular/material/core';
import {TestbedHarnessEnvironment} from '@angular/cdk/testing/test... | {
"end_byte": 3323,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/timepicker-harness.spec.ts"
} |
components/src/material/timepicker/testing/BUILD.bazel_0_899 | 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": 899,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/BUILD.bazel"
} |
components/src/material/timepicker/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/timepicker/testing/index.ts"
} |
components/src/material/timepicker/testing/timepicker-harness.ts_0_2445 | /**
* @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,
ComponentHarnessConstructor,
HarnessPredicate,
} from '@angular/cdk/testing';
impor... | {
"end_byte": 2445,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/timepicker-harness.ts"
} |
components/src/material/timepicker/testing/timepicker-input-harness.ts_0_4756 | /**
* @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,
ComponentHarnessConstructor,
HarnessPredicate,
TestKey,
} from '@angular/cdk/test... | {
"end_byte": 4756,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/timepicker/testing/timepicker-input-harness.ts"
} |
components/src/material/tooltip/module.ts_0_847 | /**
* @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 {NgModule} from '@angular/core';
import {A11yModule} from '@angular/cdk/a11y';
import {OverlayModule} from '@... | {
"end_byte": 847,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/module.ts"
} |
components/src/material/tooltip/_tooltip-theme.scss_0_3247 | @use '../core/style/sass-utils';
@use '../core/theming/theming';
@use '../core/theming/inspection';
@use '../core/theming/validation';
@use '../core/tokens/token-utils';
@use '../core/typography/typography';
@use '../core/tokens/m2/mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
@mixin base($theme) {
@if inspection.... | {
"end_byte": 3247,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/_tooltip-theme.scss"
} |
components/src/material/tooltip/public-api.ts_0_295 | /**
* @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 './tooltip';
export * from './tooltip-animations';
export * from './module';
| {
"end_byte": 295,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/public-api.ts"
} |
components/src/material/tooltip/tooltip-animations.ts_0_1003 | /**
* @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 {
animate,
AnimationTriggerMetadata,
state,
style,
transition,
trigger,
} from '@angular/animation... | {
"end_byte": 1003,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip-animations.ts"
} |
components/src/material/tooltip/tooltip.scss_0_3401 | @use '../core/tokens/m2/mdc/plain-tooltip' as tokens-mdc-plain-tooltip;
@use '../core/tokens/token-utils';
.mat-mdc-tooltip {
// We don't use MDC's positioning so this has to be relative.
position: relative;
transform: scale(0);
display: inline-flex;
// Increases the area of the tooltip so the user's pointe... | {
"end_byte": 3401,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.scss"
} |
components/src/material/tooltip/README.md_0_98 | Please see the official documentation at https://material.angular.io/components/component/tooltip
| {
"end_byte": 98,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/README.md"
} |
components/src/material/tooltip/tooltip.ts_0_5752 | /**
* @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 {takeUntil} from 'rxjs/operators';
import {
BooleanInput,
coerceBooleanProperty,
coerceNumberProperty,
... | {
"end_byte": 5752,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.ts"
} |
components/src/material/tooltip/tooltip.ts_5753_14359 | class MatTooltip implements OnDestroy, AfterViewInit {
private _overlay = inject(Overlay);
private _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);
private _scrollDispatcher = inject(ScrollDispatcher);
private _viewContainerRef = inject(ViewContainerRef);
private _ngZone = inject(NgZone);
private ... | {
"end_byte": 14359,
"start_byte": 5753,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.ts"
} |
components/src/material/tooltip/tooltip.ts_14363_22552 | /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */
show(delay: number = this.showDelay, origin?: {x: number; y: number}): void {
if (this.disabled || !this.message || this._isTooltipVisible()) {
this._tooltipInstance?._cancelPendingAnimations();
return;
... | {
"end_byte": 22552,
"start_byte": 14363,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.ts"
} |
components/src/material/tooltip/tooltip.ts_22555_30582 | private _updateTooltipMessage() {
// Must wait for the message to be painted to the tooltip so that the overlay can properly
// calculate the correct positioning based on the size of the text.
if (this._tooltipInstance) {
this._tooltipInstance.message = this.message;
this._tooltipInstance._markF... | {
"end_byte": 30582,
"start_byte": 22555,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.ts"
} |
components/src/material/tooltip/tooltip.ts_30585_39185 | private _syncAriaDescription(oldMessage: string): void {
if (this._ariaDescriptionPending) {
return;
}
this._ariaDescriptionPending = true;
this._ariaDescriber.removeDescription(this._elementRef.nativeElement, oldMessage, 'tooltip');
this._ngZone.runOutsideAngular(() => {
// The `AriaD... | {
"end_byte": 39185,
"start_byte": 30585,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.ts"
} |
components/src/material/tooltip/tooltip.zone.spec.ts_0_3129 | import {Directionality} from '@angular/cdk/bidi';
import {CdkScrollable, OverlayModule} from '@angular/cdk/overlay';
import {dispatchFakeEvent} from '@angular/cdk/testing/private';
import {
Component,
DebugElement,
NgZone,
ViewChild,
provideZoneChangeDetection,
} from '@angular/core';
import {ComponentFixture... | {
"end_byte": 3129,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.zone.spec.ts"
} |
components/src/material/tooltip/tooltip.spec.ts_0_1113 | import {FocusMonitor} from '@angular/cdk/a11y';
import {Direction, Directionality} from '@angular/cdk/bidi';
import {ESCAPE} from '@angular/cdk/keycodes';
import {CdkScrollable, OverlayContainer, OverlayModule} from '@angular/cdk/overlay';
import {Platform} from '@angular/cdk/platform';
import {
createFakeEvent,
cr... | {
"end_byte": 1113,
"start_byte": 0,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.spec.ts"
} |
components/src/material/tooltip/tooltip.spec.ts_1115_10896 | describe('MatTooltip', () => {
let overlayContainerElement: HTMLElement;
let dir: {value: Direction; change: Subject<Direction>};
let platform: Platform;
let focusMonitor: FocusMonitor;
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
imports: [
MatTooltipModule,
Ove... | {
"end_byte": 10896,
"start_byte": 1115,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.spec.ts"
} |
components/src/material/tooltip/tooltip.spec.ts_10902_19685 | it('should be able to override the default positionAtOrigin', async () => {
// We don't bind mouse events on mobile devices.
if (platform.IOS || platform.ANDROID) {
return;
}
TestBed.resetTestingModule().configureTestingModule({
imports: [MatTooltipModule, OverlayModule],
... | {
"end_byte": 19685,
"start_byte": 10902,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.spec.ts"
} |
components/src/material/tooltip/tooltip.spec.ts_19691_29239 | it('should allow extra classes to be set on the tooltip', fakeAsync(() => {
assertTooltipInstance(tooltipDirective, false);
tooltipDirective.show();
tick(0); // Tick for the show delay (default is 0)
fixture.detectChanges();
// Make sure classes aren't prematurely added
let tooltip... | {
"end_byte": 29239,
"start_byte": 19691,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.spec.ts"
} |
components/src/material/tooltip/tooltip.spec.ts_29245_39096 | it('should hide when clicking away with an auxilliary button', fakeAsync(() => {
tooltipDirective.show();
tick(0);
fixture.detectChanges();
finishCurrentTooltipAnimation(overlayContainerElement, true);
expect(tooltipDirective._isTooltipVisible()).toBe(true);
expect(overlayContainerE... | {
"end_byte": 39096,
"start_byte": 29245,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.spec.ts"
} |
components/src/material/tooltip/tooltip.spec.ts_39102_47668 | it('should not hide on mouseleave if the pointer goes from the trigger to the tooltip', fakeAsync(() => {
// We don't bind mouse events on mobile devices.
if (platform.IOS || platform.ANDROID) {
return;
}
dispatchMouseEvent(fixture.componentInstance.button.nativeElement, 'mouseenter');
... | {
"end_byte": 47668,
"start_byte": 39102,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.spec.ts"
} |
components/src/material/tooltip/tooltip.spec.ts_47672_55550 | describe('touch gestures', () => {
beforeEach(() => {
platform.ANDROID = true;
});
it('should have a delay when showing on touchstart', fakeAsync(() => {
const fixture = TestBed.createComponent(BasicTooltipDemo);
fixture.detectChanges();
const button: HTMLButtonElement = fixture.nat... | {
"end_byte": 55550,
"start_byte": 47672,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.spec.ts"
} |
components/src/material/tooltip/tooltip.spec.ts_55554_64016 | describe('mouse wheel handling', () => {
it('should close when a wheel event causes the cursor to leave the trigger', fakeAsync(() => {
// We don't bind wheel events on mobile devices.
if (platform.IOS || platform.ANDROID) {
return;
}
const fixture = TestBed.createComponent(BasicToo... | {
"end_byte": 64016,
"start_byte": 55554,
"url": "https://github.com/angular/components/blob/main/src/material/tooltip/tooltip.spec.ts"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.