Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public showPopUp() {
const config = new DejaPopupConfig();
config.title = `Movable ${DejaPopupConfig.dialogCount + 1}`;
config.content = '<h2>Movable Popup No Modal</h2>';
config.content = [
'<p></p><h3>First</h3> html line<p></p>',
'<p></p><h3>Second</h3> html line<p></p><br><div> One More Line</div>',
];
config.padding = true;
config.actions = [
new DejaPopupButton('close', 'Close', 'close'),
];
config.width = '500px';
config.height = '400px';
config.toolbarColor = 'warn';
this.dejaPopupService.openPopUp(config)
// .filter((resp: DejaPopupReponse) => !!resp)
public showUrlPdfFullscreen() {
const conf = new DejaPopupConfig();
conf.fullscreen = true;
// conf.buttonFullscreenExit = false;
this.showUrlPdf(conf);
}
public showUrlPdf(conf?: DejaPopupConfig) {
if (!conf) {
conf = new DejaPopupConfig();
}
conf.actions = [
new DejaPopupButton('close', 'Close', 'close'),
];
conf.toolbarType = 'window';
conf.toolbarColor = 'warn';
this.dejaPopupService.openUrl(this.dummyPdfUrl, conf)
.subscribe((response: DejaPopupReponse) => {
this.showResponse(response);
});
}
public useAdvancedComponent() {
const conf = new DejaPopupConfig();
conf.actions = [
new DejaPopupButton('close', 'Close', 'close'),
];
conf.toolbarType = 'window';
conf.padding = true;
conf.content = [
'One Line of Content',
'Two Lines of Content',
'Many Lines of Content',
];
this.dejaPopupService.openAdvanced$(conf)
.subscribe((response: DejaPopupReponse) => {
this.showResponse(response);
});
}
public askConfirmationCustom() {
const config = new DejaPopupConfig();
config.data = { test: 'abcde' };
config.toolbarIconName = 'accessibility';
config.toolbarColor = 'accent';
config.title = 'Dialog custom';
config.actions = [
new DejaPopupButton('confirm', 'Confirm', 'done'),
new DejaPopupButton('undo', 'Undo', 'undo'),
new DejaPopupButton('cancel', 'Cancel', 'cancel'),
];
this.dejaPopupService.openCustom(
DejaPopupCustomDemoComponent,
config,
)
.subscribe((response: DejaPopupReponse) => {
public showComponentInjection() {
const config = new DejaPopupConfig();
config.title = 'Pick a color';
config.height = 'auto';
config.width = 'auto';
config.contentComponentRef = DummyComponent;
this.dejaPopupService.openPopUp(config)
.subscribe((response: DejaPopupReponse) => {
this.showResponse(response);
});
}
public showPopUpPdf() {
const config = new DejaPopupConfig();
config.title = `Pdf ${DejaPopupConfig.dialogCount}`;
config.url = this.dummyPdfUrl;
config.padding = false;
config.toolbarIconName = 'photo_camera';
config.toolbarColor = 'accent';
config.toolbarActions = [
new DejaPopupButton('account', 'User', 'account_circle', false),
new DejaPopupButton('view', 'Show', 'visibility', false),
];
config.ensureDimension();
this.dejaPopupService.openPopUp(config).pipe(
filter((resp: DejaPopupReponse) => !!resp))
.subscribe((response: DejaPopupReponse) => {
public showUrlImg() {
const config = new DejaPopupConfig();
config.height = '600px';
config.width = '800px';
this.dejaPopupService.openUrl(this.dummyImgUrl, config)
.subscribe((response: DejaPopupReponse) => {
this.showResponse(response);
});
}
public askConfirmation2() {
const config = new DejaPopupConfig();
config.width = '530px';
const pos: DialogPosition = { bottom: '50px', right: '50px' };
config.position = pos;
config.disableClose = true;
config.toolbarColor = 'danger';
const title = 'System failure!';
const body = '<p>You don\'t want to <b>Cancel</b> the operation.<br> Or you don\'t? </p>';
const butYes = new DejaPopupButton('yes', 'Yes', 'check');
const butNo = new DejaPopupButton('no', 'No', 'not_interested');
const butCancel = new DejaPopupButton('cancel', 'Cancel', 'cancel');
const actions = [butYes, butNo, butCancel];