mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
fix(devtools): Replace material imports and styles (#48420)
In the #48216 Material deps were updated to v15, but the components and modules in DevTools were not updated to MDC nor replaced with the legacy definitions. PR Close #48420
This commit is contained in:
committed by
Jessica Janiuk
parent
f7aa210f5a
commit
fccf32cd50
@@ -8,8 +8,8 @@
|
||||
|
||||
/// <reference types="resize-observer-browser" />
|
||||
import {AfterViewInit, Component, Input, OnDestroy, OnInit, ViewChild} from '@angular/core';
|
||||
import {MatSlideToggleChange} from '@angular/material/slide-toggle';
|
||||
import {MatTabNav} from '@angular/material/tabs';
|
||||
import {MatLegacySlideToggleChange as MatSlideToggleChange} from '@angular/material/legacy-slide-toggle';
|
||||
import {MatLegacyTabNav as MatTabNav} from '@angular/material/legacy-tabs';
|
||||
import {Events, MessageBus, Route} from 'protocol';
|
||||
import {Subscription} from 'rxjs';
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatMenuModule} from '@angular/material/menu';
|
||||
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
|
||||
import {MatTabsModule} from '@angular/material/tabs';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyMenuModule as MatMenuModule} from '@angular/material/legacy-menu';
|
||||
import {MatLegacySlideToggleModule as MatSlideToggleModule} from '@angular/material/legacy-slide-toggle';
|
||||
import {MatLegacyTabsModule as MatTabsModule} from '@angular/material/legacy-tabs';
|
||||
import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip';
|
||||
|
||||
import {DevToolsTabsComponent} from './devtools-tabs.component';
|
||||
import {DirectiveExplorerModule} from './directive-explorer/directive-explorer.module';
|
||||
|
||||
+4
-4
@@ -9,11 +9,11 @@
|
||||
import {ScrollingModule} from '@angular/cdk/scrolling';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatSnackBarModule} from '@angular/material/snack-bar';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyCardModule as MatCardModule} from '@angular/material/legacy-card';
|
||||
import {MatLegacySnackBarModule as MatSnackBarModule} from '@angular/material/legacy-snack-bar';
|
||||
import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip';
|
||||
import {MatTreeModule} from '@angular/material/tree';
|
||||
|
||||
import {AngularSplitModule} from '../../vendor/angular-split/public_api';
|
||||
|
||||
+2
-2
@@ -8,9 +8,9 @@
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyCardModule as MatCardModule} from '@angular/material/legacy-card';
|
||||
|
||||
import {BreadcrumbsComponent} from './breadcrumbs.component';
|
||||
|
||||
|
||||
+2
-2
@@ -9,9 +9,9 @@
|
||||
import {ScrollingModule} from '@angular/cdk/scrolling';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyCardModule as MatCardModule} from '@angular/material/legacy-card';
|
||||
|
||||
import {BreadcrumbsModule} from './breadcrumbs/breadcrumbs.module';
|
||||
import {DirectiveForestComponent} from './directive-forest.component';
|
||||
|
||||
+2
-2
@@ -8,9 +8,9 @@
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyCardModule as MatCardModule} from '@angular/material/legacy-card';
|
||||
|
||||
import {FilterComponent} from './filter.component';
|
||||
|
||||
|
||||
+2
-2
@@ -8,10 +8,10 @@
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatExpansionModule} from '@angular/material/expansion';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip';
|
||||
|
||||
import {ComponentMetadataComponent} from './component-metadata.component';
|
||||
import {PropertyTabHeaderComponent} from './property-tab-header.component';
|
||||
|
||||
+2
-2
@@ -10,11 +10,11 @@ import {DragDropModule} from '@angular/cdk/drag-drop';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatExpansionModule} from '@angular/material/expansion';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip';
|
||||
import {MatToolbarModule} from '@angular/material/toolbar';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import {MatTreeModule} from '@angular/material/tree';
|
||||
|
||||
import {PropertyEditorComponent} from './property-editor.component';
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {Component, Inject} from '@angular/core';
|
||||
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
|
||||
import {MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef} from '@angular/material/legacy-dialog';
|
||||
|
||||
interface DialogData {
|
||||
profilerVersion?: number;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {Component, OnDestroy, OnInit} from '@angular/core';
|
||||
import {MatDialog} from '@angular/material/dialog';
|
||||
import {MatLegacyDialog as MatDialog} from '@angular/material/legacy-dialog';
|
||||
import {Events, MessageBus, ProfilerFrame} from 'protocol';
|
||||
import {Subject, Subscription} from 'rxjs';
|
||||
|
||||
|
||||
@@ -9,12 +9,12 @@
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
import {MatDialogModule} from '@angular/material/dialog';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatSelectModule} from '@angular/material/select';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyCardModule as MatCardModule} from '@angular/material/legacy-card';
|
||||
import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog';
|
||||
import {MatLegacySelectModule as MatSelectModule} from '@angular/material/legacy-select';
|
||||
import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip';
|
||||
|
||||
import {ProfilerImportDialogComponent} from './profiler-import-dialog.component';
|
||||
import {ProfilerComponent} from './profiler.component';
|
||||
|
||||
+2
-2
@@ -8,9 +8,9 @@
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
import {MatLegacyCardModule as MatCardModule} from '@angular/material/legacy-card';
|
||||
import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip';
|
||||
import {MatToolbarModule} from '@angular/material/toolbar';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import {NgxFlamegraphModule} from 'ngx-flamegraph';
|
||||
|
||||
import {AngularSplitModule} from '../../../../vendor/angular-split/public_api';
|
||||
|
||||
+8
-8
@@ -10,15 +10,15 @@ import {ScrollingModule} from '@angular/cdk/scrolling';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {MatButtonModule} from '@angular/material/button';
|
||||
import {MatCardModule} from '@angular/material/card';
|
||||
import {MatCheckboxModule} from '@angular/material/checkbox';
|
||||
import {MatDialogModule} from '@angular/material/dialog';
|
||||
import {MatIconModule} from '@angular/material/icon';
|
||||
import {MatInputModule} from '@angular/material/input';
|
||||
import {MatProgressBarModule} from '@angular/material/progress-bar';
|
||||
import {MatSelectModule} from '@angular/material/select';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import {MatLegacyButtonModule as MatButtonModule} from '@angular/material/legacy-button';
|
||||
import {MatLegacyCardModule as MatCardModule} from '@angular/material/legacy-card';
|
||||
import {MatLegacyCheckboxModule as MatCheckboxModule} from '@angular/material/legacy-checkbox';
|
||||
import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog';
|
||||
import {MatLegacyInputModule as MatInputModule} from '@angular/material/legacy-input';
|
||||
import {MatLegacyProgressBarModule as MatProgressBarModule} from '@angular/material/legacy-progress-bar';
|
||||
import {MatLegacySelectModule as MatSelectModule} from '@angular/material/legacy-select';
|
||||
import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip';
|
||||
import {NgxFlamegraphModule} from 'ngx-flamegraph';
|
||||
|
||||
import {FrameSelectorComponent} from './frame-selector.component';
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatDialogModule} from '@angular/material/dialog';
|
||||
import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog';
|
||||
import {MatSelectModule} from '@angular/material/select';
|
||||
|
||||
import {RouterTreeComponent} from './router-tree.component';
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
|
||||
import {MatTooltipModule} from '@angular/material/tooltip';
|
||||
import {MatLegacyProgressSpinnerModule as MatProgressSpinnerModule} from '@angular/material/legacy-progress-spinner';
|
||||
import {MatLegacyTooltipModule as MatTooltipModule} from '@angular/material/legacy-tooltip';
|
||||
|
||||
import {DevToolsTabModule} from './devtools-tabs/devtools-tabs.module';
|
||||
import {DevToolsComponent} from './devtools.component';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {Component} from '@angular/core';
|
||||
import {MatDialog} from '@angular/material/dialog';
|
||||
import {MatLegacyDialog as MatDialog} from '@angular/material/legacy-dialog';
|
||||
|
||||
import {DialogComponent} from './dialog.component';
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {FormsModule} from '@angular/forms';
|
||||
import {MatDialogModule} from '@angular/material/dialog';
|
||||
import {MatFormFieldModule} from '@angular/material/form-field';
|
||||
import {MatInputModule} from '@angular/material/input';
|
||||
import {MatLegacyDialogModule as MatDialogModule} from '@angular/material/legacy-dialog';
|
||||
import {MatLegacyFormFieldModule as MatFormFieldModule} from '@angular/material/legacy-form-field';
|
||||
import {MatLegacyInputModule as MatInputModule} from '@angular/material/legacy-input';
|
||||
import {RouterModule} from '@angular/router';
|
||||
|
||||
import {AppTodoComponent} from './app-todo.component';
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*/
|
||||
|
||||
import {Component, Inject} from '@angular/core';
|
||||
import {MAT_DIALOG_DATA, MatDialogRef} from '@angular/material/dialog';
|
||||
import {MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef} from '@angular/material/legacy-dialog';
|
||||
|
||||
export interface DialogData {
|
||||
animal: string;
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
@use 'sass:map';
|
||||
@use 'external/npm/node_modules/@angular/material/index' as mat;
|
||||
@include mat.core();
|
||||
@include mat.all-legacy-component-typographies();
|
||||
@include mat.legacy-core();
|
||||
|
||||
html,
|
||||
body {
|
||||
@@ -39,9 +40,9 @@ $dark-theme: map.deep-merge(
|
||||
);
|
||||
|
||||
.light-theme {
|
||||
@include mat.all-component-themes($light-theme);
|
||||
@include mat.all-legacy-component-themes($light-theme);
|
||||
}
|
||||
|
||||
.dark-theme {
|
||||
@include mat.all-component-themes($dark-theme);
|
||||
@include mat.all-legacy-component-themes($dark-theme);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user