@progress/kendo-angular-editor
Version:
Kendo UI Editor for Angular
43 lines (42 loc) • 2.88 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Directive } from '@angular/core';
import { ToolBarButtonComponent } from '@progress/kendo-angular-toolbar';
import { EditorCommandButton } from '../shared/editor-command-button';
import { EditorLocalizationService } from '../../localization/editor-localization.service';
import { ProviderService } from '../../common/provider.service';
import { EditorToolsService } from '../tools.service';
import * as i0 from "@angular/core";
import * as i1 from "@progress/kendo-angular-toolbar";
import * as i2 from "../../localization/editor-localization.service";
import * as i3 from "../../common/provider.service";
import * as i4 from "../tools.service";
/**
* Configures a ToolBarButtonComponent as an Editor **DeleteTable** tool
* ([see example]({% slug toolbartools_editor %}#toc-built-in-tools)).
* The directive sets the SVG icon and `click` event handlers for the button.
* The directive also updates the `disabled` state of the button based on the cursor position in the editing area.
*
* @example
* ```html
* <kendo-toolbar-button kendoEditorDeleteTableButton></kendo-toolbar-button>
* ```
* @remarks
* Applied to: {@link ToolBarButtonComponent}
*/
export class EditorDeleteTableButtonDirective extends EditorCommandButton {
constructor(button, localization, providerService, toolsService) {
super('deleteTable', button, localization, providerService, toolsService);
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditorDeleteTableButtonDirective, deps: [{ token: i1.ToolBarButtonComponent }, { token: i2.EditorLocalizationService }, { token: i3.ProviderService }, { token: i4.EditorToolsService }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: EditorDeleteTableButtonDirective, isStandalone: true, selector: "kendo-toolbar-button[kendoEditorDeleteTableButton]", usesInheritance: true, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: EditorDeleteTableButtonDirective, decorators: [{
type: Directive,
args: [{
selector: 'kendo-toolbar-button[kendoEditorDeleteTableButton]',
standalone: true
}]
}], ctorParameters: function () { return [{ type: i1.ToolBarButtonComponent }, { type: i2.EditorLocalizationService }, { type: i3.ProviderService }, { type: i4.EditorToolsService }]; } });