![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
dialog-service
Advanced tools
Reactive Angular modal dialogs. Create alert, confirmation, progress and form based dialogs without writing component templates.
Reactive Angular modal dialogs. Create alert, confirmation, progress and form based dialogs without writing component templates.
withAlert()
, withProgress()
, withConfirm()
, withForm()
.Before installing this library, you need an existing Angular application configured with Angular Material (or Material Web Components for Angular).
Add dialog-service
as an NPM dependency with npm install dialog-service
.
Import this module to your application:
import { MatDialogServiceModule } from 'dialog-service'
// import { MdcDialogServiceModule } from 'dialog-service'
@NgModule({
...
imports: [
// --- if you are using Angular Material
MatDialogServiceModule
// --- if you are using Material Web Components for Angular
// MdcDialogServiceModule
]
...
})
export class AppModule {
}
DialogService
to your components and call the withXxx()
functions.@Component()
export class AppComponent {
constructor (private dialogService: DialogService) {
}
doDemo() {
// no need to subscribe if not piping with additional operators
this.dialogService.withAlert('Hello!')
}
doDemo2() {
// need to subscribe for piped operators to run
this.dialogService.withAlert('Get ready...').pipe(
concatMap(() => this.dialogService.withAlert('Go!'))
).subscribe()
}
}
The DialogService class exposes functions used to create alert, confirmation, progress and form based dialogs.
withAlert (
title: string,
options?: {
content?: string
acceptButton?: string // defaults to 'OK'
}
): Observable<boolean>
Displays an alert dialog with optional title and content. User clicks OK to close the dialog.
Returns true after the dialog is closed. TODO: provide option to cancel the alert and return false.
withConfirm (
title?: string, // defaults to 'Confirm?'
options?: {
content?: string
acceptButton?: string // defaults to 'Yes'
cancelButton?: string // defaults to 'No
cancelMessage?: string // defaults to 'Cancel?'
}
): Observable<boolean>
Display confirmation dialog. The dialog will close when user clicks on either the accept or cancel button.
Returns true if user clicks on the acceptButton
and false if user clicks on cancelButton
.
withProgress<T = any> (
work: Observable<T>
title?: string // defaults to 'Please Wait...'
): Observable<T | undefined>
Display dialog with a spinner/progress bar that blocks UI interaction until processing of associated observable workload completes.
Returns the last value emitted by the workload. If workload throws error, progress dialog will close and return undefined.
withForm (
title: string,
fields: QuickFormField[],
options?: {
content?: string
submitButton?: string
cancelButton?: string
}
): Observable<any>
DialogService class exposes functions to create alert, confirmation, progress and form based dialogs.
The dialog will close and return form values (as a JSON object) when user clicks on submit button (provided all field validation passed).If user cancels the form, the dialog will close and return false. For documentation on QuickFormField, refer to ng-quick-form.
Reach out to me on Twitter at @kctang
MIT
[0.1.7] - 2019-06-27
valueChanges
.FAQs
Reactive Angular modal dialogs. Create alert, confirmation, progress and form based dialogs without writing component templates.
The npm package dialog-service receives a total of 1 weekly downloads. As such, dialog-service popularity was classified as not popular.
We found that dialog-service demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.