@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,665 +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, NgZone, Renderer2, ElementRef, HostBinding } from '@angular/core';
|
|
6
|
-
import { ChangeNotificationService } from '../data/change-notification.service';
|
|
7
|
-
import { isChanged, isPresent } from '../utils';
|
|
8
|
-
import { NoRecordsTemplateDirective } from './no-records-template.directive';
|
|
9
|
-
import { EditService } from '../editing/edit.service';
|
|
10
|
-
import { LocalizationService } from '@progress/kendo-angular-l10n';
|
|
11
|
-
import { columnsSpan } from "../columns/column-common";
|
|
12
|
-
import { closest, closestInScope, hasClasses, isFocusableWithTabKey, matchesClasses, matchesNodeName } from './common/dom-queries';
|
|
13
|
-
import { DomEventsService } from '../common/dom-events.service';
|
|
14
|
-
import { ColumnInfoService } from "../common/column-info.service";
|
|
15
|
-
import { hasFilterRow } from '../filtering/filterable';
|
|
16
|
-
import { NavigationService } from '../navigation/navigation.service';
|
|
17
|
-
import { Keys } from '@progress/kendo-angular-common';
|
|
18
|
-
import { defaultTrackBy } from '../common/default-track-by';
|
|
19
|
-
import { ExpandStateService } from '../expand-state/expand-state.service';
|
|
20
|
-
import { SelectionService } from '../selection/selection.service';
|
|
21
|
-
import { NON_DATA_CELL_CLASSES, NON_DATA_ROW_CLASSES, IGNORE_CONTAINER_CLASSES, ICON_CLASS, EMPTY_ICON_CLASS, DRAG_HANDLE_CLASS } from './constants';
|
|
22
|
-
import { ColumnsContainer } from '../columns/columns-container';
|
|
23
|
-
import { IconWrapperComponent } from '@progress/kendo-angular-icons';
|
|
24
|
-
import { LevelItemsPipe } from './common/level-items.pipe';
|
|
25
|
-
import { LogicalCellDirective } from '../navigation/logical-cell.directive';
|
|
26
|
-
import { CellComponent } from './cell.component';
|
|
27
|
-
import { LogicalRowDirective } from '../navigation/logical-row.directive';
|
|
28
|
-
import { NgTemplateOutlet, NgClass, NgStyle } from '@angular/common';
|
|
29
|
-
import * as i0 from "@angular/core";
|
|
30
|
-
import * as i1 from "../data/change-notification.service";
|
|
31
|
-
import * as i2 from "../editing/edit.service";
|
|
32
|
-
import * as i3 from "@progress/kendo-angular-l10n";
|
|
33
|
-
import * as i4 from "../common/dom-events.service";
|
|
34
|
-
import * as i5 from "../common/column-info.service";
|
|
35
|
-
import * as i6 from "../navigation/navigation.service";
|
|
36
|
-
import * as i7 from "../expand-state/expand-state.service";
|
|
37
|
-
import * as i8 from "../selection/selection.service";
|
|
38
|
-
const columnCellIndex = (cell, cells) => {
|
|
39
|
-
for (let idx = 0; idx < cells.length; idx++) {
|
|
40
|
-
if (cells[idx] === cell) {
|
|
41
|
-
return idx;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* @hidden
|
|
47
|
-
*/
|
|
48
|
-
export class TableBodyComponent {
|
|
49
|
-
changeNotification;
|
|
50
|
-
editService;
|
|
51
|
-
localization;
|
|
52
|
-
ngZone;
|
|
53
|
-
renderer;
|
|
54
|
-
element;
|
|
55
|
-
domEvents;
|
|
56
|
-
columnInfoService;
|
|
57
|
-
navigationService;
|
|
58
|
-
expandState;
|
|
59
|
-
selection;
|
|
60
|
-
hostClass = true;
|
|
61
|
-
columns = [];
|
|
62
|
-
allColumns;
|
|
63
|
-
noRecordsTemplate;
|
|
64
|
-
view;
|
|
65
|
-
skip = 0;
|
|
66
|
-
filterable;
|
|
67
|
-
noRecordsText;
|
|
68
|
-
isLocked = false;
|
|
69
|
-
lockedColumnsCount = 0;
|
|
70
|
-
totalColumnsCount = 0;
|
|
71
|
-
virtualColumns;
|
|
72
|
-
expandIcons;
|
|
73
|
-
trackBy = defaultTrackBy;
|
|
74
|
-
totalColumns;
|
|
75
|
-
noneIcon = {
|
|
76
|
-
name: 'none',
|
|
77
|
-
content: '',
|
|
78
|
-
viewBox: '0 0 24 24'
|
|
79
|
-
};
|
|
80
|
-
clickSubscription;
|
|
81
|
-
l10nSubscription;
|
|
82
|
-
cellKeydownSubscription;
|
|
83
|
-
clickTimeout;
|
|
84
|
-
headerOffset;
|
|
85
|
-
rowClass = () => null;
|
|
86
|
-
constructor(changeNotification, editService, localization, ngZone, renderer, element, domEvents, columnInfoService, navigationService, expandState, selection) {
|
|
87
|
-
this.changeNotification = changeNotification;
|
|
88
|
-
this.editService = editService;
|
|
89
|
-
this.localization = localization;
|
|
90
|
-
this.ngZone = ngZone;
|
|
91
|
-
this.renderer = renderer;
|
|
92
|
-
this.element = element;
|
|
93
|
-
this.domEvents = domEvents;
|
|
94
|
-
this.columnInfoService = columnInfoService;
|
|
95
|
-
this.navigationService = navigationService;
|
|
96
|
-
this.expandState = expandState;
|
|
97
|
-
this.selection = selection;
|
|
98
|
-
this.cellKeydownSubscription = this.navigationService.cellKeydown.subscribe((args) => this.cellKeydownHandler(args));
|
|
99
|
-
this.trackByWrapper = this.trackByWrapper.bind(this);
|
|
100
|
-
this.trackByColumns = this.trackByColumns.bind(this);
|
|
101
|
-
this.noRecordsText = this.localization.get('noRecords');
|
|
102
|
-
this.selection.registerTable(this);
|
|
103
|
-
}
|
|
104
|
-
get newDataItem() {
|
|
105
|
-
return this.editService.newDataItem;
|
|
106
|
-
}
|
|
107
|
-
// Number of unlocked columns in the next table, if any
|
|
108
|
-
unlockedColumnsCount(item) {
|
|
109
|
-
const allColumns = this.allColumns || this.columns;
|
|
110
|
-
let allColumnsCount = allColumns.length;
|
|
111
|
-
allColumns.forEach(column => {
|
|
112
|
-
if (column.isSpanColumn) {
|
|
113
|
-
allColumnsCount += column.colspan - 1;
|
|
114
|
-
}
|
|
115
|
-
});
|
|
116
|
-
const contentColumnsCount = this.totalColumnsCount - this.lockedColumnsCount - allColumnsCount;
|
|
117
|
-
const headerFooterColumnsCount = this.totalColumnsCount - this.lockedColumnsCount - (this.allColumns || this.columns).length;
|
|
118
|
-
return item && item.type === 'data' ? contentColumnsCount : headerFooterColumnsCount;
|
|
119
|
-
}
|
|
120
|
-
get hasData() {
|
|
121
|
-
const view = this.view;
|
|
122
|
-
return view && view.data !== null && view.data !== undefined && view.data.length > 0;
|
|
123
|
-
}
|
|
124
|
-
isOdd(item) {
|
|
125
|
-
return item.index % 2 !== 0;
|
|
126
|
-
}
|
|
127
|
-
trackByWrapper(index, item) {
|
|
128
|
-
return this.trackBy(index, item);
|
|
129
|
-
}
|
|
130
|
-
trackByColumns(index, item) {
|
|
131
|
-
return this.virtualColumns ? index : item;
|
|
132
|
-
}
|
|
133
|
-
ngOnChanges(changes) {
|
|
134
|
-
if (isChanged("columns", changes, false)) {
|
|
135
|
-
this.changeNotification.notify();
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
addRowLogicalIndex() {
|
|
139
|
-
return this.columnInfoService.totalLevels + 1;
|
|
140
|
-
}
|
|
141
|
-
logicalColIndex(column) {
|
|
142
|
-
if (!isPresent(column.leafIndex)) {
|
|
143
|
-
return -1;
|
|
144
|
-
}
|
|
145
|
-
return column.leafIndex;
|
|
146
|
-
}
|
|
147
|
-
cellExpandable(item, column) {
|
|
148
|
-
if (!column.expandable || !item.hasChildren) {
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
return true;
|
|
152
|
-
}
|
|
153
|
-
ariaRowExpanded(item) {
|
|
154
|
-
return this.lockedColumnsCount < 1 ? Boolean(item.expanded) : undefined;
|
|
155
|
-
}
|
|
156
|
-
ariaRowSelected(item) {
|
|
157
|
-
return this.lockedColumnsCount < 1 ? Boolean(item.selected) : undefined;
|
|
158
|
-
}
|
|
159
|
-
ariaExpanded(item, column) {
|
|
160
|
-
if (!column.expandable || !item.hasChildren) {
|
|
161
|
-
return;
|
|
162
|
-
}
|
|
163
|
-
return Boolean(item.expanded);
|
|
164
|
-
}
|
|
165
|
-
ariaSelected(item, column, columnIndex) {
|
|
166
|
-
if (!this.selection.enabled) {
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
return item.selected || this.isCellSelected(item.data, column, columnIndex);
|
|
170
|
-
}
|
|
171
|
-
ngOnInit() {
|
|
172
|
-
this.ngZone.runOutsideAngular(() => {
|
|
173
|
-
const clickHandler = this.clickHandler.bind(this);
|
|
174
|
-
const mousedownSubscription = this.renderer.listen(this.element.nativeElement, 'mousedown', clickHandler);
|
|
175
|
-
const clickSubscription = this.renderer.listen(this.element.nativeElement, 'click', clickHandler);
|
|
176
|
-
const contextmenuSubscription = this.renderer.listen(this.element.nativeElement, 'contextmenu', clickHandler);
|
|
177
|
-
this.clickSubscription = () => {
|
|
178
|
-
mousedownSubscription();
|
|
179
|
-
clickSubscription();
|
|
180
|
-
contextmenuSubscription();
|
|
181
|
-
};
|
|
182
|
-
});
|
|
183
|
-
let originalNoRecordText = this.localization.get('noRecords');
|
|
184
|
-
this.l10nSubscription = this.localization.changes.subscribe(() => {
|
|
185
|
-
if (this.noRecordsText === originalNoRecordText) {
|
|
186
|
-
this.noRecordsText = this.localization.get('noRecords');
|
|
187
|
-
originalNoRecordText = this.noRecordsText;
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
}
|
|
191
|
-
ngDoCheck() {
|
|
192
|
-
this.headerOffset = this.columnInfoService.totalLevels + (hasFilterRow(this.filterable) ? 1 : 0);
|
|
193
|
-
if (this.view?.data) {
|
|
194
|
-
this.view.data.forEach((item) => {
|
|
195
|
-
if (item.type === 'data') {
|
|
196
|
-
item.isEditing = this.editService.isEdited(item.data);
|
|
197
|
-
}
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
ngOnDestroy() {
|
|
202
|
-
if (this.clickSubscription) {
|
|
203
|
-
this.clickSubscription();
|
|
204
|
-
}
|
|
205
|
-
if (this.l10nSubscription) {
|
|
206
|
-
this.l10nSubscription.unsubscribe();
|
|
207
|
-
}
|
|
208
|
-
this.cellKeydownSubscription.unsubscribe();
|
|
209
|
-
this.selection.unregisterTable(this);
|
|
210
|
-
clearTimeout(this.clickTimeout);
|
|
211
|
-
}
|
|
212
|
-
isEditingCell(item, column) {
|
|
213
|
-
return Boolean(item.editContext && this.editService.isEditingColumn(column));
|
|
214
|
-
}
|
|
215
|
-
isEditingRow(item) {
|
|
216
|
-
return Boolean(item.editContext) || item.isNew;
|
|
217
|
-
}
|
|
218
|
-
get columnsContainer() {
|
|
219
|
-
return this.columnInfoService.columnsContainer;
|
|
220
|
-
}
|
|
221
|
-
get hasFooter() {
|
|
222
|
-
return this.columnsContainer.hasFooter;
|
|
223
|
-
}
|
|
224
|
-
get columnsSpan() {
|
|
225
|
-
return columnsSpan(this.columns);
|
|
226
|
-
}
|
|
227
|
-
get allColumnsSpan() {
|
|
228
|
-
return columnsSpan(this.allColumns || this.columns);
|
|
229
|
-
}
|
|
230
|
-
get colSpan() {
|
|
231
|
-
return this.columnsSpan;
|
|
232
|
-
}
|
|
233
|
-
get footerColumns() {
|
|
234
|
-
return this.isLocked ? this.columnsContainer.lockedColumnsToRender : this.columnsContainer.nonLockedColumnsToRender;
|
|
235
|
-
}
|
|
236
|
-
logicalRowIndex(rowIndex) {
|
|
237
|
-
return 1 + rowIndex + this.headerOffset;
|
|
238
|
-
}
|
|
239
|
-
isCellSelected(dataItem, column, columnIndex) {
|
|
240
|
-
return this.selection.isCellSelected(dataItem, column, columnIndex);
|
|
241
|
-
}
|
|
242
|
-
targetArgs(target, skipFocusable) {
|
|
243
|
-
const { cell, row } = this.targetElements(target);
|
|
244
|
-
if (cell && (!skipFocusable || target === cell || !isFocusableWithTabKey(target, false))) {
|
|
245
|
-
const index = columnCellIndex(cell, row.cells);
|
|
246
|
-
const column = this.columns.toArray()[index];
|
|
247
|
-
const columnIndex = this.lockedColumnsCount + index;
|
|
248
|
-
return {
|
|
249
|
-
item: this.rowItem(row),
|
|
250
|
-
column: column,
|
|
251
|
-
columnIndex: columnIndex
|
|
252
|
-
};
|
|
253
|
-
}
|
|
254
|
-
}
|
|
255
|
-
checkIfClickable(target, cell) {
|
|
256
|
-
return !matchesNodeName('label')(target) &&
|
|
257
|
-
(!hasClasses(target, ICON_CLASS) || hasClasses(target, EMPTY_ICON_CLASS)) &&
|
|
258
|
-
!closestInScope(target, matchesClasses(IGNORE_CONTAINER_CLASSES), cell);
|
|
259
|
-
}
|
|
260
|
-
clickHandler(eventArg) {
|
|
261
|
-
const target = eventArg.target;
|
|
262
|
-
const targetElementsResult = this.targetElements(target);
|
|
263
|
-
if (!targetElementsResult) {
|
|
264
|
-
return;
|
|
265
|
-
}
|
|
266
|
-
const { cell, row } = targetElementsResult;
|
|
267
|
-
const forbiddenCellClasses = NON_DATA_CELL_CLASSES.concat(` ${DRAG_HANDLE_CLASS}`);
|
|
268
|
-
const isValidCell = cell ? !hasClasses(cell, forbiddenCellClasses) : false;
|
|
269
|
-
const isValidRow = row ? !hasClasses(row, NON_DATA_ROW_CLASSES) : false;
|
|
270
|
-
if (isValidRow && isValidCell) {
|
|
271
|
-
if (this.expandClick(eventArg, row) || this.checkboxClick(cell, row, eventArg) && !this.selection.dragging) {
|
|
272
|
-
return;
|
|
273
|
-
}
|
|
274
|
-
this.editService.preventCellClose();
|
|
275
|
-
const focusable = target !== cell && isFocusableWithTabKey(target, false);
|
|
276
|
-
const targetClickable = this.checkIfClickable(target, cell);
|
|
277
|
-
if (!focusable && targetClickable) {
|
|
278
|
-
const args = this.cellClickArgs(cell, row, eventArg);
|
|
279
|
-
if (!args) {
|
|
280
|
-
return;
|
|
281
|
-
}
|
|
282
|
-
if (eventArg.type === 'mousedown') {
|
|
283
|
-
this.domEvents.cellMousedown.emit(args);
|
|
284
|
-
}
|
|
285
|
-
else {
|
|
286
|
-
if (args.isEditedColumn || !this.editService.closeCell(eventArg)) {
|
|
287
|
-
if (eventArg.type === 'click') {
|
|
288
|
-
this.clickTimeout = setTimeout(() => {
|
|
289
|
-
this.emitCellClick(args);
|
|
290
|
-
}, 0);
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
this.emitCellClick(args);
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
emitCellClick(args) {
|
|
301
|
-
this.domEvents.cellClick.emit(args);
|
|
302
|
-
}
|
|
303
|
-
cellKeydownHandler(args) {
|
|
304
|
-
if (args.code === Keys.Enter || args.code === Keys.NumpadEnter) {
|
|
305
|
-
this.clickHandler(args);
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
cellClickArgs(cell, row, eventArg) {
|
|
309
|
-
const index = columnCellIndex(cell, row.cells);
|
|
310
|
-
const column = this.columns.toArray()[index];
|
|
311
|
-
const columnIndex = this.lockedColumnsCount + index;
|
|
312
|
-
const viewItem = this.rowItem(row);
|
|
313
|
-
if (viewItem.type !== 'data') {
|
|
314
|
-
return;
|
|
315
|
-
}
|
|
316
|
-
const type = eventArg.type === 'keydown' ? 'click' : eventArg.type;
|
|
317
|
-
return {
|
|
318
|
-
column: column,
|
|
319
|
-
columnIndex: columnIndex,
|
|
320
|
-
viewItem: viewItem,
|
|
321
|
-
dataItem: viewItem.data,
|
|
322
|
-
rowIndex: viewItem.index,
|
|
323
|
-
index: viewItem.index, // backwards compat (https://github.com/telerik/kendo-angular/issues/3101)
|
|
324
|
-
isEditedColumn: (viewItem.editContext && this.editService.isEditingColumn(column)),
|
|
325
|
-
isEdited: viewItem.isNew || (viewItem.editContext && this.editService.isEditedColumn(column)),
|
|
326
|
-
originalEvent: eventArg,
|
|
327
|
-
type: type
|
|
328
|
-
};
|
|
329
|
-
}
|
|
330
|
-
targetElements(target) {
|
|
331
|
-
const element = this.element.nativeElement;
|
|
332
|
-
let row, body, treelistElement;
|
|
333
|
-
const currentTarget = target;
|
|
334
|
-
const treelistTbody = closest(currentTarget, (el) => matchesNodeName('tbody')(el) && el === element);
|
|
335
|
-
if (!treelistTbody) {
|
|
336
|
-
return null;
|
|
337
|
-
}
|
|
338
|
-
const cell = closest(currentTarget, (el) => {
|
|
339
|
-
if (!matchesNodeName('td')(el)) {
|
|
340
|
-
return false;
|
|
341
|
-
}
|
|
342
|
-
const parentRow = el.parentElement;
|
|
343
|
-
if (!parentRow || !matchesNodeName('tr')(parentRow)) {
|
|
344
|
-
return false;
|
|
345
|
-
}
|
|
346
|
-
return parentRow.parentElement === treelistTbody;
|
|
347
|
-
});
|
|
348
|
-
if (cell) {
|
|
349
|
-
row = cell.parentElement;
|
|
350
|
-
body = treelistTbody;
|
|
351
|
-
const targetTreelist = closest(currentTarget, (el) => hasClasses(el, 'k-treelist'));
|
|
352
|
-
const currentTreelist = closest(element, (el) => hasClasses(el, 'k-treelist'));
|
|
353
|
-
treelistElement = targetTreelist !== currentTreelist ? targetTreelist : null;
|
|
354
|
-
}
|
|
355
|
-
if (cell && body === element && !treelistElement) {
|
|
356
|
-
return {
|
|
357
|
-
cell,
|
|
358
|
-
row
|
|
359
|
-
};
|
|
360
|
-
}
|
|
361
|
-
return {};
|
|
362
|
-
}
|
|
363
|
-
expandClick(eventArg, row) {
|
|
364
|
-
if (eventArg.type === 'click' && !hasClasses(eventArg.target, EMPTY_ICON_CLASS) && eventArg.target.closest('.k-treelist-toggle')) {
|
|
365
|
-
eventArg.preventDefault();
|
|
366
|
-
const viewItem = this.rowItem(row);
|
|
367
|
-
if (viewItem.type === 'data') {
|
|
368
|
-
this.ngZone.run(() => {
|
|
369
|
-
this.expandState.toggleState(viewItem.data);
|
|
370
|
-
});
|
|
371
|
-
return true;
|
|
372
|
-
}
|
|
373
|
-
}
|
|
374
|
-
}
|
|
375
|
-
checkboxClick(cell, row, eventArg) {
|
|
376
|
-
const isCheckboxCell = hasClasses(cell, 'k-checkbox-cell');
|
|
377
|
-
const isCheckbox = eventArg.target.closest('.k-checkbox-wrap');
|
|
378
|
-
if (isCheckboxCell && !isCheckbox && this.selection.settings.checkboxOnly) {
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
if (eventArg.type === 'click' && isCheckboxCell &&
|
|
382
|
-
this.selection.enabled && this.selection.rowSelection) {
|
|
383
|
-
const args = this.cellClickArgs(cell, row, eventArg);
|
|
384
|
-
this.selection.checkboxClick(args);
|
|
385
|
-
if (eventArg.target.checked !== this.selection.isRowSelected(args.dataItem)) {
|
|
386
|
-
eventArg.preventDefault();
|
|
387
|
-
}
|
|
388
|
-
return true;
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
rowItem(row) {
|
|
392
|
-
let viewIndex = row.getAttribute('data-treelist-view-index');
|
|
393
|
-
viewIndex = viewIndex ? parseInt(viewIndex, 10) : -1;
|
|
394
|
-
const viewItem = this.view.at(viewIndex);
|
|
395
|
-
return viewItem;
|
|
396
|
-
}
|
|
397
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableBodyComponent, deps: [{ token: i1.ChangeNotificationService }, { token: i2.EditService }, { token: i3.LocalizationService }, { token: i0.NgZone }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i4.DomEventsService }, { token: i5.ColumnInfoService }, { token: i6.NavigationService }, { token: i7.ExpandStateService }, { token: i8.SelectionService }], target: i0.ɵɵFactoryTarget.Component });
|
|
398
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: TableBodyComponent, isStandalone: true, selector: "[kendoTreeListTableBody]", inputs: { columns: "columns", allColumns: "allColumns", noRecordsTemplate: "noRecordsTemplate", view: "view", skip: "skip", filterable: "filterable", noRecordsText: "noRecordsText", isLocked: "isLocked", lockedColumnsCount: "lockedColumnsCount", totalColumnsCount: "totalColumnsCount", virtualColumns: "virtualColumns", expandIcons: "expandIcons", trackBy: "trackBy", totalColumns: "totalColumns", rowClass: "rowClass" }, host: { properties: { "class.k-table-tbody": "this.hostClass" } }, usesOnChanges: true, ngImport: i0, template: `
|
|
399
|
-
@if (!hasData) {
|
|
400
|
-
<tr class="k-grid-norecords">
|
|
401
|
-
<td [attr.colspan]="colSpan" class="k-table-td">
|
|
402
|
-
@if (noRecordsTemplate?.templateRef) {
|
|
403
|
-
<ng-container [ngTemplateOutlet]="noRecordsTemplate.templateRef">
|
|
404
|
-
</ng-container>
|
|
405
|
-
}
|
|
406
|
-
@if (!noRecordsTemplate?.templateRef) {
|
|
407
|
-
{{noRecordsText}}
|
|
408
|
-
}
|
|
409
|
-
</td>
|
|
410
|
-
</tr>
|
|
411
|
-
}
|
|
412
|
-
@for (item of view?.data; track trackByWrapper($index, item); let rowIndex = $index) {
|
|
413
|
-
@if (item.type === 'data') {
|
|
414
|
-
<tr
|
|
415
|
-
kendoTreeListLogicalRow
|
|
416
|
-
[dataRowIndex]="$any(item).index"
|
|
417
|
-
[dataItem]="item.data"
|
|
418
|
-
[logicalRowIndex]="logicalRowIndex(item.rowIndex)"
|
|
419
|
-
[logicalSlaveRow]="lockedColumnsCount > 0"
|
|
420
|
-
[logicalCellsCount]="columns.length"
|
|
421
|
-
[logicalSlaveCellsCount]="unlockedColumnsCount(item)"
|
|
422
|
-
[totalColumns]="totalColumns"
|
|
423
|
-
[isNew]="item.isNew"
|
|
424
|
-
[attr.aria-expanded]="ariaRowExpanded(item)"
|
|
425
|
-
[ngClass]="rowClass({ dataItem: item.data, index: $any(item).index })"
|
|
426
|
-
class="k-table-row{{isOdd(item) ? ' k-table-alt-row' : ''}}"
|
|
427
|
-
[class.k-grid-edit-row]="isEditingRow(item)"
|
|
428
|
-
[class.k-grid-add-row]="item.isNew"
|
|
429
|
-
[attr.aria-selected]="ariaRowSelected(item)"
|
|
430
|
-
[class.k-selected]="item.selected"
|
|
431
|
-
[attr.data-treelist-view-index]="rowIndex">
|
|
432
|
-
@for (column of columns; track trackByColumns($index, column); let columnIndex = $index) {
|
|
433
|
-
<td kendoTreeListCell
|
|
434
|
-
[columnIndex]="lockedColumnsCount + columnIndex"
|
|
435
|
-
[column]="column"
|
|
436
|
-
[viewItem]="item"
|
|
437
|
-
[dataItem]="item.data"
|
|
438
|
-
[level]="item.level"
|
|
439
|
-
[hasChildren]="item.hasChildren"
|
|
440
|
-
[isExpanded]="item.expanded"
|
|
441
|
-
[rowIndex]="item.rowIndex"
|
|
442
|
-
[loading]="item.loading"
|
|
443
|
-
[isNew]="item.isNew"
|
|
444
|
-
[selected]="item.selected"
|
|
445
|
-
[expandIcons]="expandIcons"
|
|
446
|
-
kendoTreeListLogicalCell
|
|
447
|
-
[logicalRowIndex]="logicalRowIndex(item.rowIndex)"
|
|
448
|
-
[logicalColIndex]="logicalColIndex(column)"
|
|
449
|
-
[dataRowIndex]="$any(item).index"
|
|
450
|
-
[column]="column"
|
|
451
|
-
[colIndex]="columnIndex"
|
|
452
|
-
[colSpan]="column.colspan"
|
|
453
|
-
[expandable]="cellExpandable(item, column)"
|
|
454
|
-
[attr.aria-expanded]="lockedColumnsCount < 1 ? ariaExpanded(item, column) : undefined"
|
|
455
|
-
[attr.aria-selected]="lockedColumnsCount < 1 ? ariaSelected(item, column, lockedColumnsCount + columnIndex) : undefined"
|
|
456
|
-
class="k-table-td"
|
|
457
|
-
[attr.role]="column.tableCellsRole"
|
|
458
|
-
[ngClass]="column.cssClass"
|
|
459
|
-
[class.k-grid-edit-cell]="isEditingCell(item, column)"
|
|
460
|
-
[class.k-selected]="isCellSelected(item.data, column, lockedColumnsCount + columnIndex)"
|
|
461
|
-
[ngStyle]="column.style"
|
|
462
|
-
[attr.colspan]="column.colspan"
|
|
463
|
-
>
|
|
464
|
-
</td>
|
|
465
|
-
}
|
|
466
|
-
</tr>
|
|
467
|
-
}
|
|
468
|
-
@if (item.type === 'footer' && hasFooter) {
|
|
469
|
-
<tr role="row"
|
|
470
|
-
class="k-footer"
|
|
471
|
-
[attr.data-treelist-view-index]="rowIndex"
|
|
472
|
-
kendoTreeListLogicalRow
|
|
473
|
-
[logicalRowIndex]="logicalRowIndex(item.rowIndex)"
|
|
474
|
-
[logicalSlaveRow]="lockedColumnsCount > 0"
|
|
475
|
-
[logicalCellsCount]="columns.length"
|
|
476
|
-
[logicalSlaveCellsCount]="unlockedColumnsCount(item)"
|
|
477
|
-
[totalColumns]="totalColumns">
|
|
478
|
-
@for (column of footerColumns; track trackByColumns($index, column); let columnIndex = $index) {
|
|
479
|
-
<td kendoTreeListLogicalCell
|
|
480
|
-
[logicalRowIndex]="logicalRowIndex(item.rowIndex)"
|
|
481
|
-
[logicalColIndex]="logicalColIndex(column)"
|
|
482
|
-
[column]="column"
|
|
483
|
-
[colIndex]="columnIndex"
|
|
484
|
-
class="k-table-td"
|
|
485
|
-
[attr.role]="column.tableCellsRole"
|
|
486
|
-
[ngClass]="column.footerClass"
|
|
487
|
-
[ngStyle]="column.footerStyle"
|
|
488
|
-
>
|
|
489
|
-
@if ($any(column).expandable) {
|
|
490
|
-
@for (item of item.level | levelItems; track $index) {
|
|
491
|
-
<kendo-icon-wrapper name="none" innerCssClass="k-treelist-toggle" [svgIcon]="noneIcon"></kendo-icon-wrapper>
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
<ng-container [ngTemplateOutlet]="column.footerTemplateRef"
|
|
495
|
-
[ngTemplateOutletContext]="{
|
|
496
|
-
$implicit: item.aggregates,
|
|
497
|
-
aggregates: item.aggregates,
|
|
498
|
-
column: column,
|
|
499
|
-
columnIndex: columnIndex,
|
|
500
|
-
field: $any(column).field,
|
|
501
|
-
items: item.items,
|
|
502
|
-
parentItem: item.parentItem
|
|
503
|
-
}">
|
|
504
|
-
</ng-container>
|
|
505
|
-
</td>
|
|
506
|
-
}
|
|
507
|
-
</tr>
|
|
508
|
-
}
|
|
509
|
-
}
|
|
510
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: LogicalRowDirective, selector: "[kendoTreeListLogicalRow]", inputs: ["logicalRowIndex", "logicalSlaveRow", "logicalCellsCount", "logicalSlaveCellsCount", "dataRowIndex", "dataItem", "isNew", "totalColumns"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: CellComponent, selector: "[kendoTreeListCell]", inputs: ["column", "columnIndex", "isNew", "level", "hasChildren", "isExpanded", "loading", "expandIcons", "rowIndex", "selected", "dataItem", "viewItem"] }, { kind: "directive", type: LogicalCellDirective, selector: "[kendoTreeListLogicalCell]", inputs: ["logicalColIndex", "logicalRowIndex", "logicalSlaveCell", "column", "colIndex", "colSpan", "rowSpan", "dataRowIndex", "dataItem", "expandable", "headerLabelText"] }, { kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: IconWrapperComponent, selector: "kendo-icon-wrapper", inputs: ["name", "svgIcon", "innerCssClass", "customFontClass", "size"], exportAs: ["kendoIconWrapper"] }, { kind: "pipe", type: LevelItemsPipe, name: "levelItems" }] });
|
|
511
|
-
}
|
|
512
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: TableBodyComponent, decorators: [{
|
|
513
|
-
type: Component,
|
|
514
|
-
args: [{
|
|
515
|
-
selector: '[kendoTreeListTableBody]',
|
|
516
|
-
template: `
|
|
517
|
-
@if (!hasData) {
|
|
518
|
-
<tr class="k-grid-norecords">
|
|
519
|
-
<td [attr.colspan]="colSpan" class="k-table-td">
|
|
520
|
-
@if (noRecordsTemplate?.templateRef) {
|
|
521
|
-
<ng-container [ngTemplateOutlet]="noRecordsTemplate.templateRef">
|
|
522
|
-
</ng-container>
|
|
523
|
-
}
|
|
524
|
-
@if (!noRecordsTemplate?.templateRef) {
|
|
525
|
-
{{noRecordsText}}
|
|
526
|
-
}
|
|
527
|
-
</td>
|
|
528
|
-
</tr>
|
|
529
|
-
}
|
|
530
|
-
@for (item of view?.data; track trackByWrapper($index, item); let rowIndex = $index) {
|
|
531
|
-
@if (item.type === 'data') {
|
|
532
|
-
<tr
|
|
533
|
-
kendoTreeListLogicalRow
|
|
534
|
-
[dataRowIndex]="$any(item).index"
|
|
535
|
-
[dataItem]="item.data"
|
|
536
|
-
[logicalRowIndex]="logicalRowIndex(item.rowIndex)"
|
|
537
|
-
[logicalSlaveRow]="lockedColumnsCount > 0"
|
|
538
|
-
[logicalCellsCount]="columns.length"
|
|
539
|
-
[logicalSlaveCellsCount]="unlockedColumnsCount(item)"
|
|
540
|
-
[totalColumns]="totalColumns"
|
|
541
|
-
[isNew]="item.isNew"
|
|
542
|
-
[attr.aria-expanded]="ariaRowExpanded(item)"
|
|
543
|
-
[ngClass]="rowClass({ dataItem: item.data, index: $any(item).index })"
|
|
544
|
-
class="k-table-row{{isOdd(item) ? ' k-table-alt-row' : ''}}"
|
|
545
|
-
[class.k-grid-edit-row]="isEditingRow(item)"
|
|
546
|
-
[class.k-grid-add-row]="item.isNew"
|
|
547
|
-
[attr.aria-selected]="ariaRowSelected(item)"
|
|
548
|
-
[class.k-selected]="item.selected"
|
|
549
|
-
[attr.data-treelist-view-index]="rowIndex">
|
|
550
|
-
@for (column of columns; track trackByColumns($index, column); let columnIndex = $index) {
|
|
551
|
-
<td kendoTreeListCell
|
|
552
|
-
[columnIndex]="lockedColumnsCount + columnIndex"
|
|
553
|
-
[column]="column"
|
|
554
|
-
[viewItem]="item"
|
|
555
|
-
[dataItem]="item.data"
|
|
556
|
-
[level]="item.level"
|
|
557
|
-
[hasChildren]="item.hasChildren"
|
|
558
|
-
[isExpanded]="item.expanded"
|
|
559
|
-
[rowIndex]="item.rowIndex"
|
|
560
|
-
[loading]="item.loading"
|
|
561
|
-
[isNew]="item.isNew"
|
|
562
|
-
[selected]="item.selected"
|
|
563
|
-
[expandIcons]="expandIcons"
|
|
564
|
-
kendoTreeListLogicalCell
|
|
565
|
-
[logicalRowIndex]="logicalRowIndex(item.rowIndex)"
|
|
566
|
-
[logicalColIndex]="logicalColIndex(column)"
|
|
567
|
-
[dataRowIndex]="$any(item).index"
|
|
568
|
-
[column]="column"
|
|
569
|
-
[colIndex]="columnIndex"
|
|
570
|
-
[colSpan]="column.colspan"
|
|
571
|
-
[expandable]="cellExpandable(item, column)"
|
|
572
|
-
[attr.aria-expanded]="lockedColumnsCount < 1 ? ariaExpanded(item, column) : undefined"
|
|
573
|
-
[attr.aria-selected]="lockedColumnsCount < 1 ? ariaSelected(item, column, lockedColumnsCount + columnIndex) : undefined"
|
|
574
|
-
class="k-table-td"
|
|
575
|
-
[attr.role]="column.tableCellsRole"
|
|
576
|
-
[ngClass]="column.cssClass"
|
|
577
|
-
[class.k-grid-edit-cell]="isEditingCell(item, column)"
|
|
578
|
-
[class.k-selected]="isCellSelected(item.data, column, lockedColumnsCount + columnIndex)"
|
|
579
|
-
[ngStyle]="column.style"
|
|
580
|
-
[attr.colspan]="column.colspan"
|
|
581
|
-
>
|
|
582
|
-
</td>
|
|
583
|
-
}
|
|
584
|
-
</tr>
|
|
585
|
-
}
|
|
586
|
-
@if (item.type === 'footer' && hasFooter) {
|
|
587
|
-
<tr role="row"
|
|
588
|
-
class="k-footer"
|
|
589
|
-
[attr.data-treelist-view-index]="rowIndex"
|
|
590
|
-
kendoTreeListLogicalRow
|
|
591
|
-
[logicalRowIndex]="logicalRowIndex(item.rowIndex)"
|
|
592
|
-
[logicalSlaveRow]="lockedColumnsCount > 0"
|
|
593
|
-
[logicalCellsCount]="columns.length"
|
|
594
|
-
[logicalSlaveCellsCount]="unlockedColumnsCount(item)"
|
|
595
|
-
[totalColumns]="totalColumns">
|
|
596
|
-
@for (column of footerColumns; track trackByColumns($index, column); let columnIndex = $index) {
|
|
597
|
-
<td kendoTreeListLogicalCell
|
|
598
|
-
[logicalRowIndex]="logicalRowIndex(item.rowIndex)"
|
|
599
|
-
[logicalColIndex]="logicalColIndex(column)"
|
|
600
|
-
[column]="column"
|
|
601
|
-
[colIndex]="columnIndex"
|
|
602
|
-
class="k-table-td"
|
|
603
|
-
[attr.role]="column.tableCellsRole"
|
|
604
|
-
[ngClass]="column.footerClass"
|
|
605
|
-
[ngStyle]="column.footerStyle"
|
|
606
|
-
>
|
|
607
|
-
@if ($any(column).expandable) {
|
|
608
|
-
@for (item of item.level | levelItems; track $index) {
|
|
609
|
-
<kendo-icon-wrapper name="none" innerCssClass="k-treelist-toggle" [svgIcon]="noneIcon"></kendo-icon-wrapper>
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
<ng-container [ngTemplateOutlet]="column.footerTemplateRef"
|
|
613
|
-
[ngTemplateOutletContext]="{
|
|
614
|
-
$implicit: item.aggregates,
|
|
615
|
-
aggregates: item.aggregates,
|
|
616
|
-
column: column,
|
|
617
|
-
columnIndex: columnIndex,
|
|
618
|
-
field: $any(column).field,
|
|
619
|
-
items: item.items,
|
|
620
|
-
parentItem: item.parentItem
|
|
621
|
-
}">
|
|
622
|
-
</ng-container>
|
|
623
|
-
</td>
|
|
624
|
-
}
|
|
625
|
-
</tr>
|
|
626
|
-
}
|
|
627
|
-
}
|
|
628
|
-
`,
|
|
629
|
-
standalone: true,
|
|
630
|
-
imports: [NgTemplateOutlet, LogicalRowDirective, NgClass, CellComponent, LogicalCellDirective, NgStyle, IconWrapperComponent, LevelItemsPipe]
|
|
631
|
-
}]
|
|
632
|
-
}], ctorParameters: () => [{ type: i1.ChangeNotificationService }, { type: i2.EditService }, { type: i3.LocalizationService }, { type: i0.NgZone }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: i4.DomEventsService }, { type: i5.ColumnInfoService }, { type: i6.NavigationService }, { type: i7.ExpandStateService }, { type: i8.SelectionService }], propDecorators: { hostClass: [{
|
|
633
|
-
type: HostBinding,
|
|
634
|
-
args: ['class.k-table-tbody']
|
|
635
|
-
}], columns: [{
|
|
636
|
-
type: Input
|
|
637
|
-
}], allColumns: [{
|
|
638
|
-
type: Input
|
|
639
|
-
}], noRecordsTemplate: [{
|
|
640
|
-
type: Input
|
|
641
|
-
}], view: [{
|
|
642
|
-
type: Input
|
|
643
|
-
}], skip: [{
|
|
644
|
-
type: Input
|
|
645
|
-
}], filterable: [{
|
|
646
|
-
type: Input
|
|
647
|
-
}], noRecordsText: [{
|
|
648
|
-
type: Input
|
|
649
|
-
}], isLocked: [{
|
|
650
|
-
type: Input
|
|
651
|
-
}], lockedColumnsCount: [{
|
|
652
|
-
type: Input
|
|
653
|
-
}], totalColumnsCount: [{
|
|
654
|
-
type: Input
|
|
655
|
-
}], virtualColumns: [{
|
|
656
|
-
type: Input
|
|
657
|
-
}], expandIcons: [{
|
|
658
|
-
type: Input
|
|
659
|
-
}], trackBy: [{
|
|
660
|
-
type: Input
|
|
661
|
-
}], totalColumns: [{
|
|
662
|
-
type: Input
|
|
663
|
-
}], rowClass: [{
|
|
664
|
-
type: Input
|
|
665
|
-
}] } });
|