@angular/material/dialog#MatDialog TypeScript Examples
The following examples show how to use
@angular/material/dialog#MatDialog.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: mission-single.component.ts From Smersh with MIT License | 6 votes |
constructor(
private route: ActivatedRoute,
private burp: ConfigService,
private _snackBar: MatSnackBar,
public dialog: MatDialog,
private hostsService: HostsService,
private stepsService: StepsService,
private router: Router,
private missionsService: MissionsService,
private uploadServices: UploadsService,
private fb: FormBuilder
) {
this.missionId = this.router.url.split('/').pop();
}
Example #2
Source File: bom-grouped-license-modules.component.ts From barista with Apache License 2.0 | 6 votes |
constructor(
private authService: AuthService,
private projectApiService: ProjectApiService,
public dialog: MatDialog,
public dialogRef: MatDialogRef<BomGroupedLicenseModulesComponent>,
private messageService: BomLicenseExceptionOperationMessageService,
) {
messageService
.get()
.pipe(untilDestroyed(this))
.subscribe(() => {
this.dialogRef.close();
});
}
Example #3
Source File: emote.component.ts From App with MIT License | 6 votes |
constructor(
@Inject(DOCUMENT) private document: Document,
private metaService: Meta,
private restService: RestService,
private route: ActivatedRoute,
private router: Router,
private cdr: ChangeDetectorRef,
private dialog: MatDialog,
private appService: AppService,
private emoteListService: EmoteListService,
private dataService: DataService,
public themingService: ThemingService,
public clientService: ClientService
) { }
Example #4
Source File: hero-select-dialog.component.ts From colo-calc with Do What The F*ck You Want To Public License | 6 votes |
constructor(
public dialogRef: MatDialogRef<HeroSelectDialogComponent>,
@Inject(MAT_DIALOG_DATA) public data: HeroSelectDialogData,
private characterService: CharacterService,
private localStorageService: LocalStorageService,
private dialog: MatDialog
) {
console.log(data);
if (this.data.party) {
this.selectedChars = this.data.party.tiles.reduce((acc, tile) => {
if (tile.character) {
acc.push(tile.character);
}
return acc;
}, []);
}
// Filter those out by default
if (this.onlyUniques === null) {
this.onlyUniques = true;
}
// Enable by default
if (this.separateByElement === null) {
this.separateByElement = true;
}
this.toggleRares();
this.filterField.valueChanges.subscribe(() => {
this.updateFilters();
});
}
Example #5
Source File: alert-list.component.ts From VIR with MIT License | 6 votes |
constructor(
private readonly changeDetectorRef: ChangeDetectorRef,
private readonly dataStore: DataStore,
private readonly dataAnalyzer: DataAnalyzer,
private readonly dialog: MatDialog,
private readonly zone: NgZone,
private readonly home: HomeComponent,
) {
this.alertActionCtx = {
showItemInItems: (itemID: ItemID) => {
this.home.showInItems(itemID)
},
showItemInQueue: (itemID: ItemID) => {
this.home.showInQueue(itemID)
},
editItem: (itemID: ItemID) => {
const item = this.dataStore.getItem(itemID)
if (item === undefined) return
const dialogRef = this.dialog.open(ItemDetailsComponent, {
width: ItemDetailsComponent.DIALOG_WIDTH,
data: {item},
hasBackdrop: true,
disableClose: false,
autoFocus: false,
})
},
dataStore: this.dataStore,
}
}
Example #6
Source File: my-addon-status-cell.component.ts From WowUp with GNU General Public License v3.0 | 6 votes |
public constructor(
private _dialog: MatDialog,
private _addonService: AddonService,
private _translateService: TranslateService,
private _ngZone: NgZone
) {
this._addonService.addonInstalled$
.pipe(
takeUntil(this._destroy$),
filter(
(evt) =>
evt.addon.externalId === this.listItem.addon?.externalId &&
evt.addon.providerName === this.listItem.addon?.providerName
)
)
.subscribe((evt) => {
this._ngZone.run(() => {
this.installState = evt.installState;
this.installProgress = evt.progress;
if (evt.installState !== AddonInstallState.Complete) {
this.showStatusText = false;
} else {
this.showStatusText = !AddonUtils.needsUpdate(evt.addon) || (this.listItem?.addon?.isIgnored ?? true);
}
this.statusText = this.getStatusText(evt.addon);
});
});
}
Example #7
Source File: login.component.ts From budget-angular with GNU General Public License v3.0 | 6 votes |
constructor(
private authService: AuthService,
private oauthService: OAuthService,
private formBuilder: FormBuilder,
private snackBar: MatSnackBar,
private dialog: MatDialog,
private route: ActivatedRoute,
private router: Router
) {}
Example #8
Source File: wallet-state-service.ts From bitcoin-s-ts with MIT License | 6 votes |
constructor(private dialog: MatDialog, private messageService: MessageService, private authService: AuthService,
private dlcService: DLCService, private offerService: OfferService, private addressService: AddressService,
private contactService: ContactService) {
this.dlcService.initialized.subscribe(v => {
if (v) this.checkInitialized()
})
this.offerService.initialized.subscribe(v => {
if (v) this.checkInitialized()
})
}
Example #9
Source File: create.component.ts From blockcore-hub with MIT License | 6 votes |
constructor(
private authService: AuthenticationService,
private appState: ApplicationStateService,
private router: Router,
private fb: FormBuilder,
private log: Logger,
public dialog: MatDialog,
public snackBar: MatSnackBar,
private globalService: GlobalService,
private apiService: ApiService) {
this.onGenerate();
}
Example #10
Source File: history-timeline.component.ts From attack-workbench-frontend with Apache License 2.0 | 6 votes |
constructor(private route: ActivatedRoute,
private router: Router,
private restAPIConnectorService: RestApiConnectorService,
private dialog: MatDialog,
private editorService: EditorService) {
this.onEditStopSubscription = this.editorService.onEditingStopped.subscribe({
next: () => { this.loadHistory(); }
})
}
Example #11
Source File: edit.ts From json-schema-form with Apache License 2.0 | 6 votes |
/**
* get access to parent object's fields
*
* @param schemaChange signal a change
* @param name the current property name (key)
* @param schema the current schema
* @param parent the parent's schema (required in order to change the order)
* @param dialog dialog service
*/
constructor(
private schemaChange: EventEmitter<void>, private name: string, private schema: Schema, private parent: Schema,
private dialog: MatDialog, private component: ComponentType<any>) {
}
Example #12
Source File: ranking.component.ts From oss-github-benchmark with GNU General Public License v3.0 | 6 votes |
constructor(
private dataService: DataService,
private route: ActivatedRoute,
public dialog: MatDialog,
private location: Location,
fb: FormBuilder
) {
this.sort = new MatSort();
this.sectorFilters.forEach(
(sector: { sector: string; activated: boolean }) => {
if (sector.activated) {
this.checkboxes.push(sector.sector);
}
}
);
}
Example #13
Source File: create.component.ts From EXOS-Core with MIT License | 6 votes |
constructor(
private authService: AuthenticationService,
private appState: ApplicationStateService,
private router: Router,
private fb: FormBuilder,
private log: Logger,
public dialog: MatDialog,
public snackBar: MatSnackBar,
private globalService: GlobalService,
private apiService: ApiService) {
this.onGenerate();
}
Example #14
Source File: upload-video.component.ts From assetMG with Apache License 2.0 | 6 votes |
// Used for upload csv option
// @ViewChild('fileInput')
// fileInput;
// file: File | null = null;
// onClickFileInputButton(): void {
// this.fileInput.nativeElement.click();
// }
// onChangeFileInput(): void {
// const files: { [key: string]: File } = this.fileInput.nativeElement.files;
// this.file = files[0];
// }
constructor(
private _formBuilder: FormBuilder,
private _configService: ConfigService,
private _uploadAssetService: UploadAssetService,
private _assetService: AssetService,
private _vidSelect: MatDialogRef<VideoSelectComponent>,
private dialog: MatDialog,
) {}
Example #15
Source File: tutorial-dialog.component.ts From bdc-walkthrough with MIT License | 5 votes |
constructor(private dialog: MatDialog,
private tutorialService: BdcWalkService) { }
Example #16
Source File: app.component.ts From Smersh with MIT License | 5 votes |
constructor(
private http: HttpClient,
private router: Router,
private dialog: MatDialog,
private themeService: ThemeService
) {}
Example #17
Source File: background.component.ts From league-profile-tool with MIT License | 5 votes |
constructor(public dialog: MatDialog, private lcuConnectionService: LCUConnectionService, private version: VersionService, private championData: ChampionService) {
}
Example #18
Source File: playlist-editor.component.ts From ng-spotify-importer with GNU General Public License v3.0 | 5 votes |
constructor(
private spotifyService: SpotifyService,
private notificationService: NotificationService,
private dialog: MatDialog) {
}
Example #19
Source File: bom-manual-license-details.component.ts From barista with Apache License 2.0 | 5 votes |
constructor(
public dialogRef: MatDialogRef<BomManualLicenseDetailsDialogComponent>,
private dialog: MatDialog,
public bomManualLicenseApiService: BomManualLicenseApiService,
public licenseApiService: LicenseApiService,
) {
super();
}
Example #20
Source File: installable-prompt.service.ts From Angular-Cookbook with MIT License | 5 votes |
constructor(private dialog: MatDialog) {
this.init();
}
Example #21
Source File: admin-mod-queue.component.ts From App with MIT License | 5 votes |
constructor(
public themingService: ThemingService,
private clientService: ClientService,
private router: Router,
private restService: RestService,
private dataService: DataService,
private dialog: MatDialog
) { }
Example #22
Source File: calculator.component.ts From colo-calc with Do What The F*ck You Want To Public License | 5 votes |
constructor(
private dialog: MatDialog,
private languageService: LanguageService,
private localStorageService: LocalStorageService,
private characterService: CharacterService,
private route: ActivatedRoute,
private changeDetectorRef: ChangeDetectorRef,
) { }
Example #23
Source File: day-view.component.ts From VIR with MIT License | 5 votes |
constructor(
private readonly dataStore: DataStore,
private readonly dataAnalyzer: DataAnalyzer,
private readonly dialog: MatDialog,
private readonly snackBar: MatSnackBar,
) {
}
Example #24
Source File: travel-tabs.component.ts From travel-list with MIT License | 5 votes |
constructor(
private apiService: ApiService,
public dialog: MatDialog,
) {
}
Example #25
Source File: app.component.ts From CloudeeCMS with Apache License 2.0 | 5 votes |
constructor(
public tabsSVC: TabsNavService,
private backendSVC: BackendService,
public dialog: MatDialog,
private ngZone: NgZone,
public usrSVC: UserLoginService,
private fileBrowserSVC: FileBrowserService
) { }
Example #26
Source File: app.component.ts From WowUp with GNU General Public License v3.0 | 5 votes |
public constructor(
private _addonService: AddonService,
private _addonProviderService: AddonProviderFactory,
private _analyticsService: AnalyticsService,
private _cdRef: ChangeDetectorRef,
private _dialog: MatDialog,
private _fileService: FileService,
private _preferenceStore: PreferenceStorageService,
private _snackbarService: SnackbarService,
private _translateService: TranslateService,
private _warcraftInstallationService: WarcraftInstallationService,
private _wowupAddonService: WowUpAddonService,
private _zoomService: ZoomService,
private _wowUpProtocolService: WowUpProtocolService,
public electronService: ElectronService,
public overlayContainer: OverlayContainer,
public sessionService: SessionService,
public wowUpService: WowUpService
) {
this._warcraftInstallationService.wowInstallations$
.pipe(
first((installations) => installations.length > 0),
switchMap(() => from(this.initializeAutoUpdate()))
)
.subscribe();
this.electronService.appUpdate$.subscribe((evt) => {
if (evt.state === AppUpdateState.Error) {
if (evt.error.indexOf("dev-app-update.yml") === -1) {
this._snackbarService.showErrorSnackbar("APP.WOWUP_UPDATE.UPDATE_ERROR");
}
} else if (evt.state === AppUpdateState.Downloaded) {
// Force the user to update when one is ready
const dialogRef = this._dialog.open(AlertDialogComponent, {
minWidth: 250,
disableClose: true,
data: {
title: this._translateService.instant("APP.WOWUP_UPDATE.INSTALL_TITLE"),
message: this._translateService.instant("APP.WOWUP_UPDATE.SNACKBAR_TEXT"),
positiveButton: "APP.WOWUP_UPDATE.DOWNLOADED_TOOLTIP",
positiveButtonColor: "primary",
positiveButtonStyle: "raised",
},
});
dialogRef
.afterClosed()
.pipe(first())
.subscribe(() => {
this.wowUpService.installUpdate();
});
}
});
this._wowUpProtocolService.initialize();
}