RED-5875: Upgrade to new Angular Material components (dialog)
This commit is contained in:
parent
35386f60e0
commit
d45fd37af4
@ -1,7 +1,8 @@
|
|||||||
@use 'common-mixins';
|
@use 'common-mixins';
|
||||||
|
|
||||||
.mat-dialog-container {
|
.mat-mdc-dialog-container .mdc-dialog__surface {
|
||||||
display: flex !important;
|
display: flex !important;
|
||||||
|
flex-direction: row;
|
||||||
color: var(--iqser-text);
|
color: var(--iqser-text);
|
||||||
background-color: var(--iqser-background);
|
background-color: var(--iqser-background);
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
|||||||
@ -16,7 +16,6 @@ import { IqserScrollbarModule } from './scrollbar';
|
|||||||
import { IqserEmptyStatesModule } from './empty-states';
|
import { IqserEmptyStatesModule } from './empty-states';
|
||||||
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
||||||
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
import { MatLegacyButtonModule as MatButtonModule } from '@angular/material/legacy-button';
|
||||||
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
|
|
||||||
import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox';
|
import { MatLegacyCheckboxModule as MatCheckboxModule } from '@angular/material/legacy-checkbox';
|
||||||
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
|
import { MatLegacyProgressBarModule as MatProgressBarModule } from '@angular/material/legacy-progress-bar';
|
||||||
import { ConfirmationDialogComponent } from './dialog';
|
import { ConfirmationDialogComponent } from './dialog';
|
||||||
@ -24,6 +23,7 @@ import { MatLegacyTooltipModule as MatTooltipModule } from '@angular/material/le
|
|||||||
import { ApiPathInterceptor, DefaultUserPreferenceService, IqserConfigService, IqserUserPreferenceService } from './services';
|
import { ApiPathInterceptor, DefaultUserPreferenceService, IqserConfigService, IqserUserPreferenceService } from './services';
|
||||||
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
import { HTTP_INTERCEPTORS, HttpClientModule } from '@angular/common/http';
|
||||||
import { IqserSkeletonModule } from './skeleton/skeleton.module';
|
import { IqserSkeletonModule } from './skeleton/skeleton.module';
|
||||||
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
|
|
||||||
const matModules = [
|
const matModules = [
|
||||||
MatIconModule,
|
MatIconModule,
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Directive, HostListener, inject, OnDestroy } from '@angular/core';
|
import { Directive, HostListener, inject, OnDestroy } from '@angular/core';
|
||||||
import { MatLegacyDialog as MatDialog, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
|
||||||
import { hasFormChanged, IqserEventTarget } from '../utils';
|
import { hasFormChanged, IqserEventTarget } from '../utils';
|
||||||
import { ConfirmOptions } from '.';
|
import { ConfirmOptions } from '.';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { MatLegacyDialog as MatDialog, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||||
import { DialogConfig, DialogService } from '../services';
|
import { DialogConfig, DialogService } from '../services';
|
||||||
import { ConfirmationDialogComponent, ConfirmationDialogInput, TitleColors } from '.';
|
import { ConfirmationDialogComponent, ConfirmationDialogInput, TitleColors } from '.';
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { ChangeDetectionStrategy, Component, HostListener, Inject, TemplateRef } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, HostListener, Inject, TemplateRef } from '@angular/core';
|
||||||
import { MAT_LEGACY_DIALOG_DATA as MAT_DIALOG_DATA, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
import { marker as _ } from '@biesbjerg/ngx-translate-extract-marker';
|
||||||
import { IconButtonTypes } from '../../buttons';
|
import { IconButtonTypes } from '../../buttons';
|
||||||
|
|||||||
@ -1,7 +1,6 @@
|
|||||||
import { ModuleWithProviders, NgModule } from '@angular/core';
|
import { ModuleWithProviders, NgModule } from '@angular/core';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { MatLegacyDialogModule as MatDialogModule } from '@angular/material/legacy-dialog';
|
|
||||||
import { HelpModeDialogComponent } from './help-mode-dialog/help-mode-dialog.component';
|
import { HelpModeDialogComponent } from './help-mode-dialog/help-mode-dialog.component';
|
||||||
import { HelpModeComponent } from './help-mode/help-mode.component';
|
import { HelpModeComponent } from './help-mode/help-mode.component';
|
||||||
import { HelpModeDirective } from './help-mode.directive';
|
import { HelpModeDirective } from './help-mode.directive';
|
||||||
@ -11,6 +10,7 @@ import { HelpButtonComponent } from './help-button/help-button.component';
|
|||||||
import { HelpModeService } from './help-mode.service';
|
import { HelpModeService } from './help-mode.service';
|
||||||
import { HelpDocs } from './help-docs';
|
import { HelpDocs } from './help-docs';
|
||||||
import { HELP_DOCS } from './tokens';
|
import { HELP_DOCS } from './tokens';
|
||||||
|
import { MatDialogModule } from '@angular/material/dialog';
|
||||||
|
|
||||||
const matModules = [MatDialogModule];
|
const matModules = [MatDialogModule];
|
||||||
const components = [HelpModeComponent, HelpModeDialogComponent, HelpModeDirective, HelpButtonComponent];
|
const components = [HelpModeComponent, HelpModeDialogComponent, HelpModeDirective, HelpButtonComponent];
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
import { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';
|
import { Inject, Injectable, Renderer2, RendererFactory2 } from '@angular/core';
|
||||||
import { MatLegacyDialog as MatDialog, MatLegacyDialogRef as MatDialogRef } from '@angular/material/legacy-dialog';
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
||||||
import { TranslateService } from '@ngx-translate/core';
|
import { TranslateService } from '@ngx-translate/core';
|
||||||
import { BehaviorSubject, firstValueFrom } from 'rxjs';
|
import { BehaviorSubject, firstValueFrom } from 'rxjs';
|
||||||
import { HelpModeDialogComponent } from './help-mode-dialog/help-mode-dialog.component';
|
import { HelpModeDialogComponent } from './help-mode-dialog/help-mode-dialog.component';
|
||||||
@ -121,7 +121,13 @@ export class HelpModeService {
|
|||||||
overlappingElements: OverlappingElement[],
|
overlappingElements: OverlappingElement[],
|
||||||
dialogElement: boolean,
|
dialogElement: boolean,
|
||||||
): void {
|
): void {
|
||||||
this._helperElements[helperElementName] = { element, helperElement, scrollableParentView, overlappingElements, dialogElement };
|
this._helperElements[helperElementName] = {
|
||||||
|
element,
|
||||||
|
helperElement,
|
||||||
|
scrollableParentView,
|
||||||
|
overlappingElements,
|
||||||
|
dialogElement,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
updateHelperElements() {
|
updateHelperElements() {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { ChangeDetectionStrategy, Component, HostListener } from '@angular/core';
|
import { ChangeDetectionStrategy, Component, HostListener } from '@angular/core';
|
||||||
import { HelpModeService } from '../help-mode.service';
|
import { HelpModeService } from '../help-mode.service';
|
||||||
import { IqserEventTarget } from '../../utils';
|
import { IqserEventTarget } from '../../utils';
|
||||||
import { MatLegacyDialog as MatDialog } from '@angular/material/legacy-dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'iqser-help-mode',
|
selector: 'iqser-help-mode',
|
||||||
|
|||||||
@ -1,9 +1,5 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import {
|
import { MatDialog, MatDialogConfig, MatDialogRef } from '@angular/material/dialog';
|
||||||
MatLegacyDialog as MatDialog,
|
|
||||||
MatLegacyDialogConfig as MatDialogConfig,
|
|
||||||
MatLegacyDialogRef as MatDialogRef,
|
|
||||||
} from '@angular/material/legacy-dialog';
|
|
||||||
import { ComponentType } from '@angular/cdk/portal';
|
import { ComponentType } from '@angular/cdk/portal';
|
||||||
import { mergeMap } from 'rxjs/operators';
|
import { mergeMap } from 'rxjs/operators';
|
||||||
import { from } from 'rxjs';
|
import { from } from 'rxjs';
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user