From 1e2466841de3f23edaf886144dc909235eb5695f Mon Sep 17 00:00:00 2001 From: Yin Zhang Date: Fri, 15 Sep 2023 18:03:57 -0700 Subject: [PATCH] Migration to use the new MDC-based Angular Components. Components migrated: checkbox PiperOrigin-RevId: 565822826 --- frontend/app/common/angular/BUILD | 2 +- frontend/app/components/graph_viewer/graph_config/BUILD | 2 +- .../graph_viewer/graph_config/graph_config_module.ts | 4 ++-- .../app/components/memory_viewer/memory_viewer_main/BUILD | 2 +- .../memory_viewer_main/memory_viewer_main_module.ts | 4 ++-- frontend/styles.scss | 1 + 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/frontend/app/common/angular/BUILD b/frontend/app/common/angular/BUILD index e39a0808..8330b484 100644 --- a/frontend/app/common/angular/BUILD +++ b/frontend/app/common/angular/BUILD @@ -91,7 +91,7 @@ ts_library( ) ts_library( - name = "angular_material_legacy_checkbox", + name = "angular_material_checkbox", srcs = [], deps = [ "@npm//@angular/material", diff --git a/frontend/app/components/graph_viewer/graph_config/BUILD b/frontend/app/components/graph_viewer/graph_config/BUILD index 63201ee1..26d9d555 100644 --- a/frontend/app/components/graph_viewer/graph_config/BUILD +++ b/frontend/app/components/graph_viewer/graph_config/BUILD @@ -19,11 +19,11 @@ xprof_ng_module( "@npm//@angular/forms", "@npm//rxjs", "@org_xprof//frontend/app/common/angular:angular_material_button", + "@org_xprof//frontend/app/common/angular:angular_material_checkbox", "@org_xprof//frontend/app/common/angular:angular_material_core", "@org_xprof//frontend/app/common/angular:angular_material_form_field", "@org_xprof//frontend/app/common/angular:angular_material_icon", "@org_xprof//frontend/app/common/angular:angular_material_input", - "@org_xprof//frontend/app/common/angular:angular_material_legacy_checkbox", "@org_xprof//frontend/app/common/angular:angular_material_legacy_tooltip", "@org_xprof//frontend/app/common/angular:angular_material_select", "@org_xprof//frontend/app/common/angular:angular_material_sidenav", diff --git a/frontend/app/components/graph_viewer/graph_config/graph_config_module.ts b/frontend/app/components/graph_viewer/graph_config/graph_config_module.ts index 34cc6681..66ee3767 100644 --- a/frontend/app/components/graph_viewer/graph_config/graph_config_module.ts +++ b/frontend/app/components/graph_viewer/graph_config/graph_config_module.ts @@ -3,7 +3,7 @@ import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {MatIconModule} from '@angular/material/icon'; import {MatButtonModule} from '@angular/material/button'; -import {MatLegacyCheckboxModule} from '@angular/material/legacy-checkbox'; +import {MatCheckboxModule} from '@angular/material/checkbox'; import {MatOptionModule} from '@angular/material/core'; import {MatFormFieldModule} from '@angular/material/form-field'; import {MatInputModule} from '@angular/material/input'; @@ -18,7 +18,7 @@ import {GraphConfig} from './graph_config'; CommonModule, FormsModule, MatButtonModule, - MatLegacyCheckboxModule, + MatCheckboxModule, MatFormFieldModule, MatIconModule, MatInputModule, diff --git a/frontend/app/components/memory_viewer/memory_viewer_main/BUILD b/frontend/app/components/memory_viewer/memory_viewer_main/BUILD index 05424fa0..1a97124b 100644 --- a/frontend/app/components/memory_viewer/memory_viewer_main/BUILD +++ b/frontend/app/components/memory_viewer/memory_viewer_main/BUILD @@ -18,9 +18,9 @@ xprof_ng_module( "@npm//@angular/forms", "@npm//@angular/router", "@npm//@ngrx/store", + "@org_xprof//frontend/app/common/angular:angular_material_checkbox", "@org_xprof//frontend/app/common/angular:angular_material_divider", "@org_xprof//frontend/app/common/angular:angular_material_icon", - "@org_xprof//frontend/app/common/angular:angular_material_legacy_checkbox", "@org_xprof//frontend/app/common/angular:angular_material_legacy_tooltip", "@org_xprof//frontend/app/common/interfaces", "@org_xprof//frontend/app/common/utils", diff --git a/frontend/app/components/memory_viewer/memory_viewer_main/memory_viewer_main_module.ts b/frontend/app/components/memory_viewer/memory_viewer_main/memory_viewer_main_module.ts index 93616f4c..f057b0fc 100644 --- a/frontend/app/components/memory_viewer/memory_viewer_main/memory_viewer_main_module.ts +++ b/frontend/app/components/memory_viewer/memory_viewer_main/memory_viewer_main_module.ts @@ -2,7 +2,7 @@ import {NgModule} from '@angular/core'; import {FormsModule} from '@angular/forms'; import {MatDividerModule} from '@angular/material/divider'; import {MatIconModule} from '@angular/material/icon'; -import {MatLegacyCheckboxModule} from '@angular/material/legacy-checkbox'; +import {MatCheckboxModule} from '@angular/material/checkbox'; import {MatLegacyTooltipModule} from '@angular/material/legacy-tooltip'; import {DiagnosticsViewModule} from 'org_xprof/frontend/app/components/diagnostics_view/diagnostics_view_module'; import {MaxHeapChartModule} from 'org_xprof/frontend/app/components/memory_viewer/max_heap_chart/max_heap_chart_module'; @@ -18,7 +18,7 @@ import {MemoryViewerMain} from './memory_viewer_main'; FormsModule, MatDividerModule, MaxHeapChartModule, - MatLegacyCheckboxModule, + MatCheckboxModule, MatIconModule, MatLegacyTooltipModule, ProgramOrderChartModule, diff --git a/frontend/styles.scss b/frontend/styles.scss index 9ca8ef4e..e8646e67 100644 --- a/frontend/styles.scss +++ b/frontend/styles.scss @@ -33,6 +33,7 @@ $theme: mat.define-light-theme( @include mat.core-theme($theme); @include mat.input-theme($theme); @include mat.form-field-theme($theme); +@include mat.checkbox-theme($theme); @include mat.select-theme($theme); html, body {