@progress/kendo-angular-treelist 21.4.1-develop.1 → 22.0.0-develop.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/binding-directives/base-binding.directive.d.ts +1 -1
- package/column-menu/column-menu-item-base.d.ts +1 -1
- package/columns/column-base.d.ts +1 -1
- package/editing-directives/editing-directive-base.d.ts +1 -1
- package/editing-directives/row-editing-directive-base.d.ts +1 -1
- package/fesm2022/progress-kendo-angular-treelist.mjs +519 -519
- package/filtering/base-filter-cell.component.d.ts +1 -1
- package/filtering/boolean-filter.component.d.ts +1 -1
- package/filtering/date-filter.component.d.ts +1 -1
- package/filtering/filter-host.directive.d.ts +1 -1
- package/filtering/filter-input-wrapper.component.d.ts +1 -1
- package/filtering/numeric-filter.component.d.ts +1 -1
- package/filtering/operators/filter-operator.base.d.ts +1 -1
- package/filtering/string-filter.component.d.ts +1 -1
- package/localization/messages.d.ts +1 -1
- package/package.json +23 -31
- package/schematics/ngAdd/index.js +3 -3
- package/esm2022/binding-directives/base-binding.directive.mjs +0 -180
- package/esm2022/binding-directives/data-bound-tree-component.mjs +0 -18
- package/esm2022/binding-directives/flat-binding.directive.mjs +0 -130
- package/esm2022/binding-directives/hierarchy-binding.directive.mjs +0 -109
- package/esm2022/column-menu/column-chooser-item-checked.directive.mjs +0 -45
- package/esm2022/column-menu/column-chooser.component.mjs +0 -221
- package/esm2022/column-menu/column-list-kb-nav.service.mjs +0 -40
- package/esm2022/column-menu/column-list.component.mjs +0 -380
- package/esm2022/column-menu/column-locked-change-event.mjs +0 -21
- package/esm2022/column-menu/column-menu-autosize-all.component.mjs +0 -78
- package/esm2022/column-menu/column-menu-autosize.component.mjs +0 -86
- package/esm2022/column-menu/column-menu-chooser.component.mjs +0 -164
- package/esm2022/column-menu/column-menu-container.component.mjs +0 -58
- package/esm2022/column-menu/column-menu-expandable-item.interface.mjs +0 -5
- package/esm2022/column-menu/column-menu-filter.component.mjs +0 -141
- package/esm2022/column-menu/column-menu-item-base.mjs +0 -41
- package/esm2022/column-menu/column-menu-item-content-template.directive.mjs +0 -43
- package/esm2022/column-menu/column-menu-item.component.mjs +0 -329
- package/esm2022/column-menu/column-menu-item.directive.mjs +0 -147
- package/esm2022/column-menu/column-menu-lock.component.mjs +0 -112
- package/esm2022/column-menu/column-menu-settings.interface.mjs +0 -5
- package/esm2022/column-menu/column-menu-sort.component.mjs +0 -115
- package/esm2022/column-menu/column-menu-template.directive.mjs +0 -47
- package/esm2022/column-menu/column-menu.component.mjs +0 -470
- package/esm2022/column-menu/column-menu.service.mjs +0 -70
- package/esm2022/column-menu/column-visibility-change-event.mjs +0 -19
- package/esm2022/column-menu/utils.mjs +0 -44
- package/esm2022/column-resizing/column-handle.directive.mjs +0 -226
- package/esm2022/column-resizing/column-resize.interface.mjs +0 -5
- package/esm2022/column-resizing/column-resizing.service.mjs +0 -143
- package/esm2022/column-resizing/table.directive.mjs +0 -130
- package/esm2022/columns/checkbox-column.component.mjs +0 -88
- package/esm2022/columns/column-base.mjs +0 -319
- package/esm2022/columns/column-common.mjs +0 -73
- package/esm2022/columns/column-group.component.mjs +0 -115
- package/esm2022/columns/column-list.mjs +0 -94
- package/esm2022/columns/column.component.mjs +0 -165
- package/esm2022/columns/columns-container.mjs +0 -90
- package/esm2022/columns/command-column.component.mjs +0 -77
- package/esm2022/columns/rowreorder-column.component.mjs +0 -57
- package/esm2022/columns/sort-settings.mjs +0 -17
- package/esm2022/columns/span-column.component.mjs +0 -201
- package/esm2022/common/cell-click-event-args.interface.mjs +0 -5
- package/esm2022/common/column-info.service.mjs +0 -54
- package/esm2022/common/create-form-group.mjs +0 -5
- package/esm2022/common/default-track-by.mjs +0 -13
- package/esm2022/common/dom-events.service.mjs +0 -24
- package/esm2022/common/error-messages.mjs +0 -15
- package/esm2022/common/filter-descriptor-differ.mjs +0 -69
- package/esm2022/common/filter-operator.interface.mjs +0 -5
- package/esm2022/common/id.service.mjs +0 -34
- package/esm2022/common/option-changes.service.mjs +0 -24
- package/esm2022/common/pager-settings.mjs +0 -19
- package/esm2022/common/preventable-event.mjs +0 -28
- package/esm2022/common/provider.service.mjs +0 -34
- package/esm2022/common/remove-confirmation.mjs +0 -5
- package/esm2022/common/single-popup.service.mjs +0 -132
- package/esm2022/common/sort.service.mjs +0 -14
- package/esm2022/data/change-event-args.interface.mjs +0 -5
- package/esm2022/data/change-notification.service.mjs +0 -30
- package/esm2022/data/data-item.interface.mjs +0 -5
- package/esm2022/data/data.collection.mjs +0 -503
- package/esm2022/data/treelist-item.interface.mjs +0 -5
- package/esm2022/directives.mjs +0 -291
- package/esm2022/dragdrop/column-reorder-config.mjs +0 -5
- package/esm2022/dragdrop/column-reorder-event.mjs +0 -31
- package/esm2022/dragdrop/column-reorder.service.mjs +0 -20
- package/esm2022/dragdrop/common.mjs +0 -69
- package/esm2022/dragdrop/context-types.mjs +0 -5
- package/esm2022/dragdrop/drag-and-drop.service.mjs +0 -65
- package/esm2022/dragdrop/drag-hint.service.mjs +0 -137
- package/esm2022/dragdrop/draggable-column.directive.mjs +0 -141
- package/esm2022/dragdrop/drop-cue.service.mjs +0 -46
- package/esm2022/dragdrop/drop-target.directive.mjs +0 -71
- package/esm2022/editing/add-command-tool.directive.mjs +0 -60
- package/esm2022/editing/add-command.directive.mjs +0 -96
- package/esm2022/editing/add-event-args.interface.mjs +0 -5
- package/esm2022/editing/base-command.directive.mjs +0 -95
- package/esm2022/editing/cancel-command.directive.mjs +0 -97
- package/esm2022/editing/cancel-event-args.interface.mjs +0 -5
- package/esm2022/editing/cell-close-event.mjs +0 -34
- package/esm2022/editing/edit-command.directive.mjs +0 -96
- package/esm2022/editing/edit-event-args.interface.mjs +0 -5
- package/esm2022/editing/edit-template.directive.mjs +0 -45
- package/esm2022/editing/edit.service.mjs +0 -174
- package/esm2022/editing/remove-command.directive.mjs +0 -96
- package/esm2022/editing/remove-event-args.interface.mjs +0 -5
- package/esm2022/editing/save-command.directive.mjs +0 -96
- package/esm2022/editing/save-event-args.interface.mjs +0 -5
- package/esm2022/editing-directives/create-form-group-args.interface.mjs +0 -5
- package/esm2022/editing-directives/edit-service.interface.mjs +0 -5
- package/esm2022/editing-directives/editing-directive-base.mjs +0 -137
- package/esm2022/editing-directives/flat-edit.service.mjs +0 -52
- package/esm2022/editing-directives/hierarchy-edit.service.mjs +0 -48
- package/esm2022/editing-directives/in-cell-editing.directive.mjs +0 -89
- package/esm2022/editing-directives/local-edit.service.mjs +0 -28
- package/esm2022/editing-directives/reactive-editing.directive.mjs +0 -61
- package/esm2022/editing-directives/row-editing-directive-base.mjs +0 -39
- package/esm2022/editing-directives/template-editing.directive.mjs +0 -68
- package/esm2022/editing-directives/utils.mjs +0 -41
- package/esm2022/excel/excel-command-tool.directive.mjs +0 -64
- package/esm2022/excel/excel-command.directive.mjs +0 -97
- package/esm2022/excel/excel-export-data.interface.mjs +0 -5
- package/esm2022/excel/excel-export-event.mjs +0 -15
- package/esm2022/excel/excel.component.mjs +0 -277
- package/esm2022/excel/excel.module.mjs +0 -45
- package/esm2022/excel/excel.service.mjs +0 -34
- package/esm2022/expand-state/expand-event.mjs +0 -30
- package/esm2022/expand-state/expand-state.service.mjs +0 -38
- package/esm2022/expand-state/expandable-tree-component.mjs +0 -18
- package/esm2022/expand-state/expandable.directive.mjs +0 -119
- package/esm2022/filtering/base-filter-cell.component.mjs +0 -172
- package/esm2022/filtering/boolean-filter.component.mjs +0 -91
- package/esm2022/filtering/cell/autocomplete-filter-cell.component.mjs +0 -113
- package/esm2022/filtering/cell/boolean-filter-cell.component.mjs +0 -107
- package/esm2022/filtering/cell/date-filter-cell.component.mjs +0 -132
- package/esm2022/filtering/cell/filter-cell-component.factory.mjs +0 -19
- package/esm2022/filtering/cell/filter-cell-host.directive.mjs +0 -33
- package/esm2022/filtering/cell/filter-cell-operators.component.mjs +0 -235
- package/esm2022/filtering/cell/filter-cell-template.directive.mjs +0 -46
- package/esm2022/filtering/cell/filter-cell-wrapper.component.mjs +0 -74
- package/esm2022/filtering/cell/filter-cell.component.mjs +0 -91
- package/esm2022/filtering/cell/numeric-filter-cell.component.mjs +0 -143
- package/esm2022/filtering/cell/string-filter-cell.component.mjs +0 -115
- package/esm2022/filtering/date-filter.component.mjs +0 -176
- package/esm2022/filtering/filter-component.interface.mjs +0 -5
- package/esm2022/filtering/filter-host.directive.mjs +0 -56
- package/esm2022/filtering/filter-input-wrapper.component.mjs +0 -119
- package/esm2022/filtering/filter-input.directive.mjs +0 -114
- package/esm2022/filtering/filter-row.component.mjs +0 -79
- package/esm2022/filtering/filter.service.mjs +0 -42
- package/esm2022/filtering/filterable.mjs +0 -16
- package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +0 -168
- package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +0 -174
- package/esm2022/filtering/menu/date-filter-menu.component.mjs +0 -207
- package/esm2022/filtering/menu/filter-menu-component.factory.mjs +0 -19
- package/esm2022/filtering/menu/filter-menu-container.component.mjs +0 -299
- package/esm2022/filtering/menu/filter-menu-dropdownlist.directive.mjs +0 -44
- package/esm2022/filtering/menu/filter-menu-host.directive.mjs +0 -46
- package/esm2022/filtering/menu/filter-menu-input-wrapper.component.mjs +0 -136
- package/esm2022/filtering/menu/filter-menu-template.directive.mjs +0 -43
- package/esm2022/filtering/menu/filter-menu.component.mjs +0 -202
- package/esm2022/filtering/menu/filter-radio-button.directive.mjs +0 -34
- package/esm2022/filtering/menu/menu-tabbing.service.mjs +0 -22
- package/esm2022/filtering/menu/numeric-filter-menu-input.component.mjs +0 -152
- package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +0 -224
- package/esm2022/filtering/menu/string-filter-menu-input.component.mjs +0 -105
- package/esm2022/filtering/menu/string-filter-menu.component.mjs +0 -183
- package/esm2022/filtering/numeric-filter.component.mjs +0 -144
- package/esm2022/filtering/operators/after-eq-filter-operator.component.mjs +0 -72
- package/esm2022/filtering/operators/after-filter-operator.component.mjs +0 -72
- package/esm2022/filtering/operators/before-eq-filter-operator.component.mjs +0 -72
- package/esm2022/filtering/operators/before-filter-operator.component.mjs +0 -72
- package/esm2022/filtering/operators/contains-filter-operator.component.mjs +0 -64
- package/esm2022/filtering/operators/ends-with-filter-operator.component.mjs +0 -64
- package/esm2022/filtering/operators/eq-filter-operator.component.mjs +0 -112
- package/esm2022/filtering/operators/filter-operator.base.mjs +0 -98
- package/esm2022/filtering/operators/gt-filter-operator.component.mjs +0 -63
- package/esm2022/filtering/operators/gte-filter-operator.component.mjs +0 -63
- package/esm2022/filtering/operators/is-empty-filter-operator.component.mjs +0 -64
- package/esm2022/filtering/operators/is-not-empty-filter-operator.component.mjs +0 -64
- package/esm2022/filtering/operators/is-not-null-filter-operator.component.mjs +0 -112
- package/esm2022/filtering/operators/isnull-filter-operator.component.mjs +0 -112
- package/esm2022/filtering/operators/lt-filter-operator.component.mjs +0 -63
- package/esm2022/filtering/operators/lte-filter-operator.component.mjs +0 -63
- package/esm2022/filtering/operators/neq-filter-operator.component.mjs +0 -112
- package/esm2022/filtering/operators/not-contains-filter-operator.component.mjs +0 -64
- package/esm2022/filtering/operators/starts-with-filter-operator.component.mjs +0 -64
- package/esm2022/filtering/string-filter.component.mjs +0 -89
- package/esm2022/index.mjs +0 -146
- package/esm2022/layout/browser-support.service.mjs +0 -85
- package/esm2022/layout/resizable.directive.mjs +0 -83
- package/esm2022/layout/resize.service.mjs +0 -29
- package/esm2022/layout/responsive.service.mjs +0 -34
- package/esm2022/layout/row-sync.mjs +0 -47
- package/esm2022/localization/custom-messages.component.mjs +0 -53
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -510
- package/esm2022/navigation/default-focusable-element.mjs +0 -47
- package/esm2022/navigation/focus-group.mjs +0 -105
- package/esm2022/navigation/focus-root.mjs +0 -50
- package/esm2022/navigation/focusable-element.interface.mjs +0 -5
- package/esm2022/navigation/focusable.directive.mjs +0 -174
- package/esm2022/navigation/item-map.mjs +0 -59
- package/esm2022/navigation/logical-cell.directive.mjs +0 -187
- package/esm2022/navigation/logical-cell.interface.mjs +0 -5
- package/esm2022/navigation/logical-row.directive.mjs +0 -135
- package/esm2022/navigation/logical-row.interface.mjs +0 -5
- package/esm2022/navigation/model-cell.mjs +0 -37
- package/esm2022/navigation/navigation-cell.interface.mjs +0 -5
- package/esm2022/navigation/navigation-change.interface.mjs +0 -5
- package/esm2022/navigation/navigation-cursor.mjs +0 -176
- package/esm2022/navigation/navigation-metadata.mjs +0 -31
- package/esm2022/navigation/navigation-mode.mjs +0 -5
- package/esm2022/navigation/navigation-model.mjs +0 -126
- package/esm2022/navigation/navigation-row.interface.mjs +0 -5
- package/esm2022/navigation/navigation.service.mjs +0 -695
- package/esm2022/navigation/treelist-focusable-element.mjs +0 -28
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/pdf/export-element.mjs +0 -129
- package/esm2022/pdf/pdf-command-tool.directive.mjs +0 -68
- package/esm2022/pdf/pdf-command.directive.mjs +0 -101
- package/esm2022/pdf/pdf-export-event.mjs +0 -18
- package/esm2022/pdf/pdf-margin.component.mjs +0 -33
- package/esm2022/pdf/pdf-margin.interface.mjs +0 -5
- package/esm2022/pdf/pdf-template.directive.mjs +0 -45
- package/esm2022/pdf/pdf.component.mjs +0 -269
- package/esm2022/pdf/pdf.module.mjs +0 -48
- package/esm2022/pdf/pdf.service.mjs +0 -40
- package/esm2022/pdf/treelist-query.mjs +0 -45
- package/esm2022/progress-kendo-angular-treelist.mjs +0 -8
- package/esm2022/rendering/cell-template.directive.mjs +0 -49
- package/esm2022/rendering/cell.component.mjs +0 -383
- package/esm2022/rendering/common/col-group.component.mjs +0 -39
- package/esm2022/rendering/common/dom-queries.mjs +0 -158
- package/esm2022/rendering/common/field-accessor.pipe.mjs +0 -48
- package/esm2022/rendering/common/level-items.pipe.mjs +0 -30
- package/esm2022/rendering/common/loading.component.mjs +0 -42
- package/esm2022/rendering/common/row-class.mjs +0 -5
- package/esm2022/rendering/common/spacer.component.mjs +0 -61
- package/esm2022/rendering/constants.mjs +0 -28
- package/esm2022/rendering/footer-template.directive.mjs +0 -45
- package/esm2022/rendering/header/header-template.directive.mjs +0 -45
- package/esm2022/rendering/header/header.component.mjs +0 -978
- package/esm2022/rendering/header/select-all-checkbox.directive.mjs +0 -90
- package/esm2022/rendering/list.component.mjs +0 -850
- package/esm2022/rendering/no-records-template.directive.mjs +0 -40
- package/esm2022/rendering/table-body.component.mjs +0 -665
- package/esm2022/rendering/toolbar/toolbar-focusable.directive.mjs +0 -77
- package/esm2022/rendering/toolbar/toolbar-navigation.service.mjs +0 -54
- package/esm2022/rendering/toolbar/toolbar-template.directive.mjs +0 -58
- package/esm2022/rendering/toolbar/toolbar.component.mjs +0 -110
- package/esm2022/row-reordering/flat-reorder.service.mjs +0 -48
- package/esm2022/row-reordering/hierarchical-reorder.service.mjs +0 -55
- package/esm2022/row-reordering/row-reorder.service.mjs +0 -273
- package/esm2022/row-reordering/types.mjs +0 -5
- package/esm2022/row-reordering/utils.mjs +0 -128
- package/esm2022/scrolling/content-scroll-event.mjs +0 -5
- package/esm2022/scrolling/row-height.service.mjs +0 -30
- package/esm2022/scrolling/scroll-bottom-event.mjs +0 -5
- package/esm2022/scrolling/scroll-request.service.mjs +0 -21
- package/esm2022/scrolling/scroll-sync.service.mjs +0 -80
- package/esm2022/scrolling/scroller.service.mjs +0 -112
- package/esm2022/scrolling/scrollmode.mjs +0 -5
- package/esm2022/scrolling/suspend.service.mjs +0 -17
- package/esm2022/selection/is-selected.mjs +0 -5
- package/esm2022/selection/marquee.directive.mjs +0 -196
- package/esm2022/selection/selectable-settings.mjs +0 -5
- package/esm2022/selection/selectable.directive.mjs +0 -223
- package/esm2022/selection/selection-change-event.mjs +0 -28
- package/esm2022/selection/selection-state.mjs +0 -104
- package/esm2022/selection/selection.service.mjs +0 -264
- package/esm2022/treelist.component.mjs +0 -3111
- package/esm2022/treelist.module.mjs +0 -183
- package/esm2022/utils.mjs +0 -113
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, Renderer2, NgZone, HostBinding, Input } from '@angular/core';
|
|
6
|
-
import { NgClass } from '@angular/common';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
9
|
-
import { EditService } from './edit.service';
|
|
10
|
-
import { BaseCommandDirective } from './base-command.directive';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "./edit.service";
|
|
13
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
14
|
-
/**
|
|
15
|
-
* Represents the `edit` command of the TreeList. Apply this directive to any `button` element inside a [`CommandColumnComponent`]({% slug api_treelist_commandcolumncomponent %}).
|
|
16
|
-
*
|
|
17
|
-
* When the user clicks a button with this directive, the [`edit`]({% slug api_treelist_treelistcomponent %}#toc-edit) event is triggered ([see example](slug:custom_editors_editing_treelist)).
|
|
18
|
-
*
|
|
19
|
-
* The button with `kendoTreeListEditCommand` is automatically hidden when the row is in edit mode. The directive takes the `cellContext` from the cell template as input.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-treelist ...>
|
|
24
|
-
* <kendo-treelist-command-column title="command">
|
|
25
|
-
* <ng-template kendoTreeListCellTemplate let-cellContext="cellContext">
|
|
26
|
-
* <button [kendoTreeListEditCommand]="cellContext">Edit</button>
|
|
27
|
-
* </ng-template>
|
|
28
|
-
* </kendo-treelist-command-column>
|
|
29
|
-
* </kendo-treelist>
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export class EditCommandDirective extends BaseCommandDirective {
|
|
33
|
-
/**
|
|
34
|
-
* Provides the `cellContext` to the template.
|
|
35
|
-
*/
|
|
36
|
-
cellContext;
|
|
37
|
-
commandClass = true;
|
|
38
|
-
readVisible = true;
|
|
39
|
-
constructor(editService, element, renderer, localization, ngZone) {
|
|
40
|
-
super(editService, element, renderer, localization, ngZone);
|
|
41
|
-
}
|
|
42
|
-
onClick() {
|
|
43
|
-
if (this.cellContext) {
|
|
44
|
-
this.editService.beginEdit(this.dataItem);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditCommandDirective, deps: [{ token: i1.EditService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: EditCommandDirective, isStandalone: true, selector: "[kendoTreeListEditCommand]", inputs: { cellContext: ["kendoTreeListEditCommand", "cellContext"] }, host: { properties: { "class.k-grid-edit-command": "this.commandClass" } }, usesInheritance: true, ngImport: i0, template: `
|
|
49
|
-
@if (icon || svgIcon) {
|
|
50
|
-
<kendo-icon-wrapper
|
|
51
|
-
innerCssClass="k-button-icon"
|
|
52
|
-
[name]="icon"
|
|
53
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
54
|
-
}
|
|
55
|
-
@if (imageUrl) {
|
|
56
|
-
<span class="k-button-icon k-icon">
|
|
57
|
-
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
58
|
-
</span>
|
|
59
|
-
}
|
|
60
|
-
@if (iconClass) {
|
|
61
|
-
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
62
|
-
}
|
|
63
|
-
<span class="k-button-text"><ng-content></ng-content></span>
|
|
64
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
65
|
-
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditCommandDirective, decorators: [{
|
|
67
|
-
type: Component,
|
|
68
|
-
args: [{
|
|
69
|
-
selector: '[kendoTreeListEditCommand]',
|
|
70
|
-
template: `
|
|
71
|
-
@if (icon || svgIcon) {
|
|
72
|
-
<kendo-icon-wrapper
|
|
73
|
-
innerCssClass="k-button-icon"
|
|
74
|
-
[name]="icon"
|
|
75
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
76
|
-
}
|
|
77
|
-
@if (imageUrl) {
|
|
78
|
-
<span class="k-button-icon k-icon">
|
|
79
|
-
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
80
|
-
</span>
|
|
81
|
-
}
|
|
82
|
-
@if (iconClass) {
|
|
83
|
-
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
84
|
-
}
|
|
85
|
-
<span class="k-button-text"><ng-content></ng-content></span>
|
|
86
|
-
`,
|
|
87
|
-
standalone: true,
|
|
88
|
-
imports: [IconWrapperComponent, NgClass]
|
|
89
|
-
}]
|
|
90
|
-
}], ctorParameters: () => [{ type: i1.EditService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.NgZone }], propDecorators: { cellContext: [{
|
|
91
|
-
type: Input,
|
|
92
|
-
args: ['kendoTreeListEditCommand']
|
|
93
|
-
}], commandClass: [{
|
|
94
|
-
type: HostBinding,
|
|
95
|
-
args: ['class.k-grid-edit-command']
|
|
96
|
-
}] } });
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, TemplateRef, Optional } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* Represents the column edit-cell template of the TreeList ([see example](slug:editing_template_forms_treelist)). Use this directive to customize the content of edited cells. To define the cell template, nest an `<ng-template>` tag with the `kendoTreeListEditTemplate` directive inside a `<kendo-treelist-column>` tag.
|
|
9
|
-
*
|
|
10
|
-
* The template context contains the following fields:
|
|
11
|
-
* - `column`—The current column instance.
|
|
12
|
-
* - `dataItem`—The current data item.
|
|
13
|
-
* - `cellContext`—An object used to pass context information to built-in directives.
|
|
14
|
-
* - `formGroup`—The current [`FormGroup`](link:site.data.urls.angular['formgroupapi']). If you use the TreeList inside [Template-Driven Forms](link:site.data.urls.angular['forms']), `formGroup` is `undefined`.
|
|
15
|
-
* - `isNew`—The state of the current item.
|
|
16
|
-
* - `rowIndex`—The current row index. If inside a new item row, `rowIndex` is `-1`.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```html
|
|
20
|
-
* <kendo-treelist ...>
|
|
21
|
-
* <kendo-treelist-command-column title="command">
|
|
22
|
-
* <ng-template kendoTreeListEditTemplate let-rowIndex="rowIndex">
|
|
23
|
-
* {{rowIndex}}
|
|
24
|
-
* </ng-template>
|
|
25
|
-
* </kendo-treelist-command-column>
|
|
26
|
-
* </kendo-treelist>
|
|
27
|
-
* ```
|
|
28
|
-
*/
|
|
29
|
-
export class EditTemplateDirective {
|
|
30
|
-
templateRef;
|
|
31
|
-
constructor(templateRef) {
|
|
32
|
-
this.templateRef = templateRef;
|
|
33
|
-
}
|
|
34
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
35
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditTemplateDirective, isStandalone: true, selector: "[kendoTreeListEditTemplate]", ngImport: i0 });
|
|
36
|
-
}
|
|
37
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditTemplateDirective, decorators: [{
|
|
38
|
-
type: Directive,
|
|
39
|
-
args: [{
|
|
40
|
-
selector: '[kendoTreeListEditTemplate]',
|
|
41
|
-
standalone: true
|
|
42
|
-
}]
|
|
43
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
|
|
44
|
-
type: Optional
|
|
45
|
-
}] }] });
|
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable, EventEmitter, NgZone } from '@angular/core';
|
|
6
|
-
import { isPresent, isColumnEditable } from '../utils';
|
|
7
|
-
import { CellCloseEvent } from './cell-close-event';
|
|
8
|
-
import { Subject } from 'rxjs';
|
|
9
|
-
import { switchMap, take } from 'rxjs/operators';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
const identity = item => item;
|
|
12
|
-
/**
|
|
13
|
-
* @hidden
|
|
14
|
-
*/
|
|
15
|
-
export class EditService {
|
|
16
|
-
ngZone;
|
|
17
|
-
changes = new EventEmitter();
|
|
18
|
-
changed;
|
|
19
|
-
get newItemGroup() {
|
|
20
|
-
return this.newItem ? this.newItem.group : null;
|
|
21
|
-
}
|
|
22
|
-
newItem;
|
|
23
|
-
idGetter = identity;
|
|
24
|
-
// Maps IDs to edited rows
|
|
25
|
-
edited = new Map();
|
|
26
|
-
keepEditCell = false;
|
|
27
|
-
keepCellTimeout;
|
|
28
|
-
column;
|
|
29
|
-
closingCell = false;
|
|
30
|
-
changedSource = new Subject();
|
|
31
|
-
constructor(ngZone) {
|
|
32
|
-
this.ngZone = ngZone;
|
|
33
|
-
this.changed = this.changedSource.asObservable().pipe(switchMap(() => this.ngZone.onStable.asObservable().pipe(take(1))));
|
|
34
|
-
}
|
|
35
|
-
editRow(dataItem, group = undefined) {
|
|
36
|
-
this.edited.set(this.idGetter(dataItem), {
|
|
37
|
-
group,
|
|
38
|
-
item: dataItem
|
|
39
|
-
});
|
|
40
|
-
this.onChanged();
|
|
41
|
-
}
|
|
42
|
-
addRow(parent, group) {
|
|
43
|
-
this.newItem = { parent, group, dataItem: group ? group.value : null };
|
|
44
|
-
this.onChanged();
|
|
45
|
-
}
|
|
46
|
-
editCell(item, column, group) {
|
|
47
|
-
if (!isColumnEditable(column, group)) {
|
|
48
|
-
return;
|
|
49
|
-
}
|
|
50
|
-
this.preventCellClose();
|
|
51
|
-
if (!this.closeCell()) {
|
|
52
|
-
this.editRow(item, group);
|
|
53
|
-
this.column = column;
|
|
54
|
-
this.onChanged();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
isEditing() {
|
|
58
|
-
return this.edited.size > 0;
|
|
59
|
-
}
|
|
60
|
-
isEdited(dataItem) {
|
|
61
|
-
return (this.newItem && this.newItem.dataItem === dataItem) ||
|
|
62
|
-
this.edited.has(this.idGetter(dataItem));
|
|
63
|
-
}
|
|
64
|
-
isEditingCell() {
|
|
65
|
-
return isPresent(this.column);
|
|
66
|
-
}
|
|
67
|
-
isEditingColumn(column) {
|
|
68
|
-
return this.column === column;
|
|
69
|
-
}
|
|
70
|
-
isEditedColumn(column) {
|
|
71
|
-
return !this.column || this.column === column;
|
|
72
|
-
}
|
|
73
|
-
hasNew(parent) {
|
|
74
|
-
return Boolean(this.newItem && ((!this.newItem.parent && !parent) ||
|
|
75
|
-
this.idGetter(this.newItem.parent) === this.idGetter(parent)));
|
|
76
|
-
}
|
|
77
|
-
get newDataItem() {
|
|
78
|
-
if (this.newItem) {
|
|
79
|
-
return this.newItem.group.value;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
close(item, isNew) {
|
|
83
|
-
if (isNew) { // parent
|
|
84
|
-
this.newItem = undefined;
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
this.edited.delete(this.idGetter(item));
|
|
88
|
-
delete this.column;
|
|
89
|
-
this.onChanged();
|
|
90
|
-
}
|
|
91
|
-
closeCell(originalEvent) {
|
|
92
|
-
if (this.column && !this.closingCell) {
|
|
93
|
-
return this.ngZone.run(() => {
|
|
94
|
-
const { item, group } = this.first;
|
|
95
|
-
const args = new CellCloseEvent({
|
|
96
|
-
column: this.column,
|
|
97
|
-
formGroup: group,
|
|
98
|
-
originalEvent: originalEvent,
|
|
99
|
-
dataItem: item
|
|
100
|
-
});
|
|
101
|
-
this.closingCell = true;
|
|
102
|
-
this.changes.emit(args);
|
|
103
|
-
this.closingCell = false;
|
|
104
|
-
if (!args.isDefaultPrevented()) {
|
|
105
|
-
this.cancelCell();
|
|
106
|
-
}
|
|
107
|
-
return args.isDefaultPrevented();
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
cancelCell() {
|
|
112
|
-
if (this.column) {
|
|
113
|
-
this.edited.clear();
|
|
114
|
-
this.column = null;
|
|
115
|
-
this.onChanged();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
shouldCloseCell() {
|
|
119
|
-
return this.column && !this.keepEditCell;
|
|
120
|
-
}
|
|
121
|
-
preventCellClose() {
|
|
122
|
-
this.ngZone.runOutsideAngular(() => {
|
|
123
|
-
window.clearTimeout(this.keepCellTimeout);
|
|
124
|
-
this.keepEditCell = true;
|
|
125
|
-
this.keepCellTimeout = window.setTimeout(() => {
|
|
126
|
-
this.keepEditCell = false;
|
|
127
|
-
}, 0);
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
context(dataItem) {
|
|
131
|
-
return this.edited.get(this.idGetter(dataItem));
|
|
132
|
-
}
|
|
133
|
-
beginEdit(item) {
|
|
134
|
-
this.changes.emit({ action: 'edit', dataItem: item });
|
|
135
|
-
}
|
|
136
|
-
beginAdd(parent) {
|
|
137
|
-
this.changes.emit({ action: 'add', parent });
|
|
138
|
-
}
|
|
139
|
-
endEdit(dataItem, isNew) {
|
|
140
|
-
const formGroup = isNew ? this.newItemGroup : this.context(dataItem).group;
|
|
141
|
-
this.changes.emit({ action: 'cancel', dataItem, formGroup, isNew });
|
|
142
|
-
}
|
|
143
|
-
save(item, isNew) {
|
|
144
|
-
const args = { action: 'save', isNew: isNew };
|
|
145
|
-
if (isNew) {
|
|
146
|
-
args.parent = this.newItem.parent;
|
|
147
|
-
args.formGroup = this.newItem.group;
|
|
148
|
-
args.dataItem = item;
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
args.dataItem = item;
|
|
152
|
-
args.formGroup = this.context(item).group;
|
|
153
|
-
}
|
|
154
|
-
this.changes.emit(args);
|
|
155
|
-
}
|
|
156
|
-
remove(dataItem, parent) {
|
|
157
|
-
this.changes.emit({ action: 'remove', dataItem, parent });
|
|
158
|
-
}
|
|
159
|
-
onChanged() {
|
|
160
|
-
this.ngZone.runOutsideAngular(() => {
|
|
161
|
-
this.changedSource.next(undefined);
|
|
162
|
-
});
|
|
163
|
-
}
|
|
164
|
-
get first() {
|
|
165
|
-
if (this.isEditing()) {
|
|
166
|
-
return this.edited.values().next().value;
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditService, deps: [{ token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
170
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditService });
|
|
171
|
-
}
|
|
172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditService, decorators: [{
|
|
173
|
-
type: Injectable
|
|
174
|
-
}], ctorParameters: () => [{ type: i0.NgZone }] });
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, Renderer2, NgZone, HostBinding, Input } from '@angular/core';
|
|
6
|
-
import { NgClass } from '@angular/common';
|
|
7
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
8
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
9
|
-
import { EditService } from './edit.service';
|
|
10
|
-
import { BaseCommandDirective } from './base-command.directive';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "./edit.service";
|
|
13
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
14
|
-
/**
|
|
15
|
-
* Represents the `remove` command of the TreeList. Apply this directive to any `button` element inside a [`CommandColumnComponent`]({% slug api_treelist_commandcolumncomponent %}).
|
|
16
|
-
*
|
|
17
|
-
* When the user clicks a button with this directive, the [`remove` event]({% slug api_treelist_treelistcomponent %}#toc-remove) is triggered ([see example]({% slug editing_reactive_forms_treelist %})).
|
|
18
|
-
*
|
|
19
|
-
* The button with `kendoTreeListRemoveCommand` is automatically hidden when the row is in edit mode. The directive takes the `cellContext` from the cell template as input.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-treelist ...>
|
|
24
|
-
* <kendo-treelist-command-column title="command">
|
|
25
|
-
* <ng-template kendoTreeListCellTemplate let-cellContext="cellContext">
|
|
26
|
-
* <button [kendoTreeListRemoveCommand]="cellContext">Remove row</button>
|
|
27
|
-
* </ng-template>
|
|
28
|
-
* </kendo-treelist-command-column>
|
|
29
|
-
* </kendo-treelist>
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export class RemoveCommandDirective extends BaseCommandDirective {
|
|
33
|
-
/**
|
|
34
|
-
* Provides the `cellContext` to the template.
|
|
35
|
-
*/
|
|
36
|
-
cellContext;
|
|
37
|
-
commandClass = true;
|
|
38
|
-
readVisible = true;
|
|
39
|
-
constructor(editService, element, renderer, localization, ngZone) {
|
|
40
|
-
super(editService, element, renderer, localization, ngZone);
|
|
41
|
-
}
|
|
42
|
-
onClick() {
|
|
43
|
-
if (this.cellContext) {
|
|
44
|
-
this.editService.remove(this.dataItem, (this.cellContext.viewItem.parent || {}).data);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RemoveCommandDirective, deps: [{ token: i1.EditService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: RemoveCommandDirective, isStandalone: true, selector: "[kendoTreeListRemoveCommand]", inputs: { cellContext: ["kendoTreeListRemoveCommand", "cellContext"] }, host: { properties: { "class.k-grid-remove-command": "this.commandClass" } }, usesInheritance: true, ngImport: i0, template: `
|
|
49
|
-
@if (icon || svgIcon) {
|
|
50
|
-
<kendo-icon-wrapper
|
|
51
|
-
innerCssClass="k-button-icon"
|
|
52
|
-
[name]="icon"
|
|
53
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
54
|
-
}
|
|
55
|
-
@if (imageUrl) {
|
|
56
|
-
<span class="k-button-icon k-icon">
|
|
57
|
-
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
58
|
-
</span>
|
|
59
|
-
}
|
|
60
|
-
@if (iconClass) {
|
|
61
|
-
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
62
|
-
}
|
|
63
|
-
<span class="k-button-text"><ng-content></ng-content></span>
|
|
64
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
65
|
-
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: RemoveCommandDirective, decorators: [{
|
|
67
|
-
type: Component,
|
|
68
|
-
args: [{
|
|
69
|
-
selector: '[kendoTreeListRemoveCommand]',
|
|
70
|
-
template: `
|
|
71
|
-
@if (icon || svgIcon) {
|
|
72
|
-
<kendo-icon-wrapper
|
|
73
|
-
innerCssClass="k-button-icon"
|
|
74
|
-
[name]="icon"
|
|
75
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
76
|
-
}
|
|
77
|
-
@if (imageUrl) {
|
|
78
|
-
<span class="k-button-icon k-icon">
|
|
79
|
-
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
80
|
-
</span>
|
|
81
|
-
}
|
|
82
|
-
@if (iconClass) {
|
|
83
|
-
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
84
|
-
}
|
|
85
|
-
<span class="k-button-text"><ng-content></ng-content></span>
|
|
86
|
-
`,
|
|
87
|
-
standalone: true,
|
|
88
|
-
imports: [IconWrapperComponent, NgClass]
|
|
89
|
-
}]
|
|
90
|
-
}], ctorParameters: () => [{ type: i1.EditService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.NgZone }], propDecorators: { cellContext: [{
|
|
91
|
-
type: Input,
|
|
92
|
-
args: ['kendoTreeListRemoveCommand']
|
|
93
|
-
}], commandClass: [{
|
|
94
|
-
type: HostBinding,
|
|
95
|
-
args: ['class.k-grid-remove-command']
|
|
96
|
-
}] } });
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Component, ElementRef, Renderer2, NgZone, HostBinding, Input } from '@angular/core';
|
|
6
|
-
import { NgClass } from '@angular/common';
|
|
7
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
8
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
9
|
-
import { EditService } from './edit.service';
|
|
10
|
-
import { BaseCommandDirective } from './base-command.directive';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "./edit.service";
|
|
13
|
-
import * as i2 from "@progress/kendo-angular-l10n";
|
|
14
|
-
/**
|
|
15
|
-
* Represents the `save` command of the TreeList. Apply this directive to any `button` element inside a [`CommandColumnComponent`]({% slug api_treelist_commandcolumncomponent %}).
|
|
16
|
-
*
|
|
17
|
-
* When the user clicks a button with this directive, the [`save`]({% slug api_treelist_treelistcomponent %}#toc-save) event is triggered ([see example]({% slug editing_treelist %})).
|
|
18
|
-
*
|
|
19
|
-
* The button with `kendoTreeListSaveCommand` is automatically hidden when the row is not in edit mode. The directive takes the `cellContext` from the cell template as input.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-treelist ...>
|
|
24
|
-
* <kendo-treelist-command-column title="command">
|
|
25
|
-
* <ng-template kendoTreeListCellTemplate let-cellContext="cellContext">
|
|
26
|
-
* <button [kendoTreeListSaveCommand]="cellContext">Save changes</button>
|
|
27
|
-
* </ng-template>
|
|
28
|
-
* </kendo-treelist-command-column>
|
|
29
|
-
* </kendo-treelist>
|
|
30
|
-
* ```
|
|
31
|
-
*/
|
|
32
|
-
export class SaveCommandDirective extends BaseCommandDirective {
|
|
33
|
-
/**
|
|
34
|
-
* Provides the `cellContext` to the template.
|
|
35
|
-
*/
|
|
36
|
-
cellContext;
|
|
37
|
-
commandClass = true;
|
|
38
|
-
readVisible = false;
|
|
39
|
-
constructor(editService, element, renderer, localization, ngZone) {
|
|
40
|
-
super(editService, element, renderer, localization, ngZone);
|
|
41
|
-
}
|
|
42
|
-
onClick() {
|
|
43
|
-
if (this.cellContext) {
|
|
44
|
-
this.editService.save(this.dataItem, this.cellContext.viewItem.isNew);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SaveCommandDirective, deps: [{ token: i1.EditService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i2.LocalizationService }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
48
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: SaveCommandDirective, isStandalone: true, selector: "[kendoTreeListSaveCommand]", inputs: { cellContext: ["kendoTreeListSaveCommand", "cellContext"] }, host: { properties: { "class.k-grid-save-command": "this.commandClass" } }, usesInheritance: true, ngImport: i0, template: `
|
|
49
|
-
@if (icon || svgIcon) {
|
|
50
|
-
<kendo-icon-wrapper
|
|
51
|
-
innerCssClass="k-button-icon"
|
|
52
|
-
[name]="icon"
|
|
53
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
54
|
-
}
|
|
55
|
-
@if (imageUrl) {
|
|
56
|
-
<span class="k-button-icon k-icon">
|
|
57
|
-
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
58
|
-
</span>
|
|
59
|
-
}
|
|
60
|
-
@if (iconClass) {
|
|
61
|
-
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
62
|
-
}
|
|
63
|
-
<span class="k-button-text"><ng-content></ng-content></span>
|
|
64
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
65
|
-
}
|
|
66
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SaveCommandDirective, decorators: [{
|
|
67
|
-
type: Component,
|
|
68
|
-
args: [{
|
|
69
|
-
selector: '[kendoTreeListSaveCommand]',
|
|
70
|
-
template: `
|
|
71
|
-
@if (icon || svgIcon) {
|
|
72
|
-
<kendo-icon-wrapper
|
|
73
|
-
innerCssClass="k-button-icon"
|
|
74
|
-
[name]="icon"
|
|
75
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
76
|
-
}
|
|
77
|
-
@if (imageUrl) {
|
|
78
|
-
<span class="k-button-icon k-icon">
|
|
79
|
-
<img [src]="imageUrl" class="k-image" role="presentation" />
|
|
80
|
-
</span>
|
|
81
|
-
}
|
|
82
|
-
@if (iconClass) {
|
|
83
|
-
<span class="k-button-icon" [ngClass]="iconClass"></span>
|
|
84
|
-
}
|
|
85
|
-
<span class="k-button-text"><ng-content></ng-content></span>
|
|
86
|
-
`,
|
|
87
|
-
standalone: true,
|
|
88
|
-
imports: [IconWrapperComponent, NgClass]
|
|
89
|
-
}]
|
|
90
|
-
}], ctorParameters: () => [{ type: i1.EditService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i2.LocalizationService }, { type: i0.NgZone }], propDecorators: { cellContext: [{
|
|
91
|
-
type: Input,
|
|
92
|
-
args: ['kendoTreeListSaveCommand']
|
|
93
|
-
}], commandClass: [{
|
|
94
|
-
type: HostBinding,
|
|
95
|
-
args: ['class.k-grid-save-command']
|
|
96
|
-
}] } });
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|