UNPKG

@progress/kendo-angular-editor

Version:
80 lines (79 loc) 4.53 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Component, Input } from '@angular/core'; import { DialogRef, DialogContentBase, DialogActionsComponent, DialogTitleBarComponent } from '@progress/kendo-angular-dialog'; import { ButtonComponent } from '@progress/kendo-angular-buttons'; import { EditorLocalizationService } from '../localization/editor-localization.service'; import { EditorComponent } from '../editor.component'; import { PopupTableGridComponent } from '../tools/tables/popup-table-grid.component'; import * as i0 from "@angular/core"; import * as i1 from "@progress/kendo-angular-dialog"; import * as i2 from "../localization/editor-localization.service"; /** * @hidden */ export class InsertTableDialogComponent extends DialogContentBase { dialog; localization; editor; constructor(dialog, localization) { super(dialog); this.dialog = dialog; this.localization = localization; } onCancelAction() { this.dialog.close(); this.editor.view.focus(); } onCellClick(args) { this.dialog.close(); this.editor.exec("insertTable", args); this.editor.view.focus(); } setData(args) { this.editor = args.editor; } textFor(key) { return this.localization.get(key); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InsertTableDialogComponent, deps: [{ token: i1.DialogRef }, { token: i2.EditorLocalizationService }], target: i0.ɵɵFactoryTarget.Component }); static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.12", type: InsertTableDialogComponent, isStandalone: true, selector: "ng-component", inputs: { editor: "editor" }, usesInheritance: true, ngImport: i0, template: ` <kendo-dialog-titlebar (close)="onCancelAction()"> {{ textFor('insertTable') }} </kendo-dialog-titlebar> <div [style.text-align]="'center'"> <kendo-popup-table-grid (cellClick)="onCellClick($event)"></kendo-popup-table-grid> </div> <kendo-dialog-actions layout="start"> <button kendoButton (click)="onCancelAction()" >{{ textFor('dialogCancel') }}</button> </kendo-dialog-actions> `, isInline: true, dependencies: [{ kind: "component", type: DialogTitleBarComponent, selector: "kendo-dialog-titlebar", inputs: ["id", "closeTitle"], outputs: ["close"] }, { kind: "component", type: PopupTableGridComponent, selector: "kendo-popup-table-grid", outputs: ["cellClick", "tableWizardClick"] }, { kind: "component", type: DialogActionsComponent, selector: "kendo-dialog-actions", inputs: ["actions", "layout"], outputs: ["action"] }, { kind: "component", type: ButtonComponent, selector: "button[kendoButton]", inputs: ["arrowIcon", "toggleable", "togglable", "selected", "tabIndex", "imageUrl", "iconClass", "icon", "disabled", "size", "rounded", "fillMode", "themeColor", "svgIcon", "primary", "look"], outputs: ["selectedChange", "click"], exportAs: ["kendoButton"] }] }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: InsertTableDialogComponent, decorators: [{ type: Component, args: [{ template: ` <kendo-dialog-titlebar (close)="onCancelAction()"> {{ textFor('insertTable') }} </kendo-dialog-titlebar> <div [style.text-align]="'center'"> <kendo-popup-table-grid (cellClick)="onCellClick($event)"></kendo-popup-table-grid> </div> <kendo-dialog-actions layout="start"> <button kendoButton (click)="onCancelAction()" >{{ textFor('dialogCancel') }}</button> </kendo-dialog-actions> `, standalone: true, imports: [DialogTitleBarComponent, PopupTableGridComponent, DialogActionsComponent, ButtonComponent] }] }], ctorParameters: function () { return [{ type: i1.DialogRef }, { type: i2.EditorLocalizationService }]; }, propDecorators: { editor: [{ type: Input }] } });