UNPKG

stimulsoft-viewer-angular

Version:

The Viewer component is designed to view reports and dashboards in the web browser.

138 lines 13.3 kB
import { Component } from '@angular/core'; import * as i0 from "@angular/core"; import * as i1 from "../services/model.service"; import * as i2 from "./form.service"; import * as i3 from "@angular/common"; import * as i4 from "../controls/button.component"; import * as i5 from "./base-form.component"; export class NotificationFormComponent { constructor(model, formService) { this.model = model; this.formService = formService; } ngOnInit() { } changeVisibility(state) { if (state === 'hidden' && this.model.notificationFormOptions?.cancelAction) { this.model.notificationFormOptions.cancelAction(); } } action() { this.model.notificationFormOptions?.action ? this.model.notificationFormOptions.action() : this.formService.closeForm('notificationForm'); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NotificationFormComponent, deps: [{ token: i1.ModelService }, { token: i2.FormService }], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: NotificationFormComponent, selector: "sti-notification-form", ngImport: i0, template: ` <sti-base-form [fontFamily]="model.options.toolbar.fontFamily" [color]="model.options.toolbar.fontColor" [name]="'notificationForm'" [defaultTop]="150" [caption]="model.loc('Viewer')" [level]="4" [showButtons]="false" [showSeparator]="false" (changeVisibility)="changeVisibility($event)"> <table class="stiJsViewerClearAllStyles" cellpadding="0" cellspacing="0"> <tbody> <tr *ngIf="model.notificationFormOptions?.image" class="stiJsViewerClearAllStyles"> <td class="stiJsViewerClearAllStyles" [style.textAlign]="'center'"> <img src="{{model.img(model.notificationFormOptions?.image)}}" [style.marginTop.px]="20" [style.width.px]="112" [style.height.px]="112"> </td> </tr> <tr *ngIf="model.notificationFormOptions?.message" class="stiJsViewerClearAllStyles"> <td class="stiJsViewerClearAllStyles"> <div class="stiJsViewerNotificationFormMessage"> {{model.notificationFormOptions?.message}} </div> </td> </tr> <tr *ngIf="model.notificationFormOptions?.description" class="stiJsViewerClearAllStyles"> <td class="stiJsViewerClearAllStyles"> <div class="stiJsViewerNotificationFormDescription"> {{model.notificationFormOptions?.description}} </div> </td> </tr> <tr class="stiJsViewerClearAllStyles"> <td class="stiJsViewerClearAllStyles" [style.textAlign]="'center'"> <sti-button [caption]="model.notificationFormOptions?.buttonCaption" [styleName]="'stiJsViewerLoginButton'" [innerTableWidth]="'100%'" [height]="'40px'" [minWidth]="'80px'" [captionAlign]="'center'" [cursor]="'pointer'" [display]="'inline-block'" [minWidth]="'200px'" [width]="'auto'" [margin]="'20px 30px 30px 30px'" [fontSize]="'14px'" (action)="action()"> </sti-button> </td> </tr> </tbody> </table> </sti-base-form> `, isInline: true, dependencies: [{ kind: "directive", type: i3.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i4.ButtonComponent, selector: "sti-button", inputs: ["caption", "caption2", "captionAlign", "captionPadding", "captionPaddingLeft", "captionWhiteSpace", "captionOverflow", "captionTextOverflow", "captionWidth", "captionMaxWidth", "captionLineHeight", "imageName", "arrow", "arrowMarginTop", "margin", "height", "selected", "minWidth", "innerTableWidth", "menuItems", "actionName", "tooltip", "imageCellTextAlign", "imageCellWidth", "imageCellPadding", "imageSizesWidth", "imageSizesHeight", "imageMargin", "width", "display", "closeButton", "resourceButton", "styleColors", "boxSizing", "navagationPanelTooltip", "cursor", "fontSize", "helpLink", "borderColor", "styleName", "enabled"], outputs: ["action", "closeButtonAction"] }, { kind: "component", type: i5.BaseFormComponent, selector: "sti-base-form", inputs: ["level", "caption", "helpUrl", "fontFamily", "color", "fontSize", "containerPadding", "name", "defaultTop", "showCancel", "showButtons", "showSeparator"], outputs: ["changeVisibility", "action"] }] }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: NotificationFormComponent, decorators: [{ type: Component, args: [{ selector: 'sti-notification-form', template: ` <sti-base-form [fontFamily]="model.options.toolbar.fontFamily" [color]="model.options.toolbar.fontColor" [name]="'notificationForm'" [defaultTop]="150" [caption]="model.loc('Viewer')" [level]="4" [showButtons]="false" [showSeparator]="false" (changeVisibility)="changeVisibility($event)"> <table class="stiJsViewerClearAllStyles" cellpadding="0" cellspacing="0"> <tbody> <tr *ngIf="model.notificationFormOptions?.image" class="stiJsViewerClearAllStyles"> <td class="stiJsViewerClearAllStyles" [style.textAlign]="'center'"> <img src="{{model.img(model.notificationFormOptions?.image)}}" [style.marginTop.px]="20" [style.width.px]="112" [style.height.px]="112"> </td> </tr> <tr *ngIf="model.notificationFormOptions?.message" class="stiJsViewerClearAllStyles"> <td class="stiJsViewerClearAllStyles"> <div class="stiJsViewerNotificationFormMessage"> {{model.notificationFormOptions?.message}} </div> </td> </tr> <tr *ngIf="model.notificationFormOptions?.description" class="stiJsViewerClearAllStyles"> <td class="stiJsViewerClearAllStyles"> <div class="stiJsViewerNotificationFormDescription"> {{model.notificationFormOptions?.description}} </div> </td> </tr> <tr class="stiJsViewerClearAllStyles"> <td class="stiJsViewerClearAllStyles" [style.textAlign]="'center'"> <sti-button [caption]="model.notificationFormOptions?.buttonCaption" [styleName]="'stiJsViewerLoginButton'" [innerTableWidth]="'100%'" [height]="'40px'" [minWidth]="'80px'" [captionAlign]="'center'" [cursor]="'pointer'" [display]="'inline-block'" [minWidth]="'200px'" [width]="'auto'" [margin]="'20px 30px 30px 30px'" [fontSize]="'14px'" (action)="action()"> </sti-button> </td> </tr> </tbody> </table> </sti-base-form> ` }] }], ctorParameters: () => [{ type: i1.ModelService }, { type: i2.FormService }] }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm90aWZpY2F0aW9uLWZvcm0uY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvc3RpbXVsc29mdC12aWV3ZXItYW5ndWxhci9zcmMvbGliL2Zvcm1zL25vdGlmaWNhdGlvbi1mb3JtLmNvbXBvbmVudC50cyJdLCJuYW1lcyI6W10sIm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0ZCBjbGFzcz1cInN0aUpzVmlld2VyQ2xlYXJBbGxTdHlsZXNcIj5cclxuICAgICAgICAgICAgICA8ZGl2IGNsYXNzPVwic3RpSnNWaWV3ZXJOb3RpZmljYXRpb25Gb3JtRGVzY3JpcHRpb25cIj5cclxuICAgICAgICAgICAgICAgIHt7bW9kZWwubm90aWZpY2F0aW9uRm9ybU9wdGlvbnM/LmRlc2NyaXB0aW9ufX1cclxuICAgICAgICAgICAgICA8L2Rpdj5cclxuICAgICAgICAgICAgPC90ZD5cclxuICAgICAgICAgIDwvdHI+XHJcbiAgICAgICAgICA8dHIgY2xhc3M9XCJzdGlKc1ZpZXdlckNsZWFyQWxsU3R5bGVzXCI+XHJcbiAgICAgICAgICAgIDx0ZCBjbGFzcz1cInN0aUpzVmlld2VyQ2xlYXJBbGxTdHlsZXNcIiBbc3R5bGUudGV4dEFsaWduXT1cIidjZW50ZXInXCI+XHJcbiAgICAgICAgICAgICAgPHN0aS1idXR0b25cclxuICAgICAgICAgICAgICAgIFtjYXB0aW9uXT1cIm1vZGVsLm5vdGlmaWNhdGlvbkZvcm1PcHRpb25zPy5idXR0b25DYXB0aW9uXCJcclxuICAgICAgICAgICAgICAgIFtzdHlsZU5hbWVdPVwiJ3N0aUpzVmlld2VyTG9naW5CdXR0b24nXCJcclxuICAgICAgICAgICAgICAgIFtpbm5lclRhYmxlV2lkdGhdPVwiJzEwMCUnXCJcclxuICAgICAgICAgICAgICAgIFtoZWlnaHRdPVwiJzQwcHgnXCJcclxuICAgICAgICAgICAgICAgIFttaW5XaWR0aF09XCInODBweCdcIlxyXG4gICAgICAgICAgICAgICAgW2NhcHRpb25BbGlnbl09XCInY2VudGVyJ1wiXHJcbiAgICAgICAgICAgICAgICBbY3Vyc29yXT1cIidwb2ludGVyJ1wiXHJcbiAgICAgICAgICAgICAgICBbZGlzcGxheV09XCInaW5saW5lLWJsb2NrJ1wiXHJcbiAgICAgICAgICAgICAgICBbbWluV2lkdGhdPVwiJzIwMHB4J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