UNPKG

stimulsoft-forms

Version:
813 lines (809 loc) 117 kB
import { Component, EventEmitter, Input, Output, ViewChild, } from "@angular/core"; import StiRectangleGeometryLayout from "./computed/StiRectangleGeometryLayout"; import { StiLocalizationService } from "./services/sti-localization.service"; import { StiModelService } from "./services/model.service"; import { StiMouseService } from "./services/mouse.service"; import { StiComponentResizerService } from "./services/sti-component-resizer.service"; import { StiEditableContentService } from "./services/sti-editable-content.service"; import { StiDraggableService } from "./services/sti-draggable.service"; import { StiHelperService } from "./services/sti-helper.service"; import { StiNameService } from "./services/sti-name.service"; import { StiToolbarResizerService } from "./services/sti-toolbar-resizer.service"; import { StiToolboxService } from "./services/sti-toolbox.service"; import { StiThemeService } from "./services/theme.service"; import { StiControllerService } from "./services/sti-controller.service"; import { StiHttpClientService } from "./services/http-client.service"; import { StiBarcodeService } from "./services/sti-barcode.service"; import { StiColumnDraggableService } from "./services/sti-column-draggable.service"; import { StiForm } from "./elements/StiForm"; import { StiRichTextService } from "./services/sti-rich-text.service"; import { StiChangesService } from "./services/sti-changes-service"; import { StiUndoService } from "./services/sti-undo-service"; import { StiExportService } from "./services/sti-export.service"; import { StiFontService } from "./services/sti-font.service"; import { StiUserService } from "./services/sti-user-service"; import { StiExpressionService } from "./services/sti-expression.service"; import { StiButtonElement } from "./elements/StiButtonElement"; import { FormEventsService } from "./services/sti-form-events-service"; import { SignatureService } from "./services/sti-signature.service"; import { StiColorDialogService } from "./services/sti-color-dialog.service"; import { StiStaticHelperService } from "./services/sti-static-helper.service"; import { StiTabIndexService } from "./services/sti-tabindex.service"; import { StiDropdownService } from "./components/sti-dropdown-component/sti-dropdown-service"; import { StiFormCheckerService } from "./services/sti-form-checker.service"; import { StiLocalStorageService } from "./services/sti-local-storage.service"; import { StiDraggableModalWindowService } from "./services/sti-draggable-modal-window.service"; import { StiTooltipService } from "./components/sti-tooltip/sti-tooltip.service"; import { StiClipboardService } from "./services/sti-clipboard-sevice"; import * as i0 from "@angular/core"; import * as i1 from "./services/sti-toolbar-resizer.service"; import * as i2 from "./services/model.service"; import * as i3 from "./services/theme.service"; import * as i4 from "./services/sti-controller.service"; import * as i5 from "./services/sti-barcode.service"; import * as i6 from "./services/sti-editable-content.service"; import * as i7 from "./services/sti-changes-service"; import * as i8 from "./services/sti-export.service"; import * as i9 from "./services/sti-font.service"; import * as i10 from "./services/sti-toolbox.service"; import * as i11 from "./services/sti-undo-service"; import * as i12 from "./services/sti-user-service"; import * as i13 from "./services/sti-expression.service"; import * as i14 from "./services/sti-helper.service"; import * as i15 from "./services/sti-localization.service"; import * as i16 from "./services/http-client.service"; import * as i17 from "./services/sti-signature.service"; import * as i18 from "./services/sti-tabindex.service"; import * as i19 from "./services/mouse.service"; import * as i20 from "./services/sti-form-events-service"; import * as i21 from "./components/sti-dropdown-component/sti-dropdown-service"; import * as i22 from "./services/sti-form-checker.service"; import * as i23 from "./services/sti-local-storage.service"; import * as i24 from "./components/sti-tooltip/sti-tooltip.service"; import * as i25 from "./services/sti-clipboard-sevice"; import * as i26 from "@angular/common"; import * as i27 from "./components/navbar.component/navbar.component"; import * as i28 from "./components/workspace.component/sti-workspace.component"; import * as i29 from "./components/properties.component/properties.component"; import * as i30 from "./toolbox/sti-draggable-element-container.component"; import * as i31 from "./toolbox/sti-toolbox.component"; import * as i32 from "./components/footer.component/footer.component"; import * as i33 from "./toolbox/sti-clone-element-container.component"; import * as i34 from "./components/modal-agree-window/modal-agree-window.component"; import * as i35 from "./components/sti-progress.component"; import * as i36 from "./toolbox/sti-draggable-column-container.component"; import * as i37 from "./components/sti-about-window/sti-about-window.component"; import * as i38 from "./components/propertyGrid/editors/sti-barcode-style-editor/sti-barcodes-styles-preview.component"; import * as i39 from "./components/workspace.component/sti-pdf-preview.component"; import * as i40 from "./components/navbar.component/navbar.group-preview.component"; import * as i41 from "./toolbox/sti-setup-toolbox.component"; import * as i42 from "./components/sti-localization-preview.component"; import * as i43 from "./components/sti-user-info.component"; import * as i44 from "./components/sti-trial-alerts/sti-trial-bar.component"; import * as i45 from "./components/sti-trial-alerts/sti-trial-modal-window.component"; import * as i46 from "./components/sti-file-menu/sti-file-menu.component"; import * as i47 from "./components/sti-file-menu/sti-file-menu-navigation.component"; import * as i48 from "./components/sti-file-menu/sti-file-save-dialog.component"; import * as i49 from "./components/sti-button/sti-button-message-window.component"; import * as i50 from "./components/navbar.component/sti-cloud-navbar.component"; import * as i51 from "./components/context-menu.component/context-menu-window.component"; import * as i52 from "./components/sti-expression-editor/sti-expression-help-window.component"; import * as i53 from "./components/sti-login.component"; import * as i54 from "./components/sti-expression-editor/sti-expression-editor.component"; import * as i55 from "./components/sti-color-dialog/sti-color-dialog.component"; import * as i56 from "./components/sti-color-dialog/sti-color-options-dialog.component"; import * as i57 from "./components/sti-expression-editor/sti-expression-draggable-container.component"; import * as i58 from "./components/sti-dropdown-component/sti-dropdown-list.component"; import * as i59 from "./components/sti-form-checker/sti-form-checker.component"; import * as i60 from "./components/sti-signature/sti-electronic-signature-editor.component"; import * as i61 from "./components/sti-draggable-modal-window/sti-draggable-modal-window.component"; import * as i62 from "./components/sti-tooltip/sti-tooltip.component"; import * as i63 from "./components/sti-trial-alerts/sti-trial-timer-window.component"; import * as i64 from "./components/sti-tiered-menu/sti-tiered-menu.component"; import * as i65 from "./components/properties.component/sti-forms-tree/sti-form-tree-warning-window.component"; export class StimulsoftFormsComponent { constructor(toolbarResizerService, model, theme, controller, barcodeService, render, editableContentService, changesService, exportService, font, toolboxService, undoService, userService, expressionService, helper, localizationService, httpService, signatureService, tabIndexService, mouseService, formEvents, dropdownService, formCheckerService, stiLocalStorage, tooltipService, clipboardService) { this.toolbarResizerService = toolbarResizerService; this.model = model; this.theme = theme; this.controller = controller; this.barcodeService = barcodeService; this.render = render; this.editableContentService = editableContentService; this.changesService = changesService; this.exportService = exportService; this.font = font; this.toolboxService = toolboxService; this.undoService = undoService; this.userService = userService; this.expressionService = expressionService; this.helper = helper; this.localizationService = localizationService; this.httpService = httpService; this.signatureService = signatureService; this.tabIndexService = tabIndexService; this.mouseService = mouseService; this.formEvents = formEvents; this.dropdownService = dropdownService; this.formCheckerService = formCheckerService; this.stiLocalStorage = stiLocalStorage; this.tooltipService = tooltipService; this.clipboardService = clipboardService; this.viewerMode = false; this.readonlyMode = false; this.form = new StiForm(); this.interfaceEvent = new EventEmitter(); this.init = false; this.distance = 0; this.isDoubleTouch = false; this.model.interfaceEvent.subscribe((e) => this.interfaceEvent.emit(e)); this.model.component = this; barcodeService.init(); changesService.start(); expressionService.start(); } get pointerEvents() { return this.model.showModalWindow || this.model.showAboutWindow || this.exportService.showModalWindow || this.model.showTrialModalWindow || this.model.showButtonMessageWindow || this.model.showErrorWindow || this.model.showHelpWindow || this.model.showMoreColorDialog || this.model.showProgress || this.model.showExpressionEditor || this.formCheckerService.showFormCheckerWindow || this.model.showSignatureEditor || this.model.showDraggableModalWindow || this.model.showTrialTimerWindow || this.model.showFormTreeWarningWindow ? "none" : ""; } get cursor() { return this.model.cursor; } get toolbarWidth() { return this.toolbarResizerService.isMaximizeMode ? 200 : 45; } hasParentHeight() { let root = document.getElementsByClassName("sti-root-form"); return root[0].parentElement.style.height ? true : false; } hasParentWidth() { let root = document.getElementsByClassName("sti-root-form"); return root[0].parentElement.style.width ? true : false; } ngOnInit() { this.model.settings = this.settings; this.mouseService.getDocumentTouchStart().subscribe((event) => { this.startTouch(event); }); this.mouseService.getDocumentTouchMove().subscribe((event) => { this.touchMove(event); }); this.mouseService.getDocumentTouchEnd().subscribe((event) => { this.touchEnd(event); }); this.toolboxService.unusedElements = JSON.parse(this.stiLocalStorage.getItem("StiToolboxSetup")); let showInsertTab = JSON.parse(this.stiLocalStorage.getItem("StiShowInsertTab")); let showToolbox = JSON.parse(this.stiLocalStorage.getItem("StiShowToolbox")); let buttonLinks = this.stiLocalStorage.getItem("StiButtonLinks"); if (buttonLinks) { this.model.enteredUrls = buttonLinks.split(","); } this.model.showInsertTab = showInsertTab != null ? showInsertTab : true; this.toolboxService.showToolbox = showToolbox != null ? showToolbox : true; this.model.viewerMode = this.viewerMode; if (this.viewerMode) { this.model.ribbon = "Preview"; } if (this.properties?.cloudPlanIdent?.length > 0 && (this.properties.cloudPlanIdent == "Trial" || this.properties.cloudPlanIdent == "Expiried" || this.properties.cloudPlanIdent == "Developer" || this.properties.cloudPlanIdent.indexOf("Base") > 0 || this.properties.cloudPlanIdent.indexOf("Single") > 0 || this.properties.cloudPlanIdent.indexOf("Team") > 0 || this.properties.cloudPlanIdent.indexOf("Enterprise") > 0)) { if (this.properties?.cloudPlanIdent == "Trial" || this.properties?.cloudPlanIdent == "Expiried") { this.model.basePlanIsTrial = true; if (!this.viewerMode) { this.model.showTrialBar = true; } else { this.model.showTrialTitle = true; } } this.model.form.additionalFormFields; this.model.isCloudMode = true; if (this.model.enteredUrls.indexOf("cloud.stimulsoft.com") == -1) { this.model.enteredUrls.push("cloud.stimulsoft.com"); } } if (this.viewerMode && this.readonlyMode) { this.setReadOnlyMode(); } this.toolboxService.elements.forEach((element) => { if (this.toolboxService.unusedElements?.find((item) => item == element.id)) { element.enabled = false; } }); this.theme.currentTheme = "Light"; const zoomByWheel = (event) => { if (event.ctrlKey) { event.stopPropagation(); event.preventDefault(); if (event.deltaY < 0) { if (this.model.zoom > 0.1 && this.model.zoom < 4.9) { this.model.zoom += 0.1; } } else { if (this.model.zoom > 0.2 && this.model.zoom < 5) { this.model.zoom -= 0.1; } } } else { let workspace = document.getElementsByTagName("sti-workspace")[0]; // workspace.scrollTop = 10; if (this.model.draggingElement) { if (event.deltaY < 0) { workspace.scrollTop -= 300; } else { workspace.scrollTop += 300; } } } }; let this_ = this; window.oncontextmenu = function ($event) { if (this_.model.getPageFromPoint(event["clientX"], event["clientY"]) && document.activeElement.tagName.toLocaleLowerCase() == "body") { event.preventDefault(); this_.model.contextMenuX = event["clientX"]; if (window.outerHeight - event["clientY"] <= 255) { this_.model.contextMenuY = event["clientY"] - 150; } else { this_.model.contextMenuY = event["clientY"]; } this_.model.showContextMenu = true; } }; window.onbeforeunload = function (event) { this_.model.currentFormState = this_.model.form.saveToReportJsonObject().serialize(); if (this_.model?.currentFormState !== this_.model?.lastSavedFormState && this_.undoService?.undos?.length > 1 && !this_.model.viewerMode) { setTimeout(() => { this_.model.showProgress = false; }, 3000); event.returnValue = ""; return event.returnValue; } }; const deletingComponents = (event) => { let selection = window.getSelection().toString(); if (event.key === "Escape" && this.model.lastFormState != null) { let form = new StiForm(); form.loadFormJsonString(this.model.lastFormState); this.model.form = form; this.model.draggingElement = null; this.model.lastFormState = null; } else if (event.key === "Delete" && this.model.canDelete()) { if (this.model.selectedComponent) { this.helper.deleteSelectedComponent(); } else if (this.model.selectedPage && this.model?.form?.pages?.length > 1) { this.model.showModalWindow = true; } } else if (event.key === "PageDown" || event.key === "PageUp") { event.preventDefault(); } else if (event.ctrlKey && event.code === "KeyC") { if (this.model.showExpressionEditor) { return; } if (this.model.selectedComponent && document.activeElement.tagName.toLocaleLowerCase() == "body") { this.clipboardService.copyElement(); } } else if (event.ctrlKey && event.code === "KeyV") { if (this.model.showExpressionEditor) { return; } if (this.clipboardService.hasCopy && document.activeElement.tagName.toLocaleLowerCase() == "body") { let mouseEvent = new MouseEvent("mousemove"); this.clipboardService.pasteElement(mouseEvent); } } else if (event.ctrlKey && event.code === "KeyZ") { if (this.model.showExpressionEditor) { return; } event.preventDefault(); if (this.undoService.undos.length >= 2) { this.undoService.undo(); } } else if (event.ctrlKey && event.code === "KeyX") { if (this.model.showExpressionEditor) { return; } if (this.model.selectedComponent && document.activeElement.tagName.toLocaleLowerCase() == "body") { this.clipboardService.cutElement(); } } }; const disableDeleting = (event) => { let isWorkspace = false; let isBarcodePreview = false; let elements = document.elementsFromPoint(event.clientX, event.clientY); elements.forEach((element) => { if (element?.classList.contains("sti-page") || element?.classList.contains("sti-component")) { isWorkspace = true; } if (element?.classList.contains("container")) { isBarcodePreview = true; } }); if (!isBarcodePreview) { this.barcodeService.showBarcodePreview = false; } }; document.querySelector(".sti-root-form")?.addEventListener("wheel", zoomByWheel); document.addEventListener("keydown", deletingComponents); document.addEventListener("mousedown", disableDeleting); } needToScroll() { let workspace = document.getElementsByTagName("sti-workspace")[0]; let pageElem = document.querySelectorAll(".sti-page")[0]; let rect = this.model.getPositionRelativeToForm(pageElem); return workspace?.clientWidth < rect?.width; } ngOnChanges(changes) { if (Object.keys(changes).length == 1) { if (changes["form"]) { this.model.form = changes["form"].currentValue; this.model.fileName = this.formName; if (this.viewerMode) { this.model.form.updateToViewerMode(); } } else if (changes["localization"]) { this.localizationService.loadLocalization(this.localization); } } else { this.initialize(); } } startTouch(event) { if (this.isMobileViewer) { if (event.touches.length === 2) { this.startZoomValue = this.model.zoom; this.distance = Math.hypot(event.touches[0].pageX - event.touches[1].pageX, event.touches[0].pageY - event.touches[1].pageY); this.isDoubleTouch = true; } } } get isMobileViewer() { return this.model.viewerMode && this.model.isMobile(); } touchMove(event) { if (this.isMobileViewer && this.isDoubleTouch) { event.preventDefault(); let dist2 = Math.hypot(event.touches[0].pageX - event.touches[1].pageX, event.touches[0].pageY - event.touches[1].pageY); let delta = Math.abs(dist2 - this.distance); if (this.distance < dist2) { this.model.zoom = this.startZoomValue + Number((delta / 200).toFixed(2)); } else if (this.distance > dist2) { this.model.zoom = this.startZoomValue - Number((delta / 200).toFixed(2)); } if (this.model.zoom < this.minimalZoomValue()) { this.model.zoom = this.minimalZoomValue(); let workspace = document.getElementsByTagName("sti-workspace")[0]; let pageElem = document.querySelectorAll(".page-container")[0]; setTimeout(() => { let rect = this.model.getPositionRelativeToForm(pageElem); if (workspace.scrollLeft != workspace.scrollWidth - rect.width - 6) { workspace.scrollLeft = workspace.scrollWidth - rect.width - 6; } }); } } } touchEnd(event) { if (this.isMobileViewer && this.isDoubleTouch) { if (event.targetTouches.length < 2) { this.isDoubleTouch = false; } } } minimalZoomValue() { let workspace = document.getElementsByTagName("sti-workspace")[0]; let width = workspace["offsetWidth"]; let pagetWithMaxWidth = this.model.form.pages.reduce((acc, curr) => (acc.width > curr.width ? acc : curr)); return width / (pagetWithMaxWidth.width + 30); } setReadOnlyMode() { this.model?.form?.pages.forEach((page) => { page.allElements.forEach((element) => { if (element["readOnly"]) { element["readOnly"] = true; } else { if (!(element instanceof StiButtonElement)) { element.readOnly = false; } } }); }); } ngAfterViewInit() { this.init = true; setTimeout(() => { this.initialize(); this.rootFormElementRef.nativeElement.component = this; this.model.rootFormElement = this.rootFormElementRef.nativeElement; this.model.addTotalMenu = this.addTotalMenu; }, 0); } containerHeight() { let showfooter = this.model.getBooleanSetting("showFooter"); let isModeWithPreview = this.model.previewMode || this.model.pdfPreviewMode || this.viewerMode; if (isModeWithPreview) { if (this.viewerMode) { return "calc(100% - 32px)"; } else { return this.model.pdfPreviewMode || !showfooter ? "calc(100% - 38px)" : "calc(100% - 70px)"; } } else { if (showfooter) { return this.model.showTrialBar ? "calc(100% - 155px)" : "calc(100% - 125px)"; } else { return this.model.showTrialBar ? "calc(100% - 123px)" : "calc(100% - 93px)"; } } } initialize() { if (this.init) { this.model.requestUrl = this.requestUrl; this.model.properties = this.properties; this.model.fileName = this.formName; if (this.form) { this.model.form = this.form; } if (this.localization) { this.localizationService.loadLocalization(this.localization); } this.controller.initialize(); } } cloudLogin(event) { delete this.model.properties.cloudLoginInfo; delete this.model.login; this.model.properties["cloudLogin"] = event.login; this.model.properties["cloudPassword"] = event.password; this.controller.initialize(); } static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StimulsoftFormsComponent, deps: [{ token: i1.StiToolbarResizerService }, { token: i2.StiModelService }, { token: i3.StiThemeService }, { token: i4.StiControllerService }, { token: i5.StiBarcodeService }, { token: StiRectangleGeometryLayout }, { token: i6.StiEditableContentService }, { token: i7.StiChangesService }, { token: i8.StiExportService }, { token: i9.StiFontService }, { token: i10.StiToolboxService }, { token: i11.StiUndoService }, { token: i12.StiUserService }, { token: i13.StiExpressionService }, { token: i14.StiHelperService }, { token: i15.StiLocalizationService }, { token: i16.StiHttpClientService }, { token: i17.SignatureService }, { token: i18.StiTabIndexService }, { token: i19.StiMouseService }, { token: i20.FormEventsService }, { token: i21.StiDropdownService }, { token: i22.StiFormCheckerService }, { token: i23.StiLocalStorageService }, { token: i24.StiTooltipService }, { token: i25.StiClipboardService }], target: i0.ɵɵFactoryTarget.Component }); } static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: StimulsoftFormsComponent, selector: "stimulsoft-forms", inputs: { requestUrl: "requestUrl", style: "style", viewerMode: "viewerMode", readonlyMode: "readonlyMode", form: "form", localization: "localization", formName: "formName", settings: "settings", properties: "properties" }, outputs: { interfaceEvent: "interfaceEvent" }, providers: [ StiModelService, StiToolboxService, StiMouseService, StiComponentResizerService, StiDraggableService, StiHelperService, StiLocalizationService, StiToolbarResizerService, StiNameService, StiRectangleGeometryLayout, StiThemeService, StiEditableContentService, StiControllerService, StiHttpClientService, StiBarcodeService, StiColumnDraggableService, StiRichTextService, StiChangesService, StiUndoService, StiExportService, StiFontService, StiUserService, StiExpressionService, FormEventsService, SignatureService, StiColorDialogService, StiStaticHelperService, StiTabIndexService, StiDropdownService, StiFormCheckerService, StiLocalStorageService, StiDraggableModalWindowService, StiTooltipService, StiClipboardService ], viewQueries: [{ propertyName: "addTotalMenu", first: true, predicate: ["addTotalMenu"], descendants: true }, { propertyName: "rootFormElementRef", first: true, predicate: ["rootForm"], descendants: true }], usesOnChanges: true, ngImport: i0, template: ` <div class="sti-root-form" [style.position]="'relative'" [style]="style" [style.cursor]="cursor" [style.width]="hasParentWidth() ? 'inherit' : '100%'" [style.height]="hasParentHeight() ? 'inherit' : '100%'" #rootForm > <sti-navbar [style.pointer-events]="pointerEvents" [style.opacity]="model.isInitialized ? 1 : 0"></sti-navbar> <sti-cloud-navbar [style.opacity]="model.isInitialized ? 1 : 0" *ngIf="model.isCloudMode && model.viewerMode && model.basePlanIsTrial" ></sti-cloud-navbar> <sti-trial-bar [style.opacity]="model.isInitialized ? 1 : 0" *ngIf="!viewerMode && !model.previewMode && !model.pdfPreviewMode && model.showTrialBar" ></sti-trial-bar> <div class="flex-container" [style.opacity]="model.isInitialized ? 1 : 0" [style.height]="containerHeight()" [style.pointer-events]="pointerEvents" > <!-- elements --> <sti-toolbox *ngIf=" !viewerMode && !model.previewMode && !model.pdfPreviewMode && toolboxService.showToolbox && model.getBooleanSetting('showToolbox') " class="elements" [style.min-width.px]="toolbarWidth" ></sti-toolbox> <!-- workspace --> <sti-pdf-preview *ngIf="model.pdfPreviewMode" style="width:100%;height:100%"></sti-pdf-preview> <sti-workspace *ngIf="!model.pdfPreviewMode" class="workspace" [style.overflow-x]="model.viewerMode && model.isMobile() && !needToScroll() ? 'hidden' : 'auto'" ></sti-workspace> <!-- properties --> <app-properties class="properties" [style.min-width.px]=" viewerMode || model.previewMode || model.pdfPreviewMode || !model.getBooleanSetting('showProperties') ? '0' : model.propertyGridWidth " [style.max-width.px]=" viewerMode || model.previewMode || model.pdfPreviewMode || !model.getBooleanSetting('showProperties') ? '0' : model.propertyGridWidth " [style.visibility]=" viewerMode || model.previewMode || model.pdfPreviewMode || !model.getBooleanSetting('showProperties') ? 'hidden' : '' " ></app-properties> <sti-draggable-element-container></sti-draggable-element-container> <sti-clone-element-container></sti-clone-element-container> <sti-draggable-column-container></sti-draggable-column-container> <sti-barcode-styles-preview></sti-barcode-styles-preview> <sti-navbar-group-preview-component></sti-navbar-group-preview-component> <sti-user-info></sti-user-info> <sti-localization-preview></sti-localization-preview> </div> <sti-electronic-signature-editor *ngIf="model.showSignatureEditor"></sti-electronic-signature-editor> <sti-footer [style.opacity]="model.isInitialized ? 1 : 0" *ngIf="!model.pdfPreviewMode && model.getBooleanSetting('showFooter')" [style.pointer-events]="pointerEvents" ></sti-footer> <sti-file-menu *ngIf="model.fileMenuMode && model.isInitialized"></sti-file-menu> <sti-file-menu-navigation [style.visibility]="model.isInitialized ? '' : 'hidden'"></sti-file-menu-navigation> <sti-about-window-component *ngIf="model.showAboutWindow"></sti-about-window-component> <sti-progress [display]="model.showProgress"></sti-progress> <expression-draggable-container></expression-draggable-container> <sti-color-options-dialog *ngIf="model.showMoreColorDialog"></sti-color-options-dialog> <sti-color-dialog *ngIf="model.showColorDialog"></sti-color-dialog> <sti-expression-editor *ngIf="model.showExpressionEditor"></sti-expression-editor> <sti-trial-modal-window *ngIf="model.showTrialModalWindow"></sti-trial-modal-window> <sti-file-save-dialog *ngIf="model.showSaveDialog || model.showSaveDialogFromCloud"></sti-file-save-dialog> <sti-setup-toolbox-component *ngIf="model.showToolboxSetup"></sti-setup-toolbox-component> <button-message-window *ngIf="model.showButtonMessageWindow || model.showErrorWindow"></button-message-window> <sti-modal-agree-window *ngIf="model.showModalWindow || exportService.showModalWindow"></sti-modal-agree-window> <expression-help-window *ngIf="model.showHelpWindow"></expression-help-window> <sti-context-menu-window *ngIf="model.showContextMenu && !viewerMode && !model.previewMode" ></sti-context-menu-window> <sti-login *ngIf="model.login != null" [loginInfo]="model.login" (onLogin)="cloudLogin($event)"></sti-login> <sti-dropdown-list-component *ngIf="dropdownService.showDropdownList"></sti-dropdown-list-component> <sti-form-checker *ngIf="formCheckerService.showFormCheckerWindow"></sti-form-checker> <sti-draggable-modal-window *ngIf="model.showDraggableModalWindow"></sti-draggable-modal-window> <sti-tooltip *ngIf="tooltipService.showTooltip"></sti-tooltip> <sti-trial-timer-window *ngIf="model.showTrialTimerWindow"></sti-trial-timer-window> <sti-tiered-menu *ngIf="model.showTieredMenu" [menu]="helper.getAddTotalMenuItems()"></sti-tiered-menu> <form-tree-warning-window *ngIf="model.showFormTreeWarningWindow"></form-tree-warning-window> </div> `, isInline: true, styles: ["sti-file-menu{height:inherit;width:inherit}sti-file-menu-navigation{height:inherit}.flex-container{display:flex;justify-content:center;background:var(--back-color);height:calc(100% - 117px);width:100%;font-family:Segoe UI}.workspace{background-color:var(--workspace-color);display:block;justify-content:center;font-size:2.5rem;color:#000;overflow-y:auto;scroll-behavior:smooth;height:100%;flex-grow:1}*{scrollbar-width:thin;scrollbar-color:var(--thumb-color),var(--back-color)}*::-webkit-scrollbar{-webkit-appearance:none;background-color:var(--back-color);height:10px;width:10px;outline:none}*::-webkit-scrollbar-button{-webkit-appearance:none;height:3px;width:3px}*::-webkit-scrollbar-thumb{-webkit-appearance:none;background-color:var(--thumb-color);height:10px;min-width:25px;max-width:80%;border-radius:4px;border:2px solid var(--back-color)}*::-webkit-scrollbar-thumb:hover{background-color:var(--trackHover-color);height:10px}*::-webkit-scrollbar-track{-webkit-appearance:none;background-color:var(--back-color);border:1px solid var(--back-color)}*::-webkit-scrollbar-corner{background-color:var(--back-color)}.elements{background-color:var(--back-color);font-size:2.5rem;color:#000;visibility:visible;overflow-y:auto;scroll-behavior:smooth;border-right:1px solid var(--formBorder-color);padding:7px;transition:min-width .2s}.properties{background-color:var(--back-color);font-size:2.5rem;color:#000;scroll-behavior:smooth;display:flex;min-width:360px;max-width:360px;border-left:1px solid var(--formBorder-color);font-size:18px}.hovered{background-color:#d1d8e2}.sti-root-form{height:inherit;width:inherit}\n"], dependencies: [{ kind: "directive", type: i26.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i27.NavbarComponent, selector: "sti-navbar" }, { kind: "component", type: i28.WorkspaceComponent, selector: "sti-workspace" }, { kind: "component", type: i29.PropertiesComponent, selector: "app-properties" }, { kind: "component", type: i30.StiDraggableElementContainerComponent, selector: "sti-draggable-element-container" }, { kind: "component", type: i31.StiToolboxComponent, selector: "sti-toolbox" }, { kind: "component", type: i32.StiFooterComponent, selector: "sti-footer" }, { kind: "component", type: i33.StiCloneElementContainerComponent, selector: "sti-clone-element-container" }, { kind: "component", type: i34.StiModalAgreeWindowComponent, selector: "sti-modal-agree-window" }, { kind: "component", type: i35.StiProgressComponent, selector: "sti-progress", inputs: ["display"] }, { kind: "component", type: i36.StiDraggableColumnContainerComponent, selector: "sti-draggable-column-container" }, { kind: "component", type: i37.StiAboutWindowComponent, selector: "sti-about-window-component" }, { kind: "component", type: i38.StiBarcodeStylesPreviewComponent, selector: "sti-barcode-styles-preview" }, { kind: "component", type: i39.StiPdfPreviewComponent, selector: "sti-pdf-preview" }, { kind: "component", type: i40.NavbarGroupPreviewComponent, selector: "sti-navbar-group-preview-component" }, { kind: "component", type: i41.StiSetupToolboxComponent, selector: "sti-setup-toolbox-component" }, { kind: "component", type: i42.StiLocalizationPreviewComponent, selector: "sti-localization-preview" }, { kind: "component", type: i43.StiUserInfoComponent, selector: "sti-user-info" }, { kind: "component", type: i44.StiTrialBarComponent, selector: "sti-trial-bar" }, { kind: "component", type: i45.StiTrialModalWindowComponent, selector: "sti-trial-modal-window" }, { kind: "component", type: i46.StiFileMenuComponent, selector: "sti-file-menu" }, { kind: "component", type: i47.StiFileMenuNavigationComponent, selector: "sti-file-menu-navigation" }, { kind: "component", type: i48.StiFileSaveDialogComponent, selector: "sti-file-save-dialog" }, { kind: "component", type: i49.StiButtonMessageWindowComponent, selector: "button-message-window" }, { kind: "component", type: i50.StiCloudNavbarComponent, selector: "sti-cloud-navbar" }, { kind: "component", type: i51.ContextMenuWindowComponent, selector: "sti-context-menu-window" }, { kind: "component", type: i52.StiExpressionHelpWindowComponent, selector: "expression-help-window" }, { kind: "component", type: i53.StiLoginComponent, selector: "sti-login", inputs: ["loginInfo"], outputs: ["onLogin"] }, { kind: "component", type: i54.StiExpressionEditorComponent, selector: "sti-expression-editor" }, { kind: "component", type: i55.StiColorDialogComponent, selector: "sti-color-dialog" }, { kind: "component", type: i56.StiColorOptionsDialogComponent, selector: "sti-color-options-dialog" }, { kind: "component", type: i57.StiExpressionDraggableContainerComponent, selector: "expression-draggable-container" }, { kind: "component", type: i58.StiDropdownListComponent, selector: "sti-dropdown-list-component" }, { kind: "component", type: i59.StiFormCheckerComponent, selector: "sti-form-checker" }, { kind: "component", type: i60.StiElectronicSignatureEditorComponent, selector: "sti-electronic-signature-editor" }, { kind: "component", type: i61.StiDraggableModalWindowComponent, selector: "sti-draggable-modal-window" }, { kind: "component", type: i62.StiTooltipComponent, selector: "sti-tooltip" }, { kind: "component", type: i63.StiTrialTimerWindowComponent, selector: "sti-trial-timer-window" }, { kind: "component", type: i64.StiTieredMenuComponent, selector: "sti-tiered-menu", inputs: ["menu", "parentElement", "baseZIndex"] }, { kind: "component", type: i65.StiFormTreeWarningWindowComponent, selector: "form-tree-warning-window" }] }); } } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: StimulsoftFormsComponent, decorators: [{ type: Component, args: [{ selector: "stimulsoft-forms", template: ` <div class="sti-root-form" [style.position]="'relative'" [style]="style" [style.cursor]="cursor" [style.width]="hasParentWidth() ? 'inherit' : '100%'" [style.height]="hasParentHeight() ? 'inherit' : '100%'" #rootForm > <sti-navbar [style.pointer-events]="pointerEvents" [style.opacity]="model.isInitialized ? 1 : 0"></sti-navbar> <sti-cloud-navbar [style.opacity]="model.isInitialized ? 1 : 0" *ngIf="model.isCloudMode && model.viewerMode && model.basePlanIsTrial" ></sti-cloud-navbar> <sti-trial-bar [style.opacity]="model.isInitialized ? 1 : 0" *ngIf="!viewerMode && !model.previewMode && !model.pdfPreviewMode && model.showTrialBar" ></sti-trial-bar> <div class="flex-container" [style.opacity]="model.isInitialized ? 1 : 0" [style.height]="containerHeight()" [style.pointer-events]="pointerEvents" > <!-- elements --> <sti-toolbox *ngIf=" !viewerMode && !model.previewMode && !model.pdfPreviewMode && toolboxService.showToolbox && model.getBooleanSetting('showToolbox') " class="elements" [style.min-width.px]="toolbarWidth" ></sti-toolbox> <!-- workspace --> <sti-pdf-preview *ngIf="model.pdfPreviewMode" style="width:100%;height:100%"></sti-pdf-preview> <sti-workspace *ngIf="!model.pdfPreviewMode" class="workspace" [style.overflow-x]="model.viewerMode && model.isMobile() && !needToScroll() ? 'hidden' : 'auto'" ></sti-workspace> <!-- properties --> <app-properties class="properties" [style.min-width.px]=" viewerMode || model.previewMode || model.pdfPreviewMode || !model.getBooleanSetting('showProperties') ? '0' : model.propertyGridWidth " [style.max-width.px]=" viewerMode || model.previewMode || model.pdfPreviewMode || !model.getBooleanSetting('showProperties') ? '0' : model.propertyGridWidth " [style.visibility]=" viewerMode || model.previewMode || model.pdfPreviewMode || !model.getBooleanSetting('showProperties') ? 'hidden' : '' " ></app-properties> <sti-draggable-element-container></sti-draggable-element-container> <sti-clone-element-container></sti-clone-element-container> <sti-draggable-column-container></sti-draggable-column-container> <sti-barcode-styles-preview></sti-barcode-styles-preview> <sti-navbar-group-preview-component></sti-navbar-group-preview-component> <sti-user-info></sti-user-info> <sti-localization-preview></sti-localization-preview> </div> <sti-electronic-signature-editor *ngIf="model.showSignatureEditor"></sti-electronic-signature-editor> <sti-footer [style.opacity]="model.isInitialized ? 1 : 0" *ngIf="!model.pdfPreviewMode && model.getBooleanSetting('showFooter')" [style.pointer-events]="pointerEvents" ></sti-footer> <sti-file-menu *ngIf="model.fileMenuMode && model.isInitialized"></sti-file-menu> <sti-file-menu-navigation [style.visibility]="model.isInitialized ? '' : 'hidden'"></sti-file-menu-navigation> <sti-about-window-component *ngIf="model.showAboutWindow"></sti-about-window-component> <sti-progress [display]="model.showProgress"></sti-progress> <expression-draggable-container></expression-draggable-container> <sti-color-options-dialog *ngIf="model.showMoreColorDialog"></sti-color-options-dialog> <sti-color-dialog *ngIf="model.showColorDialog"></sti-color-dialog> <sti-expression-editor *ngIf="model.showExpressionEditor"></sti-expression-editor> <sti-trial-modal-window *ngIf="model.showTrialModalWindow"></sti-trial-modal-window> <sti-file-save-dialog *ngIf="model.showSaveDialog || model.showSaveDialogFromCloud"></sti-file-save-dialog> <sti-setup-toolbox-component *ngIf="model.showToolboxSetup"></sti-setup-toolbox-component> <button-message-window *ngIf="model.showButtonMessageWindow || model.showErrorWindow"></button-message-window> <sti-modal-agree-window *ngIf="model.showModalWindow || exportService.showModalWindow"></sti-modal-agree-window> <expression-help-window *ngIf="model.showHelpWindow"></expression-help-window> <sti-context-menu-window *ngIf="model.showContextMenu && !viewerMode && !model.previewMode" ></sti-context-menu-window> <sti-login *ngIf="model.login != null" [loginInfo]="model.login" (onLogin)="cloudLogin($event)"></sti-login> <sti-dropdown-list-component *ngIf="dropdownService.showDropdownList"></sti-dropdown-list-component> <sti-form-checker *ngIf="formCheckerService.showFormCheckerWindow"></sti-form-checker> <sti-draggable-modal-window *ngIf="model.showDraggableModalWindow"></sti-draggable-modal-window> <sti-tooltip *ngIf="tooltipService.showTooltip"></sti-tooltip> <sti-trial-timer-window *ngIf="model.showTrialTimerWindow"></sti-trial-timer-window> <sti-tiered-menu *ngIf="model.showTieredMenu" [menu]="helper.getAddTotalMenuItems()"></sti-tiered-menu> <form-tree-warning-window *ngIf="model.showFormTreeWarningWindow"></form-tree-warning-window> </div> `, providers: [ StiModelService, StiToolboxService, StiMouseService, StiComponentResizerService, StiDraggableService, StiHelperService, StiLocalizationService, StiToolbarResizerService, StiNameService, StiRectangleGeometryLayout, StiThemeService, StiEditableContentService, StiControllerService, StiHttpClientService, StiBarcodeService, StiColumnDraggableService, StiRichTextService, StiChangesService, StiUndoService, StiExportService, StiFontService, StiUserService, StiExpressionService, FormEventsService, SignatureService, StiColorDialogService, StiStaticHelperService, StiTabIndexService, StiDropdownService, StiFormCheckerService, StiLocalStorageService, StiDraggableModalWindowService, StiTooltipService, StiClipboardService ], styles: ["sti-file-menu{height:inherit;width:inherit}sti-file-menu-navigation{height:inherit}.flex-container{display:flex;justify-content:center;background:var(--back-color);height:calc(100% - 117px);width:100%;font-family:Segoe UI}.workspace{background-color:var(--workspace-color);display:block;justify-content:center;font-size:2.5rem;color:#000;overflow-y:auto;scroll-behavior:smooth;height:100%;flex-grow:1}*{scrollbar-width:thin;scrollbar-color:var(--thumb-color),var(--back-color)}*::-webkit-scrollbar{-webkit-appearance:none;background-color:var(--back-color);height:10px;width:10px;outline:none}*::-webkit-scrollbar-button{-webkit-appearance:none;height:3px;width:3px}*::-webkit-scrollbar-thumb{-webkit-appearance:none;background-color:var(--thumb-color);height:10px;min-width:25px;max-width:80%;border-radius:4px;border:2px solid var(--back-color)}*::-webkit-scrollbar-thumb:hover{background-color:var(--trackHover-color);height:10px}*::-webkit-scrollbar-track{-webkit-appearance:none;background-color:var(--back-color);border:1px solid var(--back-color)}*::-webkit-scrollbar-corner{background-color:var(--back-color)}.elements{background-color:var(--back-color);font-size:2.5rem;color:#000;visibility:visible;overflow-y:auto;scroll-behavior:smooth;border-right:1px solid var(--formBorder-color);padding:7px;transition:min-width .2s}.properties{background-color:var(--back-color);font-size:2.5rem;color:#000;scroll-behavior:smooth;display:flex;min-width:360px;max-width:360px;border-left:1px solid var(--formBorder-color);font-size:18px}.hovered{background-color:#d1d8e2}.sti-root-form{height:inherit;width:inherit}\n"] }] }], ctorParameters: () => [{ type: i1.StiToolbarResizerService }, { type: i2.StiModelService }, { type: i3.StiThemeService }, { type: i4.StiControllerService }, { type: i5.StiBarcodeService }, { type: StiRectangleGeometryLayout }, { type: i6.StiEditableContentService }, { type: i7.StiChangesService }, { type: i8.StiExportService }, { type: i9.StiFontService }, { type: i10.StiToolboxService }, { type: i11.StiUndoService }, { type: i12.StiUserService }, { type: i13.StiExpressionService }, { type: i14.StiHelperService }, { type: i15.StiLocalizationService }, { type: i16.StiHttpClientService }, { type: i17.SignatureService }, { type: i18.StiTabIndexService }, { type: i19.StiMouseService }, { type: i20.FormEventsService }, { type: i21.StiDropdownService }, { type: i22.StiFormCheckerService }, { type: i23.StiLocalStorageService }, { type: i24.StiTooltipService }, { type: i25.StiClipboardService }], propDecorators: { addTotalMenu: [{ type: ViewChild, args: ["addTotalMenu"] }], requestUrl: [{ type: Input }], style: [{ type: Input }], viewerMode: [{ type: Input }], readonlyMode: [{ type: Input }], form: [{ type: Input }], localization: [{ type: Input }], formName: [{ type: Input }], settings: [{ type: Input }], interfaceEvent: [{ type: Output }], properties: [{ type: Input }], rootFormElementRef: [{ type: ViewChild, args: ["rootForm"] }] } }); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3RpbXVsc29mdC1mb3Jtcy5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy9zdGltdWxzb2Z0LWZvcm1zL3NyYy9saWIvc3RpbXVsc29mdC1mb3Jtcy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUVMLFNBQVMsRUFFVCxZQUFZLEVBQ1osS0FBSyxFQUdMLE1BQU0sRUFDTixTQUFTLEdBQ1YsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTywwQkFBMEIsTUFBTSx1Q0FBdUMsQ0FBQztBQUMvRSxPQUFPLEVBQUUsc0JBQXNCLEVBQUUsTUFBTSxxQ0FBcUMsQ0FBQztBQUM3RSxPQUFPLEVBQUUsZUFBZSxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFDM0QsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzNELE9BQU8sRUFBRSwwQkFBMEIsRUFBR