@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,329 +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, Input, Output, EventEmitter, ContentChild } from '@angular/core';
|
|
6
|
-
import { NgTemplateOutlet } from '@angular/common';
|
|
7
|
-
import { trigger, transition, style, animate, state } from '@angular/animations';
|
|
8
|
-
import { chevronDownIcon, chevronUpIcon } from '@progress/kendo-svg-icons';
|
|
9
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
10
|
-
import { ColumnMenuItemContentTemplateDirective } from './column-menu-item-content-template.directive';
|
|
11
|
-
import { ColumnMenuService } from './column-menu.service';
|
|
12
|
-
import { guid } from '@progress/kendo-angular-common';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
/**
|
|
15
|
-
* Represents an item you can place inside a [`ColumnMenuTemplate`]({% slug api_treelist_columnmenutemplatedirective %}) directive.
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```html
|
|
19
|
-
* <kendo-treelist ...>
|
|
20
|
-
* <ng-template kendoTreeListColumnMenuTemplate let-service="service" let-column="column">
|
|
21
|
-
* <kendo-treelist-columnmenu-item text="Fit column"></kendo-treelist-columnmenu-item>
|
|
22
|
-
* </ng-template>
|
|
23
|
-
* </kendo-treelist>
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export class ColumnMenuItemComponent {
|
|
27
|
-
/**
|
|
28
|
-
* Fires when the item is clicked.
|
|
29
|
-
*/
|
|
30
|
-
itemClick = new EventEmitter();
|
|
31
|
-
/**
|
|
32
|
-
* Fires when the content expands.
|
|
33
|
-
*/
|
|
34
|
-
expand = new EventEmitter();
|
|
35
|
-
/**
|
|
36
|
-
* Fires when the content collapses.
|
|
37
|
-
*/
|
|
38
|
-
collapse = new EventEmitter();
|
|
39
|
-
/**
|
|
40
|
-
* Sets the name of the [font icon](slug:icons#icons-list) rendered for the item.
|
|
41
|
-
*/
|
|
42
|
-
icon;
|
|
43
|
-
/**
|
|
44
|
-
* Sets the name of the [SVG icon]({% slug svgicon_list %}) rendered for the item.
|
|
45
|
-
*/
|
|
46
|
-
svgIcon;
|
|
47
|
-
/**
|
|
48
|
-
* Sets the item text.
|
|
49
|
-
*/
|
|
50
|
-
text;
|
|
51
|
-
/**
|
|
52
|
-
* Specifies if the item is selected.
|
|
53
|
-
*/
|
|
54
|
-
selected;
|
|
55
|
-
/**
|
|
56
|
-
* Specifies if the item is disabled.
|
|
57
|
-
*/
|
|
58
|
-
disabled;
|
|
59
|
-
/**
|
|
60
|
-
* Specifies if the item is expanded.
|
|
61
|
-
*/
|
|
62
|
-
expanded;
|
|
63
|
-
/**
|
|
64
|
-
* Provides the [ColumnMenuService]({% slug api_treelist_columnmenuservice %}) instance.
|
|
65
|
-
* Required to include the item in the column menu keyboard navigation sequence.
|
|
66
|
-
*/
|
|
67
|
-
service;
|
|
68
|
-
contentTemplate;
|
|
69
|
-
contentState = 'collapsed';
|
|
70
|
-
contentId;
|
|
71
|
-
chevronUpIcon = chevronUpIcon;
|
|
72
|
-
chevronDownIcon = chevronDownIcon;
|
|
73
|
-
get expandedIcon() {
|
|
74
|
-
return this.expanded ? 'arrow-chevron-up' : 'arrow-chevron-down';
|
|
75
|
-
}
|
|
76
|
-
get expandedSvgIcon() {
|
|
77
|
-
return this.expanded ? this.chevronUpIcon : this.chevronDownIcon;
|
|
78
|
-
}
|
|
79
|
-
ngAfterViewInit() {
|
|
80
|
-
this.contentTemplate && (this.contentId = `k-${guid()}`);
|
|
81
|
-
}
|
|
82
|
-
ngOnChanges(changes) {
|
|
83
|
-
if (changes.expanded) {
|
|
84
|
-
this.updateContentState();
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* @hidden
|
|
89
|
-
*/
|
|
90
|
-
onClick(e) {
|
|
91
|
-
this.itemClick.emit(e);
|
|
92
|
-
if (this.contentTemplate) {
|
|
93
|
-
this.expanded = !this.expanded;
|
|
94
|
-
this.updateContentState();
|
|
95
|
-
if (this.expanded) {
|
|
96
|
-
this.expand.emit();
|
|
97
|
-
}
|
|
98
|
-
else {
|
|
99
|
-
this.collapse.emit();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
updateContentState() {
|
|
104
|
-
this.contentState = this.expanded ? 'expanded' : 'collapsed';
|
|
105
|
-
}
|
|
106
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
107
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ColumnMenuItemComponent, isStandalone: true, selector: "kendo-treelist-columnmenu-item", inputs: { icon: "icon", svgIcon: "svgIcon", text: "text", selected: "selected", disabled: "disabled", expanded: "expanded", service: "service" }, outputs: { itemClick: "itemClick", expand: "expand", collapse: "collapse" }, queries: [{ propertyName: "contentTemplate", first: true, predicate: ColumnMenuItemContentTemplateDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: `
|
|
108
|
-
@if (contentTemplate) {
|
|
109
|
-
<div class="k-expander">
|
|
110
|
-
<ng-container [ngTemplateOutlet]="content"></ng-container>
|
|
111
|
-
</div>
|
|
112
|
-
} @else {
|
|
113
|
-
<div
|
|
114
|
-
class="k-columnmenu-item"
|
|
115
|
-
(click)="onClick($event)"
|
|
116
|
-
(keydown.enter)="onClick($event)"
|
|
117
|
-
[class.k-selected]="selected"
|
|
118
|
-
[class.k-disabled]="disabled"
|
|
119
|
-
role="button"
|
|
120
|
-
[attr.aria-expanded]="expanded"
|
|
121
|
-
[attr.aria-controls]="expanded ? contentId : undefined">
|
|
122
|
-
<kendo-icon-wrapper
|
|
123
|
-
[name]="icon"
|
|
124
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
125
|
-
{{ text }}
|
|
126
|
-
@if (contentTemplate) {
|
|
127
|
-
<span class="k-spacer"></span>
|
|
128
|
-
}
|
|
129
|
-
@if (contentTemplate) {
|
|
130
|
-
<span class="k-expander-indicator">
|
|
131
|
-
<kendo-icon-wrapper
|
|
132
|
-
[name]="expandedIcon"
|
|
133
|
-
[svgIcon]="expandedSvgIcon">
|
|
134
|
-
</kendo-icon-wrapper>
|
|
135
|
-
</span>
|
|
136
|
-
}
|
|
137
|
-
</div>
|
|
138
|
-
@if (contentTemplate) {
|
|
139
|
-
<div [attr.id]="contentId" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
140
|
-
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
141
|
-
</ng-container>
|
|
142
|
-
</div>
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
<ng-template #content>
|
|
147
|
-
<div
|
|
148
|
-
class="k-columnmenu-item"
|
|
149
|
-
(click)="onClick($event)"
|
|
150
|
-
(keydown.enter)="onClick($event)"
|
|
151
|
-
[class.k-selected]="selected"
|
|
152
|
-
[class.k-disabled]="disabled"
|
|
153
|
-
role="button"
|
|
154
|
-
[attr.aria-expanded]="expanded"
|
|
155
|
-
[attr.aria-controls]="expanded ? contentId : undefined">
|
|
156
|
-
<kendo-icon-wrapper
|
|
157
|
-
[name]="icon"
|
|
158
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
159
|
-
{{ text }}
|
|
160
|
-
@if (contentTemplate) {
|
|
161
|
-
<span class="k-spacer"></span>
|
|
162
|
-
}
|
|
163
|
-
@if (contentTemplate) {
|
|
164
|
-
<span class="k-expander-indicator">
|
|
165
|
-
<kendo-icon-wrapper
|
|
166
|
-
[name]="expandedIcon"
|
|
167
|
-
[svgIcon]="expandedSvgIcon">
|
|
168
|
-
</kendo-icon-wrapper>
|
|
169
|
-
</span>
|
|
170
|
-
}
|
|
171
|
-
</div>
|
|
172
|
-
@if (contentTemplate) {
|
|
173
|
-
<div [attr.id]="contentId" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
174
|
-
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
175
|
-
</ng-container>
|
|
176
|
-
</div>
|
|
177
|
-
}
|
|
178
|
-
</ng-template>
|
|
179
|
-
`, isInline: true, dependencies: [{ kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
|
|
180
|
-
trigger('state', [
|
|
181
|
-
state('collapsed', style({ display: 'none' })),
|
|
182
|
-
state('expanded', style({ display: 'block' })),
|
|
183
|
-
transition('collapsed => expanded', [
|
|
184
|
-
style({
|
|
185
|
-
height: '0px',
|
|
186
|
-
display: 'block'
|
|
187
|
-
}),
|
|
188
|
-
animate('100ms ease-in', style({
|
|
189
|
-
height: '*'
|
|
190
|
-
}))
|
|
191
|
-
]),
|
|
192
|
-
transition('expanded => collapsed', [
|
|
193
|
-
style({
|
|
194
|
-
height: '*'
|
|
195
|
-
}),
|
|
196
|
-
animate('100ms ease-in', style({
|
|
197
|
-
height: '0px'
|
|
198
|
-
}))
|
|
199
|
-
])
|
|
200
|
-
])
|
|
201
|
-
] });
|
|
202
|
-
}
|
|
203
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuItemComponent, decorators: [{
|
|
204
|
-
type: Component,
|
|
205
|
-
args: [{
|
|
206
|
-
animations: [
|
|
207
|
-
trigger('state', [
|
|
208
|
-
state('collapsed', style({ display: 'none' })),
|
|
209
|
-
state('expanded', style({ display: 'block' })),
|
|
210
|
-
transition('collapsed => expanded', [
|
|
211
|
-
style({
|
|
212
|
-
height: '0px',
|
|
213
|
-
display: 'block'
|
|
214
|
-
}),
|
|
215
|
-
animate('100ms ease-in', style({
|
|
216
|
-
height: '*'
|
|
217
|
-
}))
|
|
218
|
-
]),
|
|
219
|
-
transition('expanded => collapsed', [
|
|
220
|
-
style({
|
|
221
|
-
height: '*'
|
|
222
|
-
}),
|
|
223
|
-
animate('100ms ease-in', style({
|
|
224
|
-
height: '0px'
|
|
225
|
-
}))
|
|
226
|
-
])
|
|
227
|
-
])
|
|
228
|
-
],
|
|
229
|
-
selector: 'kendo-treelist-columnmenu-item',
|
|
230
|
-
template: `
|
|
231
|
-
@if (contentTemplate) {
|
|
232
|
-
<div class="k-expander">
|
|
233
|
-
<ng-container [ngTemplateOutlet]="content"></ng-container>
|
|
234
|
-
</div>
|
|
235
|
-
} @else {
|
|
236
|
-
<div
|
|
237
|
-
class="k-columnmenu-item"
|
|
238
|
-
(click)="onClick($event)"
|
|
239
|
-
(keydown.enter)="onClick($event)"
|
|
240
|
-
[class.k-selected]="selected"
|
|
241
|
-
[class.k-disabled]="disabled"
|
|
242
|
-
role="button"
|
|
243
|
-
[attr.aria-expanded]="expanded"
|
|
244
|
-
[attr.aria-controls]="expanded ? contentId : undefined">
|
|
245
|
-
<kendo-icon-wrapper
|
|
246
|
-
[name]="icon"
|
|
247
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
248
|
-
{{ text }}
|
|
249
|
-
@if (contentTemplate) {
|
|
250
|
-
<span class="k-spacer"></span>
|
|
251
|
-
}
|
|
252
|
-
@if (contentTemplate) {
|
|
253
|
-
<span class="k-expander-indicator">
|
|
254
|
-
<kendo-icon-wrapper
|
|
255
|
-
[name]="expandedIcon"
|
|
256
|
-
[svgIcon]="expandedSvgIcon">
|
|
257
|
-
</kendo-icon-wrapper>
|
|
258
|
-
</span>
|
|
259
|
-
}
|
|
260
|
-
</div>
|
|
261
|
-
@if (contentTemplate) {
|
|
262
|
-
<div [attr.id]="contentId" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
263
|
-
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
264
|
-
</ng-container>
|
|
265
|
-
</div>
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
|
|
269
|
-
<ng-template #content>
|
|
270
|
-
<div
|
|
271
|
-
class="k-columnmenu-item"
|
|
272
|
-
(click)="onClick($event)"
|
|
273
|
-
(keydown.enter)="onClick($event)"
|
|
274
|
-
[class.k-selected]="selected"
|
|
275
|
-
[class.k-disabled]="disabled"
|
|
276
|
-
role="button"
|
|
277
|
-
[attr.aria-expanded]="expanded"
|
|
278
|
-
[attr.aria-controls]="expanded ? contentId : undefined">
|
|
279
|
-
<kendo-icon-wrapper
|
|
280
|
-
[name]="icon"
|
|
281
|
-
[svgIcon]="svgIcon"></kendo-icon-wrapper>
|
|
282
|
-
{{ text }}
|
|
283
|
-
@if (contentTemplate) {
|
|
284
|
-
<span class="k-spacer"></span>
|
|
285
|
-
}
|
|
286
|
-
@if (contentTemplate) {
|
|
287
|
-
<span class="k-expander-indicator">
|
|
288
|
-
<kendo-icon-wrapper
|
|
289
|
-
[name]="expandedIcon"
|
|
290
|
-
[svgIcon]="expandedSvgIcon">
|
|
291
|
-
</kendo-icon-wrapper>
|
|
292
|
-
</span>
|
|
293
|
-
}
|
|
294
|
-
</div>
|
|
295
|
-
@if (contentTemplate) {
|
|
296
|
-
<div [attr.id]="contentId" [@state]="contentState" [style.overflow]="'hidden'" class="k-columnmenu-item-content">
|
|
297
|
-
<ng-container [ngTemplateOutlet]="contentTemplate.templateRef">
|
|
298
|
-
</ng-container>
|
|
299
|
-
</div>
|
|
300
|
-
}
|
|
301
|
-
</ng-template>
|
|
302
|
-
`,
|
|
303
|
-
standalone: true,
|
|
304
|
-
imports: [IconWrapperComponent, NgTemplateOutlet]
|
|
305
|
-
}]
|
|
306
|
-
}], propDecorators: { itemClick: [{
|
|
307
|
-
type: Output
|
|
308
|
-
}], expand: [{
|
|
309
|
-
type: Output
|
|
310
|
-
}], collapse: [{
|
|
311
|
-
type: Output
|
|
312
|
-
}], icon: [{
|
|
313
|
-
type: Input
|
|
314
|
-
}], svgIcon: [{
|
|
315
|
-
type: Input
|
|
316
|
-
}], text: [{
|
|
317
|
-
type: Input
|
|
318
|
-
}], selected: [{
|
|
319
|
-
type: Input
|
|
320
|
-
}], disabled: [{
|
|
321
|
-
type: Input
|
|
322
|
-
}], expanded: [{
|
|
323
|
-
type: Input
|
|
324
|
-
}], service: [{
|
|
325
|
-
type: Input
|
|
326
|
-
}], contentTemplate: [{
|
|
327
|
-
type: ContentChild,
|
|
328
|
-
args: [ColumnMenuItemContentTemplateDirective]
|
|
329
|
-
}] } });
|
|
@@ -1,147 +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, ElementRef, Input, NgZone, Renderer2 } from '@angular/core';
|
|
6
|
-
import { Subscription } from 'rxjs';
|
|
7
|
-
import { Keys } from '@progress/kendo-angular-common';
|
|
8
|
-
import { ColumnMenuChooserComponent } from './column-menu-chooser.component';
|
|
9
|
-
import { ColumnMenuFilterComponent } from './column-menu-filter.component';
|
|
10
|
-
import * as i0 from "@angular/core";
|
|
11
|
-
/**
|
|
12
|
-
* Provides keyboard navigation support for TreeList column menu items.
|
|
13
|
-
* Use this directive to manage focus and tab order for custom column menu items ([see example](slug:columnmenu_treelist#customizing-the-content)).
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```html
|
|
17
|
-
* <ng-template kendoTreelistColumnMenuTemplate let-service="service" let-column="column">
|
|
18
|
-
* <kendo-treelist-columnmenu-sort #sortItem [kendoTreeListColumnMenuItem]="sortItem" [service]="service">
|
|
19
|
-
* </kendo-treelist-columnmenu-sort>
|
|
20
|
-
* </ng-template>
|
|
21
|
-
* ```
|
|
22
|
-
* @remarks
|
|
23
|
-
* Applied to:
|
|
24
|
-
* {@link ColumnMenuChooserComponent},
|
|
25
|
-
* {@link ColumnMenuFilterComponent},
|
|
26
|
-
* {@link ColumnMenuSortComponent},
|
|
27
|
-
* {@link ColumnMenuLockComponent},
|
|
28
|
-
* {@link ColumnMenuComponent},
|
|
29
|
-
* {@link ColumnMenuItemComponent},
|
|
30
|
-
* {@link ColumnMenuAutoSizeAllColumnsComponent},
|
|
31
|
-
* {@link ColumnMenuAutoSizeColumnComponent}.
|
|
32
|
-
*/
|
|
33
|
-
export class ColumnMenuItemDirective {
|
|
34
|
-
hostElement;
|
|
35
|
-
renderer;
|
|
36
|
-
ngZone;
|
|
37
|
-
/**
|
|
38
|
-
* Provides a reference to the TreeList column menu item. Required for built-in keyboard navigation.
|
|
39
|
-
*/
|
|
40
|
-
menuItemComponent;
|
|
41
|
-
firstFocusableElement;
|
|
42
|
-
lastFocusableElement;
|
|
43
|
-
/**
|
|
44
|
-
* @hidden
|
|
45
|
-
*/
|
|
46
|
-
set isFirst(value) {
|
|
47
|
-
if (value) {
|
|
48
|
-
const focusableElement = this.columnMenuItems[0];
|
|
49
|
-
this.menuItemComponent.service.menuTabbingService.firstFocusable = focusableElement;
|
|
50
|
-
this.ngZone.runOutsideAngular(() => {
|
|
51
|
-
const firstItemKeydownSub = this.renderer.listen(focusableElement, 'keydown', this.onTab);
|
|
52
|
-
this.subs.add(firstItemKeydownSub);
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
this._isFirst = value;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @hidden
|
|
59
|
-
*/
|
|
60
|
-
get isFirst() {
|
|
61
|
-
return this._isFirst;
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* @hidden
|
|
65
|
-
*/
|
|
66
|
-
set isLast(value) {
|
|
67
|
-
if (!this.columnMenuItems) {
|
|
68
|
-
return;
|
|
69
|
-
}
|
|
70
|
-
if (value) {
|
|
71
|
-
const lastFocusableElement = this.getLastColumnMenuItem();
|
|
72
|
-
this.menuItemComponent.service.menuTabbingService.lastFocusable = lastFocusableElement;
|
|
73
|
-
this.ngZone.runOutsideAngular(() => {
|
|
74
|
-
const lastItemKeydownSub = this.renderer.listen(lastFocusableElement, 'keydown', this.onTab);
|
|
75
|
-
this.subs.add(lastItemKeydownSub);
|
|
76
|
-
});
|
|
77
|
-
if (this.isExpandableItem()) {
|
|
78
|
-
this.menuItemComponent.isLast = true;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
this._isLast = value;
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* @hidden
|
|
85
|
-
*/
|
|
86
|
-
get isLast() {
|
|
87
|
-
return this._isLast;
|
|
88
|
-
}
|
|
89
|
-
_isFirst = false;
|
|
90
|
-
_isLast = false;
|
|
91
|
-
columnMenuItems;
|
|
92
|
-
subs = new Subscription();
|
|
93
|
-
constructor(hostElement, renderer, ngZone) {
|
|
94
|
-
this.hostElement = hostElement;
|
|
95
|
-
this.renderer = renderer;
|
|
96
|
-
this.ngZone = ngZone;
|
|
97
|
-
}
|
|
98
|
-
ngAfterViewInit() {
|
|
99
|
-
this.columnMenuItems = this.hostElement.nativeElement.querySelectorAll('.k-columnmenu-item');
|
|
100
|
-
[].slice.apply(this.columnMenuItems).forEach(el => this.renderer.setAttribute(el, 'tabindex', '0'));
|
|
101
|
-
if (this.menuItemComponent instanceof ColumnMenuFilterComponent) {
|
|
102
|
-
this.menuItemComponent.service.menuTabbingService.isColumnMenu = true;
|
|
103
|
-
}
|
|
104
|
-
this.menuItemComponent.service?.columnMenuContainer.templateMenuItems.push(this);
|
|
105
|
-
}
|
|
106
|
-
ngOnDestroy() {
|
|
107
|
-
if (this.subs) {
|
|
108
|
-
this.subs.unsubscribe();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
onTab = (e) => {
|
|
112
|
-
if (e.code !== Keys.Tab) {
|
|
113
|
-
return;
|
|
114
|
-
}
|
|
115
|
-
if (this.isFirst && e.shiftKey && e.target === this.columnMenuItems[0]) {
|
|
116
|
-
e.preventDefault();
|
|
117
|
-
this.menuItemComponent.service.menuTabbingService.lastFocusable.focus();
|
|
118
|
-
}
|
|
119
|
-
if (this.isLast && !e.shiftKey) {
|
|
120
|
-
const lastColumnMenuItem = this.getLastColumnMenuItem();
|
|
121
|
-
const isExpanded = this.menuItemComponent.expanded;
|
|
122
|
-
if (lastColumnMenuItem === e.target && !isExpanded) {
|
|
123
|
-
e.preventDefault();
|
|
124
|
-
this.menuItemComponent.service.menuTabbingService.firstFocusable.focus();
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
getLastColumnMenuItem() {
|
|
129
|
-
return (this.columnMenuItems.length === 1 ? this.columnMenuItems[0] : this.columnMenuItems[1]);
|
|
130
|
-
}
|
|
131
|
-
isExpandableItem() {
|
|
132
|
-
return this.menuItemComponent instanceof ColumnMenuFilterComponent ||
|
|
133
|
-
this.menuItemComponent instanceof ColumnMenuChooserComponent;
|
|
134
|
-
}
|
|
135
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuItemDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Directive });
|
|
136
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: ColumnMenuItemDirective, isStandalone: true, selector: "[kendoTreeListColumnMenuItem]", inputs: { menuItemComponent: ["kendoTreeListColumnMenuItem", "menuItemComponent"] }, ngImport: i0 });
|
|
137
|
-
}
|
|
138
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuItemDirective, decorators: [{
|
|
139
|
-
type: Directive,
|
|
140
|
-
args: [{
|
|
141
|
-
selector: '[kendoTreeListColumnMenuItem]',
|
|
142
|
-
standalone: true
|
|
143
|
-
}]
|
|
144
|
-
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }], propDecorators: { menuItemComponent: [{
|
|
145
|
-
type: Input,
|
|
146
|
-
args: ['kendoTreeListColumnMenuItem']
|
|
147
|
-
}] } });
|
|
@@ -1,112 +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, ChangeDetectorRef } from '@angular/core';
|
|
6
|
-
import { LocalizationService } from "@progress/kendo-angular-l10n";
|
|
7
|
-
import { ColumnInfoService } from '../common/column-info.service';
|
|
8
|
-
import { ColumnMenuItemBase } from './column-menu-item-base';
|
|
9
|
-
import { lockIcon, unlockIcon } from '@progress/kendo-svg-icons';
|
|
10
|
-
import { ColumnMenuItemComponent } from './column-menu-item.component';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "@progress/kendo-angular-l10n";
|
|
13
|
-
import * as i2 from "../common/column-info.service";
|
|
14
|
-
/**
|
|
15
|
-
* Represents the column-menu item that lets you lock or unlock columns.
|
|
16
|
-
*
|
|
17
|
-
* Render this component inside a [`ColumnMenuTemplate`]({% slug api_treelist_columnmenutemplatedirective %}) directive.
|
|
18
|
-
*
|
|
19
|
-
* To register the component as a known column menu item, set the [`ColumnMenuService`]({% slug api_treelist_columnmenuservice %})
|
|
20
|
-
* that the template passes to the `service` input of the `kendo-treelist-columnmenu-lock` component.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```html
|
|
24
|
-
* <kendo-treelist ...>
|
|
25
|
-
* <kendo-treelist-column field="ProductName">
|
|
26
|
-
* <ng-template kendoTreeListColumnMenuTemplate>
|
|
27
|
-
* <kendo-treelist-columnmenu-lock></kendo-treelist-columnmenu-lock>
|
|
28
|
-
* </ng-template>
|
|
29
|
-
* </kendo-treelist-column>
|
|
30
|
-
* </kendo-treelist>
|
|
31
|
-
* ```
|
|
32
|
-
*/
|
|
33
|
-
export class ColumnMenuLockComponent extends ColumnMenuItemBase {
|
|
34
|
-
localization;
|
|
35
|
-
columnInfoService;
|
|
36
|
-
changeDetector;
|
|
37
|
-
unlockIcon = unlockIcon;
|
|
38
|
-
lockIcon = lockIcon;
|
|
39
|
-
constructor(localization, columnInfoService, changeDetector) {
|
|
40
|
-
super();
|
|
41
|
-
this.localization = localization;
|
|
42
|
-
this.columnInfoService = columnInfoService;
|
|
43
|
-
this.changeDetector = changeDetector;
|
|
44
|
-
}
|
|
45
|
-
get text() {
|
|
46
|
-
return this.localization.get(this.locked ? 'unlock' : 'lock');
|
|
47
|
-
}
|
|
48
|
-
get icon() {
|
|
49
|
-
return this.locked ? 'unlock' : 'lock';
|
|
50
|
-
}
|
|
51
|
-
get svgIcon() {
|
|
52
|
-
return this.locked ? this.unlockIcon : this.lockIcon;
|
|
53
|
-
}
|
|
54
|
-
get disabled() {
|
|
55
|
-
return !this.locked && this.columnInfoService.unlockedRootCount < 2;
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* @hidden
|
|
59
|
-
*/
|
|
60
|
-
toggleColumn() {
|
|
61
|
-
this.toggleHierarchy(!this.locked);
|
|
62
|
-
this.close();
|
|
63
|
-
this.changeDetector.markForCheck();
|
|
64
|
-
}
|
|
65
|
-
toggleHierarchy(locked) {
|
|
66
|
-
let root = this.service.column;
|
|
67
|
-
while (root.parent) {
|
|
68
|
-
root = root.parent;
|
|
69
|
-
}
|
|
70
|
-
const columns = [root];
|
|
71
|
-
const allChanged = [];
|
|
72
|
-
while (columns.length) {
|
|
73
|
-
const column = columns.shift();
|
|
74
|
-
column.locked = locked;
|
|
75
|
-
allChanged.push(column);
|
|
76
|
-
if (column.hasChildren) {
|
|
77
|
-
columns.push(...column.childrenArray);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
this.columnInfoService.changeLocked(allChanged);
|
|
81
|
-
}
|
|
82
|
-
get locked() {
|
|
83
|
-
return this.service.column.locked;
|
|
84
|
-
}
|
|
85
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuLockComponent, deps: [{ token: i1.LocalizationService }, { token: i2.ColumnInfoService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
86
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: ColumnMenuLockComponent, isStandalone: true, selector: "kendo-treelist-columnmenu-lock", usesInheritance: true, ngImport: i0, template: `
|
|
87
|
-
<kendo-treelist-columnmenu-item
|
|
88
|
-
[text]="text"
|
|
89
|
-
[icon]="icon"
|
|
90
|
-
[svgIcon]="svgIcon"
|
|
91
|
-
(itemClick)="toggleColumn()"
|
|
92
|
-
[disabled]="disabled">
|
|
93
|
-
</kendo-treelist-columnmenu-item>
|
|
94
|
-
`, isInline: true, dependencies: [{ kind: "component", type: ColumnMenuItemComponent, selector: "kendo-treelist-columnmenu-item", inputs: ["icon", "svgIcon", "text", "selected", "disabled", "expanded", "service"], outputs: ["itemClick", "expand", "collapse"] }] });
|
|
95
|
-
}
|
|
96
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ColumnMenuLockComponent, decorators: [{
|
|
97
|
-
type: Component,
|
|
98
|
-
args: [{
|
|
99
|
-
selector: 'kendo-treelist-columnmenu-lock',
|
|
100
|
-
template: `
|
|
101
|
-
<kendo-treelist-columnmenu-item
|
|
102
|
-
[text]="text"
|
|
103
|
-
[icon]="icon"
|
|
104
|
-
[svgIcon]="svgIcon"
|
|
105
|
-
(itemClick)="toggleColumn()"
|
|
106
|
-
[disabled]="disabled">
|
|
107
|
-
</kendo-treelist-columnmenu-item>
|
|
108
|
-
`,
|
|
109
|
-
standalone: true,
|
|
110
|
-
imports: [ColumnMenuItemComponent]
|
|
111
|
-
}]
|
|
112
|
-
}], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i2.ColumnInfoService }, { type: i0.ChangeDetectorRef }] });
|
|
@@ -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 {};
|