How to use the @deja-js/component/popup.DejaPopupConfig function in @deja-js/component

To help you get started, we’ve selected a few @deja-js/component examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
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) =&gt; !!resp)
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public showUrlPdfFullscreen() {
        const conf = new DejaPopupConfig();
        conf.fullscreen = true;
        // conf.buttonFullscreenExit = false;
        this.showUrlPdf(conf);
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
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);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
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);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
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) => {
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
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);
            });

    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
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) => {
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
public showUrlImg() {
        const config = new DejaPopupConfig();
        config.height = '600px';
        config.width = '800px';
        this.dejaPopupService.openUrl(this.dummyImgUrl, config)
            .subscribe((response: DejaPopupReponse) => {
                this.showResponse(response);
            });
    }
github DSI-HUG / dejajs-components / src / app / popup / popup-demo.ts View on Github external
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];