@progress/kendo-angular-grid 21.4.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/column-menu/column-menu-item-base.d.ts +1 -1
- package/columns/column-base.d.ts +1 -1
- package/common/toolbar-tool-base.directive.d.ts +1 -1
- package/editing/toolbar-editing-tool-base.directive.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-grid.mjs +666 -666
- 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 +28 -36
- package/schematics/ngAdd/index.js +7 -7
- package/selection/selection-default.d.ts +1 -1
- package/esm2022/adaptiveness/adaptive-mode.mjs +0 -5
- package/esm2022/adaptiveness/adaptive-renderer.component.mjs +0 -1270
- package/esm2022/aggregates/aggregate-types.mjs +0 -5
- package/esm2022/aggregates/selection-aggregate.service.mjs +0 -200
- package/esm2022/aggregates/status-bar-template.directive.mjs +0 -30
- package/esm2022/aggregates/status-bar.component.mjs +0 -70
- package/esm2022/column-menu/column-chooser-content.component.mjs +0 -318
- package/esm2022/column-menu/column-chooser.component.mjs +0 -230
- package/esm2022/column-menu/column-list-kb-nav.service.mjs +0 -40
- package/esm2022/column-menu/column-list.component.mjs +0 -478
- package/esm2022/column-menu/column-locked-change-event.mjs +0 -19
- package/esm2022/column-menu/column-menu-autosize-all.component.mjs +0 -89
- package/esm2022/column-menu/column-menu-autosize.component.mjs +0 -97
- package/esm2022/column-menu/column-menu-chooser.component.mjs +0 -151
- package/esm2022/column-menu/column-menu-container.component.mjs +0 -67
- package/esm2022/column-menu/column-menu-expandable-item.interface.mjs +0 -5
- package/esm2022/column-menu/column-menu-filter.component.mjs +0 -152
- package/esm2022/column-menu/column-menu-item-base.mjs +0 -44
- package/esm2022/column-menu/column-menu-item-content-template.directive.mjs +0 -45
- package/esm2022/column-menu/column-menu-item.component.mjs +0 -514
- package/esm2022/column-menu/column-menu-item.directive.mjs +0 -164
- package/esm2022/column-menu/column-menu-lock.component.mjs +0 -118
- package/esm2022/column-menu/column-menu-position.component.mjs +0 -196
- package/esm2022/column-menu/column-menu-settings.interface.mjs +0 -5
- package/esm2022/column-menu/column-menu-sort.component.mjs +0 -119
- package/esm2022/column-menu/column-menu-stick.component.mjs +0 -120
- package/esm2022/column-menu/column-menu-template.directive.mjs +0 -47
- package/esm2022/column-menu/column-menu.component.mjs +0 -839
- package/esm2022/column-menu/column-menu.service.mjs +0 -71
- package/esm2022/column-menu/column-sticky-change-event.mjs +0 -19
- package/esm2022/column-menu/column-visibility-change-event.mjs +0 -19
- package/esm2022/column-menu/utils.mjs +0 -52
- package/esm2022/column-resizing/column-handle.directive.mjs +0 -499
- package/esm2022/column-resizing/column-resize.interface.mjs +0 -5
- package/esm2022/column-resizing/column-resizing.service.mjs +0 -214
- package/esm2022/column-resizing/table.directive.mjs +0 -141
- package/esm2022/columns/cell-rowspan.mjs +0 -5
- package/esm2022/columns/checkbox-column.component.mjs +0 -106
- package/esm2022/columns/column-base.mjs +0 -432
- package/esm2022/columns/column-common.mjs +0 -73
- package/esm2022/columns/column-group.component.mjs +0 -135
- package/esm2022/columns/column-list.mjs +0 -94
- package/esm2022/columns/column.component.mjs +0 -198
- package/esm2022/columns/columns-container.mjs +0 -101
- package/esm2022/columns/command-column.component.mjs +0 -80
- package/esm2022/columns/reorder-column.component.mjs +0 -114
- package/esm2022/columns/sort-settings.mjs +0 -18
- package/esm2022/columns/span-column.component.mjs +0 -195
- package/esm2022/common/adaptiveness.service.mjs +0 -72
- package/esm2022/common/cell-click-event-args.interface.mjs +0 -5
- package/esm2022/common/clipboard-types.mjs +0 -5
- package/esm2022/common/clipboard.directive.mjs +0 -197
- package/esm2022/common/clipboard.service.mjs +0 -221
- package/esm2022/common/column-info.service.mjs +0 -92
- package/esm2022/common/create-form-group.mjs +0 -5
- package/esm2022/common/data-layout-mode.mjs +0 -5
- package/esm2022/common/default-track-by.mjs +0 -13
- package/esm2022/common/dom-events.service.mjs +0 -27
- package/esm2022/common/error-messages.mjs +0 -64
- package/esm2022/common/event-emitter.mjs +0 -39
- package/esm2022/common/fetch-data-callback.mjs +0 -5
- package/esm2022/common/field-datatype.mjs +0 -5
- package/esm2022/common/filter-descriptor-differ.mjs +0 -69
- package/esm2022/common/filter-operator.interface.mjs +0 -5
- package/esm2022/common/grid-col-size.mjs +0 -5
- package/esm2022/common/id.service.mjs +0 -59
- package/esm2022/common/pager-settings.mjs +0 -20
- package/esm2022/common/preventable-event.mjs +0 -24
- package/esm2022/common/provider.service.mjs +0 -42
- package/esm2022/common/remove-confirmation.mjs +0 -5
- package/esm2022/common/resizable-settings.mjs +0 -9
- package/esm2022/common/single-popup.service.mjs +0 -158
- package/esm2022/common/size-options.mjs +0 -5
- package/esm2022/common/sort.service.mjs +0 -14
- package/esm2022/common/toolbar-tool-base.directive.mjs +0 -85
- package/esm2022/constants.mjs +0 -16
- 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-mapping.service.mjs +0 -136
- package/esm2022/data/data.collection.mjs +0 -87
- package/esm2022/data/data.iterators.mjs +0 -221
- package/esm2022/data/grid-item.interface.mjs +0 -5
- package/esm2022/data/group-footer-item.interface.mjs +0 -5
- package/esm2022/data/group-item.interface.mjs +0 -5
- package/esm2022/databinding.directive.mjs +0 -233
- package/esm2022/directives.mjs +0 -504
- 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 -137
- 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 -59
- package/esm2022/editing/add-command.directive.mjs +0 -93
- package/esm2022/editing/add-event-args.interface.mjs +0 -5
- package/esm2022/editing/cancel-command-tool.directive.mjs +0 -64
- package/esm2022/editing/cancel-command.directive.mjs +0 -127
- package/esm2022/editing/cancel-event-args.interface.mjs +0 -5
- package/esm2022/editing/cell-close-event.mjs +0 -38
- package/esm2022/editing/edit-command-tool.directive.mjs +0 -60
- package/esm2022/editing/edit-command.directive.mjs +0 -124
- package/esm2022/editing/edit-event-args.interface.mjs +0 -5
- package/esm2022/editing/edit-row-options.interface.mjs +0 -5
- package/esm2022/editing/edit-template.directive.mjs +0 -43
- package/esm2022/editing/edit.service.mjs +0 -182
- package/esm2022/editing/form/dialog-form.component.mjs +0 -102
- package/esm2022/editing/form/form-formfield.component.mjs +0 -188
- package/esm2022/editing/form/form.component.mjs +0 -169
- package/esm2022/editing/form/index.mjs +0 -8
- package/esm2022/editing/form/models.mjs +0 -5
- package/esm2022/editing/local-data-changes.service.mjs +0 -18
- package/esm2022/editing/remove-command-tool.directive.mjs +0 -61
- package/esm2022/editing/remove-command.directive.mjs +0 -123
- package/esm2022/editing/remove-event-args.interface.mjs +0 -5
- package/esm2022/editing/save-command-tool.directive.mjs +0 -65
- package/esm2022/editing/save-command.directive.mjs +0 -126
- package/esm2022/editing/save-event-args.interface.mjs +0 -5
- package/esm2022/editing/toolbar-editing-tool-base.directive.mjs +0 -99
- 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 -167
- package/esm2022/editing-directives/external-editing.directive.mjs +0 -151
- package/esm2022/editing-directives/in-cell-editing.directive.mjs +0 -97
- package/esm2022/editing-directives/local-edit.service.mjs +0 -64
- package/esm2022/editing-directives/local-row-edit.service.mjs +0 -13
- package/esm2022/editing-directives/reactive-editing.directive.mjs +0 -60
- package/esm2022/editing-directives/row-editing-directive-base.mjs +0 -53
- package/esm2022/editing-directives/template-editing.directive.mjs +0 -72
- package/esm2022/editing-directives/utils.mjs +0 -18
- package/esm2022/excel/excel-command-tool.directive.mjs +0 -58
- package/esm2022/excel/excel-command.directive.mjs +0 -98
- package/esm2022/excel/excel-export-event.mjs +0 -18
- package/esm2022/excel/excel.component.mjs +0 -223
- package/esm2022/excel/excel.module.mjs +0 -45
- package/esm2022/excel/excel.service.mjs +0 -29
- package/esm2022/filtering/base-filter-cell.component.mjs +0 -174
- package/esm2022/filtering/boolean-filter.component.mjs +0 -83
- package/esm2022/filtering/cell/autocomplete-filter-cell.component.mjs +0 -114
- package/esm2022/filtering/cell/boolean-filter-cell.component.mjs +0 -113
- package/esm2022/filtering/cell/date-filter-cell.component.mjs +0 -141
- 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 -242
- 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 -155
- package/esm2022/filtering/cell/string-filter-cell.component.mjs +0 -127
- package/esm2022/filtering/date-filter.component.mjs +0 -172
- package/esm2022/filtering/filter-component.interface.mjs +0 -5
- package/esm2022/filtering/filter-host.directive.mjs +0 -58
- package/esm2022/filtering/filter-input-wrapper.component.mjs +0 -119
- package/esm2022/filtering/filter-input.directive.mjs +0 -123
- package/esm2022/filtering/filter-row.component.mjs +0 -131
- package/esm2022/filtering/filter.service.mjs +0 -44
- package/esm2022/filtering/filterable.mjs +0 -16
- package/esm2022/filtering/menu/boolean-filter-menu.component.mjs +0 -167
- package/esm2022/filtering/menu/date-filter-menu-input.component.mjs +0 -179
- package/esm2022/filtering/menu/date-filter-menu.component.mjs +0 -212
- package/esm2022/filtering/menu/filter-menu-component.factory.mjs +0 -19
- package/esm2022/filtering/menu/filter-menu-container.component.mjs +0 -418
- 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 -158
- package/esm2022/filtering/menu/filter-menu-template.directive.mjs +0 -48
- package/esm2022/filtering/menu/filter-menu.component.mjs +0 -221
- 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 -184
- package/esm2022/filtering/menu/numeric-filter-menu.component.mjs +0 -230
- package/esm2022/filtering/menu/string-filter-menu-input.component.mjs +0 -107
- package/esm2022/filtering/menu/string-filter-menu.component.mjs +0 -198
- package/esm2022/filtering/multicheckbox-filter.component.mjs +0 -324
- package/esm2022/filtering/numeric-filter.component.mjs +0 -145
- 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 -63
- package/esm2022/filtering/operators/ends-with-filter-operator.component.mjs +0 -63
- package/esm2022/filtering/operators/eq-filter-operator.component.mjs +0 -111
- package/esm2022/filtering/operators/filter-operator.base.mjs +0 -101
- 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 -63
- package/esm2022/filtering/operators/is-not-empty-filter-operator.component.mjs +0 -63
- package/esm2022/filtering/operators/is-not-null-filter-operator.component.mjs +0 -110
- package/esm2022/filtering/operators/isnull-filter-operator.component.mjs +0 -110
- 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 -110
- package/esm2022/filtering/operators/not-contains-filter-operator.component.mjs +0 -63
- package/esm2022/filtering/operators/starts-with-filter-operator.component.mjs +0 -63
- package/esm2022/filtering/string-filter.component.mjs +0 -90
- package/esm2022/grid.component.mjs +0 -4598
- package/esm2022/grid.module.mjs +0 -241
- package/esm2022/grouping/group-footer-template.directive.mjs +0 -44
- package/esm2022/grouping/group-header-column-template.directive.mjs +0 -45
- package/esm2022/grouping/group-header-template.directive.mjs +0 -46
- package/esm2022/grouping/group-header.component.mjs +0 -351
- package/esm2022/grouping/group-info.service.mjs +0 -43
- package/esm2022/grouping/group-key.interface.mjs +0 -5
- package/esm2022/grouping/group-panel.component.mjs +0 -487
- package/esm2022/grouping/group-rows-args.interface.mjs +0 -5
- package/esm2022/grouping/group-settings.mjs +0 -5
- package/esm2022/grouping/groups.service.mjs +0 -69
- package/esm2022/grouping/utils.mjs +0 -14
- package/esm2022/highlight/highlight-item.mjs +0 -5
- package/esm2022/highlight/highlight.directive.mjs +0 -132
- package/esm2022/index.mjs +0 -221
- package/esm2022/layout/browser-support.service.mjs +0 -94
- 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/layout/sizing-options.service.mjs +0 -18
- package/esm2022/localization/custom-messages.component.mjs +0 -54
- package/esm2022/localization/localized-messages.directive.mjs +0 -39
- package/esm2022/localization/messages.mjs +0 -895
- package/esm2022/navigation/default-focusable-element.mjs +0 -50
- package/esm2022/navigation/focus-group.mjs +0 -73
- package/esm2022/navigation/focus-root.mjs +0 -50
- package/esm2022/navigation/focusable-element.interface.mjs +0 -5
- package/esm2022/navigation/focusable.directive.mjs +0 -150
- package/esm2022/navigation/grid-focusable-element.mjs +0 -28
- package/esm2022/navigation/item-map.mjs +0 -59
- package/esm2022/navigation/logical-cell.directive.mjs +0 -224
- package/esm2022/navigation/logical-cell.interface.mjs +0 -5
- package/esm2022/navigation/logical-row.directive.mjs +0 -131
- package/esm2022/navigation/logical-row.interface.mjs +0 -5
- package/esm2022/navigation/navigable-settings.mjs +0 -5
- 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 -224
- package/esm2022/navigation/navigation-metadata.mjs +0 -35
- package/esm2022/navigation/navigation-mode.mjs +0 -5
- package/esm2022/navigation/navigation-model.mjs +0 -138
- package/esm2022/navigation/navigation-row.interface.mjs +0 -5
- package/esm2022/navigation/navigation.service.mjs +0 -998
- package/esm2022/navigation/toolbar-tool-name.mjs +0 -18
- package/esm2022/package-metadata.mjs +0 -16
- package/esm2022/pdf/export-element.mjs +0 -135
- package/esm2022/pdf/grid-query.mjs +0 -45
- package/esm2022/pdf/pdf-command-tool.directive.mjs +0 -60
- package/esm2022/pdf/pdf-command.directive.mjs +0 -98
- package/esm2022/pdf/pdf-export-event.mjs +0 -16
- package/esm2022/pdf/pdf-margin.component.mjs +0 -38
- package/esm2022/pdf/pdf-margin.interface.mjs +0 -5
- package/esm2022/pdf/pdf-template.directive.mjs +0 -43
- package/esm2022/pdf/pdf.component.mjs +0 -331
- package/esm2022/pdf/pdf.module.mjs +0 -47
- package/esm2022/pdf/pdf.service.mjs +0 -42
- package/esm2022/progress-kendo-angular-grid.mjs +0 -8
- package/esm2022/rendering/cell-loading.template.directive.mjs +0 -39
- package/esm2022/rendering/cell-template.directive.mjs +0 -44
- package/esm2022/rendering/cell.component.mjs +0 -717
- package/esm2022/rendering/common/cell-context.mjs +0 -13
- package/esm2022/rendering/common/col-group.component.mjs +0 -98
- package/esm2022/rendering/common/dom-queries.mjs +0 -162
- package/esm2022/rendering/common/field-accessor.pipe.mjs +0 -48
- package/esm2022/rendering/common/format.pipe.mjs +0 -37
- package/esm2022/rendering/common/loading.component.mjs +0 -60
- package/esm2022/rendering/common/row-args.mjs +0 -5
- package/esm2022/rendering/common/row-class.mjs +0 -5
- package/esm2022/rendering/common/spacer.component.mjs +0 -62
- package/esm2022/rendering/constants.mjs +0 -20
- package/esm2022/rendering/details/detail-collapse-event.mjs +0 -27
- package/esm2022/rendering/details/detail-expand-event.mjs +0 -27
- package/esm2022/rendering/details/detail-template.directive.mjs +0 -61
- package/esm2022/rendering/details/details.service.mjs +0 -56
- package/esm2022/rendering/details-expand.directive.mjs +0 -136
- package/esm2022/rendering/footer/footer-template.directive.mjs +0 -48
- package/esm2022/rendering/footer/footer.component.mjs +0 -266
- package/esm2022/rendering/grid-table.directive.mjs +0 -52
- package/esm2022/rendering/groups-expand.directive.mjs +0 -149
- package/esm2022/rendering/header/header-template.directive.mjs +0 -45
- package/esm2022/rendering/header/header.component.mjs +0 -1055
- package/esm2022/rendering/list.component.mjs +0 -1176
- package/esm2022/rendering/loading-template.directive.mjs +0 -38
- package/esm2022/rendering/no-records-template.directive.mjs +0 -38
- package/esm2022/rendering/rowspan.service.mjs +0 -24
- package/esm2022/rendering/table-body.component.mjs +0 -1250
- package/esm2022/rendering/toolbar/toolbar-focusable.directive.mjs +0 -83
- package/esm2022/rendering/toolbar/toolbar-navigation.service.mjs +0 -58
- package/esm2022/rendering/toolbar/toolbar-position.mjs +0 -5
- package/esm2022/rendering/toolbar/toolbar-template.directive.mjs +0 -55
- package/esm2022/rendering/toolbar/toolbar.component.mjs +0 -159
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-assistant.component.mjs +0 -272
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-request-response.service.mjs +0 -624
- package/esm2022/rendering/toolbar/tools/ai-assistant/ai-tool.directive.mjs +0 -273
- package/esm2022/rendering/toolbar/tools/ai-assistant/models.mjs +0 -43
- package/esm2022/rendering/toolbar/tools/ai-assistant/utils.mjs +0 -92
- package/esm2022/rendering/toolbar/tools/column-chooser-tool.directive.mjs +0 -238
- package/esm2022/rendering/toolbar/tools/filter-command-tool.directive.mjs +0 -219
- package/esm2022/rendering/toolbar/tools/filter-tool-wrapper.component.mjs +0 -151
- package/esm2022/rendering/toolbar/tools/filter-toolbar-tool.component.mjs +0 -223
- package/esm2022/rendering/toolbar/tools/group-command-tool.directive.mjs +0 -208
- package/esm2022/rendering/toolbar/tools/group-toolbar-tool.component.mjs +0 -451
- package/esm2022/rendering/toolbar/tools/select-all-command-tool.directive.mjs +0 -93
- package/esm2022/rendering/toolbar/tools/sort-command-tool.directive.mjs +0 -222
- package/esm2022/rendering/toolbar/tools/sort-toolbar-tool.component.mjs +0 -245
- package/esm2022/row-reordering/drag-handle-template.directive.mjs +0 -44
- package/esm2022/row-reordering/drag-hint-template.directive.mjs +0 -42
- package/esm2022/row-reordering/row-reorder.service.mjs +0 -280
- package/esm2022/row-reordering/types.mjs +0 -5
- package/esm2022/row-reordering/utils.mjs +0 -88
- package/esm2022/scrolling/content-scroll-event.mjs +0 -5
- package/esm2022/scrolling/row-height.service.mjs +0 -55
- package/esm2022/scrolling/scroll-bottom-event.mjs +0 -5
- package/esm2022/scrolling/scroll-request.service.mjs +0 -24
- package/esm2022/scrolling/scroll-sync.service.mjs +0 -80
- package/esm2022/scrolling/scroller.service.mjs +0 -254
- package/esm2022/scrolling/scrollmode.mjs +0 -5
- package/esm2022/scrolling/suspend.service.mjs +0 -17
- package/esm2022/selection/cell-selection.service.mjs +0 -349
- package/esm2022/selection/marquee.directive.mjs +0 -188
- package/esm2022/selection/pair-set.mjs +0 -158
- package/esm2022/selection/selectall-checkbox.directive.mjs +0 -143
- package/esm2022/selection/selection-checkbox.directive.mjs +0 -132
- package/esm2022/selection/selection-default.mjs +0 -208
- package/esm2022/selection/selection.directive.mjs +0 -53
- package/esm2022/selection/selection.service.mjs +0 -466
- package/esm2022/selection/types.mjs +0 -5
- package/esm2022/state-management/grid-state.models.mjs +0 -26
- package/esm2022/state-management/redo-command-tool.mjs +0 -74
- package/esm2022/state-management/undo-command-tool.mjs +0 -74
- package/esm2022/state-management/undo-redo.directive.mjs +0 -249
- package/esm2022/state-management/undo-redo.service.mjs +0 -21
- package/esm2022/state-management/undo-redo.stack.mjs +0 -238
- package/esm2022/utils.mjs +0 -216
|
@@ -1,254 +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 { isFirefox, firefoxMaxHeight, isDocumentAvailable } from '@progress/kendo-angular-common';
|
|
6
|
-
import { Observable, BehaviorSubject } from 'rxjs';
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export class ScrollAction {
|
|
11
|
-
offset;
|
|
12
|
-
changeVirtualData;
|
|
13
|
-
constructor(offset, changeVirtualData) {
|
|
14
|
-
this.offset = offset;
|
|
15
|
-
this.changeVirtualData = changeVirtualData;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* @hidden
|
|
20
|
-
*/
|
|
21
|
-
export class PageAction {
|
|
22
|
-
skip;
|
|
23
|
-
take;
|
|
24
|
-
constructor(skip, take) {
|
|
25
|
-
this.skip = skip;
|
|
26
|
-
this.take = take;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* @hidden
|
|
31
|
-
*/
|
|
32
|
-
export class ScrollBottomAction {
|
|
33
|
-
}
|
|
34
|
-
const SCROLL_BOTTOM_THRESHOLD = 2;
|
|
35
|
-
/**
|
|
36
|
-
* @hidden
|
|
37
|
-
*/
|
|
38
|
-
export class ScrollerService {
|
|
39
|
-
scrollObservable;
|
|
40
|
-
ctx;
|
|
41
|
-
total = 0;
|
|
42
|
-
rowHeightService;
|
|
43
|
-
table = null;
|
|
44
|
-
lockedTable = null;
|
|
45
|
-
tableBody = null;
|
|
46
|
-
container = null;
|
|
47
|
-
scrollHeightContainer = null;
|
|
48
|
-
scrollableVirtual = false;
|
|
49
|
-
tableTransformOffset = 0;
|
|
50
|
-
virtualSkip = 0;
|
|
51
|
-
virtualPageSize = 0;
|
|
52
|
-
firstToLoad = 0;
|
|
53
|
-
lastLoaded = 0;
|
|
54
|
-
scrollSyncing = false;
|
|
55
|
-
scrollSubscription;
|
|
56
|
-
subscription;
|
|
57
|
-
lastScrollTop = 0;
|
|
58
|
-
firstLoaded = 0;
|
|
59
|
-
expandedRows = {};
|
|
60
|
-
take;
|
|
61
|
-
constructor(scrollObservable, ctx) {
|
|
62
|
-
this.scrollObservable = scrollObservable;
|
|
63
|
-
this.ctx = ctx;
|
|
64
|
-
}
|
|
65
|
-
create(rowHeightService, skip, take, total) {
|
|
66
|
-
this.rowHeightService = rowHeightService;
|
|
67
|
-
this.firstLoaded = skip;
|
|
68
|
-
this.lastLoaded = skip + take;
|
|
69
|
-
this.take = take;
|
|
70
|
-
this.total = total;
|
|
71
|
-
this.lastScrollTop = 0;
|
|
72
|
-
const offset = this.rowHeightService.offset(skip);
|
|
73
|
-
const subject = new BehaviorSubject(new ScrollAction(offset, this.scrollableVirtual && (Boolean(this.ctx.grid?.pageable) || Boolean(this.ctx.grid?.group?.length))));
|
|
74
|
-
this.subscription = Observable.create(observer => {
|
|
75
|
-
this.unsubscribe();
|
|
76
|
-
this.scrollSubscription = this.scrollObservable.subscribe(x => this.onScroll(x, observer));
|
|
77
|
-
}).subscribe(x => subject.next(x));
|
|
78
|
-
return subject;
|
|
79
|
-
}
|
|
80
|
-
reset(skipScroll = false) {
|
|
81
|
-
if (!skipScroll) {
|
|
82
|
-
this.firstToLoad = 0;
|
|
83
|
-
this.firstLoaded = 0;
|
|
84
|
-
this.lastLoaded = 0;
|
|
85
|
-
this.virtualSkip = 0;
|
|
86
|
-
}
|
|
87
|
-
this.rowHeightService = undefined;
|
|
88
|
-
if (skipScroll) {
|
|
89
|
-
this.scrollSyncing = true;
|
|
90
|
-
}
|
|
91
|
-
if (!skipScroll && this.container && this.container.scrollTop !== 0) {
|
|
92
|
-
this.scrollSyncing = true;
|
|
93
|
-
this.container.scrollTop = 0;
|
|
94
|
-
this.lastScrollTop = 0;
|
|
95
|
-
this.translate(0, true);
|
|
96
|
-
this.tableTransformOffset = 0;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
update(skipAdjust = false) {
|
|
100
|
-
const itemHeights = this.getItemHeights();
|
|
101
|
-
if (this.firstLoaded > this.firstToLoad) {
|
|
102
|
-
// Scrolled up
|
|
103
|
-
const count = Math.min(this.firstLoaded - this.firstToLoad, this.take);
|
|
104
|
-
const newItemsHeight = this.getTotalHeight(count, itemHeights);
|
|
105
|
-
const newItemsExpectedHeight = this.getExpectedTotalHeight(count);
|
|
106
|
-
const diff = newItemsHeight - newItemsExpectedHeight;
|
|
107
|
-
if (!skipAdjust && diff !== 0) {
|
|
108
|
-
this.adjustScroll(diff);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
this.rowHeightService?.update(this.firstToLoad, itemHeights);
|
|
112
|
-
this.scrollHeightContainer && this.setScrollHeightContainerHeight();
|
|
113
|
-
this.firstLoaded = this.firstToLoad;
|
|
114
|
-
this.lastLoaded = this.firstLoaded + itemHeights.length - 1;
|
|
115
|
-
}
|
|
116
|
-
destroy() {
|
|
117
|
-
this.unsubscribe();
|
|
118
|
-
if (this.subscription) {
|
|
119
|
-
this.subscription.unsubscribe();
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
onScroll({ scrollTop, offsetHeight, scrollHeight, clientHeight }, observer) {
|
|
123
|
-
if (this.scrollSyncing) {
|
|
124
|
-
this.scrollSyncing = false;
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
if (!isDocumentAvailable() || (this.lastScrollTop === scrollTop)) {
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
const up = this.lastScrollTop >= scrollTop;
|
|
131
|
-
const down = !up;
|
|
132
|
-
this.lastScrollTop = scrollTop;
|
|
133
|
-
let firstItemIndex = this.rowHeightService.index(scrollTop);
|
|
134
|
-
const lastItemIndex = this.rowHeightService.index(scrollTop + offsetHeight);
|
|
135
|
-
const overflow = Math.max(firstItemIndex + (this.virtualPageSize || this.take) - this.total, 0);
|
|
136
|
-
firstItemIndex = Math.max(firstItemIndex - overflow, 0);
|
|
137
|
-
if (down) {
|
|
138
|
-
const atBottom = scrollHeight - clientHeight - scrollTop < SCROLL_BOTTOM_THRESHOLD;
|
|
139
|
-
if (atBottom) {
|
|
140
|
-
observer.next(new ScrollBottomAction());
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
if (!this.scrollableVirtual) {
|
|
144
|
-
return;
|
|
145
|
-
}
|
|
146
|
-
if (down && lastItemIndex >= this.lastLoaded && this.lastLoaded < this.total - 1) {
|
|
147
|
-
this.firstToLoad = firstItemIndex;
|
|
148
|
-
this.loadPage(observer);
|
|
149
|
-
}
|
|
150
|
-
else if (up && firstItemIndex < this.firstLoaded) {
|
|
151
|
-
const nonVisibleBuffer = Math.max(Math.floor((this.virtualPageSize || this.take) * 0.3) - overflow, 0);
|
|
152
|
-
this.firstToLoad = Math.max(firstItemIndex - nonVisibleBuffer, 0);
|
|
153
|
-
this.loadPage(observer);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
loadPage(observer) {
|
|
157
|
-
if (!this.rowHeightService) {
|
|
158
|
-
return;
|
|
159
|
-
}
|
|
160
|
-
this.translate(this.rowHeightService.offset(this.firstToLoad));
|
|
161
|
-
observer.next(new ScrollAction(this.rowHeightService.offset(this.firstToLoad)));
|
|
162
|
-
this.virtualPageChange(this.firstToLoad, observer);
|
|
163
|
-
}
|
|
164
|
-
unsubscribe() {
|
|
165
|
-
if (this.scrollSubscription) {
|
|
166
|
-
this.scrollSubscription.unsubscribe();
|
|
167
|
-
this.scrollSubscription = undefined;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
translate(dY, forceSet) {
|
|
171
|
-
if (this.scrollableVirtual && this.table) {
|
|
172
|
-
if (forceSet) {
|
|
173
|
-
this.table.style.transform = 'translateY(' + dY + 'px)';
|
|
174
|
-
if (this.lockedTable) {
|
|
175
|
-
this.lockedTable.style.transform = 'translateY(' + dY + 'px)';
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
this.tableTransformOffset = dY;
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
adjustScroll(scrollOffset, initialAdjust = false) {
|
|
184
|
-
if (Number.isNaN(scrollOffset)) {
|
|
185
|
-
return;
|
|
186
|
-
}
|
|
187
|
-
this.scrollSyncing = true;
|
|
188
|
-
if (this.container) {
|
|
189
|
-
if (initialAdjust) {
|
|
190
|
-
this.container.scrollTop = scrollOffset;
|
|
191
|
-
this.translate(scrollOffset, true);
|
|
192
|
-
this.tableTransformOffset = scrollOffset;
|
|
193
|
-
this.firstToLoad = this.rowHeightService.index(scrollOffset);
|
|
194
|
-
}
|
|
195
|
-
else {
|
|
196
|
-
this.container.scrollTop += scrollOffset;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
isExpanded(rowIndex) {
|
|
201
|
-
return this.expandedRows[rowIndex] || false;
|
|
202
|
-
}
|
|
203
|
-
resetVirtualSkip = () => {
|
|
204
|
-
if (this.scrollableVirtual && this.virtualSkip) {
|
|
205
|
-
this.virtualSkip = 0;
|
|
206
|
-
}
|
|
207
|
-
};
|
|
208
|
-
setScrollHeightContainerHeight() {
|
|
209
|
-
if (this.scrollableVirtual) {
|
|
210
|
-
let containerHeight = this.rowHeightService?.totalHeight() || 0;
|
|
211
|
-
containerHeight = isFirefox ? Math.min(firefoxMaxHeight, containerHeight) : containerHeight;
|
|
212
|
-
this.scrollHeightContainer.style.height = containerHeight + 'px';
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
this.scrollHeightContainer.style.height = '0';
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
getItemHeights() {
|
|
219
|
-
const result = [];
|
|
220
|
-
if (this.tableBody) {
|
|
221
|
-
Array.from(this.tableBody.children).forEach((item, index) => {
|
|
222
|
-
const itemHeight = item.getBoundingClientRect().height;
|
|
223
|
-
if (item.classList.contains('k-detail-row')) {
|
|
224
|
-
result[result.length - 1] += itemHeight;
|
|
225
|
-
this.expandedRows[index] = true;
|
|
226
|
-
}
|
|
227
|
-
else {
|
|
228
|
-
result.push(itemHeight);
|
|
229
|
-
}
|
|
230
|
-
});
|
|
231
|
-
}
|
|
232
|
-
return result;
|
|
233
|
-
}
|
|
234
|
-
getTotalHeight(count, itemHeights) {
|
|
235
|
-
return itemHeights.slice(0, count).reduce((sum, current) => sum + current, 0);
|
|
236
|
-
}
|
|
237
|
-
getExpectedTotalHeight(count) {
|
|
238
|
-
const service = this.rowHeightService;
|
|
239
|
-
if (!service) {
|
|
240
|
-
return 0;
|
|
241
|
-
}
|
|
242
|
-
const lastItemIndex = this.firstToLoad + (count - 1);
|
|
243
|
-
return service.offset(lastItemIndex) + service.height(lastItemIndex) - service.offset(this.firstToLoad);
|
|
244
|
-
}
|
|
245
|
-
virtualPageChange = (skip, observer) => {
|
|
246
|
-
if (this.ctx.grid.pageable || this.ctx.grid.group?.length) {
|
|
247
|
-
this.virtualSkip = skip;
|
|
248
|
-
observer.next(new ScrollAction(this.rowHeightService?.offset(skip) || 0, true));
|
|
249
|
-
}
|
|
250
|
-
else if (skip !== this.ctx.grid.skip) {
|
|
251
|
-
observer.next(new PageAction(Math.max(0, skip), this.take));
|
|
252
|
-
}
|
|
253
|
-
};
|
|
254
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable } from '@angular/core';
|
|
6
|
-
import * as i0 from "@angular/core";
|
|
7
|
-
/**
|
|
8
|
-
* @hidden
|
|
9
|
-
*/
|
|
10
|
-
export class SuspendService {
|
|
11
|
-
scroll = false;
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuspendService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuspendService });
|
|
14
|
-
}
|
|
15
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SuspendService, decorators: [{
|
|
16
|
-
type: Injectable
|
|
17
|
-
}] });
|
|
@@ -1,349 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Injectable, EventEmitter } from '@angular/core';
|
|
6
|
-
import { iterator, isMultipleRangesEnabled } from '../utils';
|
|
7
|
-
import { isPresent } from '../utils';
|
|
8
|
-
import { DomEventsService } from '../common/dom-events.service';
|
|
9
|
-
import { LocalDataChangesService } from '../editing/local-data-changes.service';
|
|
10
|
-
import { NavigationService } from '../navigation/navigation.service';
|
|
11
|
-
import { CellSelectionAggregateService } from '../aggregates/selection-aggregate.service';
|
|
12
|
-
import * as i0 from "@angular/core";
|
|
13
|
-
import * as i1 from "../common/dom-events.service";
|
|
14
|
-
import * as i2 from "../aggregates/selection-aggregate.service";
|
|
15
|
-
import * as i3 from "../editing/local-data-changes.service";
|
|
16
|
-
import * as i4 from "../navigation/navigation.service";
|
|
17
|
-
/**
|
|
18
|
-
* @hidden
|
|
19
|
-
*/
|
|
20
|
-
export class CellSelectionService {
|
|
21
|
-
domEvents;
|
|
22
|
-
aggregateService;
|
|
23
|
-
localDataChangesService;
|
|
24
|
-
navigationService;
|
|
25
|
-
changes = new EventEmitter();
|
|
26
|
-
mouseUpEvent = new EventEmitter();
|
|
27
|
-
currentSelection = [];
|
|
28
|
-
settings;
|
|
29
|
-
active = false;
|
|
30
|
-
aggregates;
|
|
31
|
-
nonSelectableRows = new Map();
|
|
32
|
-
get enableMarquee() {
|
|
33
|
-
const checkboxOnly = this.settings && typeof this.settings === 'object' && this.settings.checkboxOnly;
|
|
34
|
-
if (!this.settings || checkboxOnly || this.settings.isStacked) {
|
|
35
|
-
return false;
|
|
36
|
-
}
|
|
37
|
-
const selectableSettings = this.settings.selectable;
|
|
38
|
-
const dragAndMultiple = typeof (selectableSettings) === 'object' &&
|
|
39
|
-
isPresent(selectableSettings) &&
|
|
40
|
-
selectableSettings.mode === 'multiple' &&
|
|
41
|
-
selectableSettings.cell &&
|
|
42
|
-
selectableSettings.enabled !== false &&
|
|
43
|
-
selectableSettings.drag;
|
|
44
|
-
return this.active && dragAndMultiple;
|
|
45
|
-
}
|
|
46
|
-
get hasNonSelectable() {
|
|
47
|
-
return this.nonSelectableRows.size > 0;
|
|
48
|
-
}
|
|
49
|
-
mouseDownEventArgs;
|
|
50
|
-
mouseUpEventArgs;
|
|
51
|
-
dragging = false;
|
|
52
|
-
dragSelectDeselect = false;
|
|
53
|
-
lastSelectionItem = { itemKey: 0, columnKey: 0 };
|
|
54
|
-
lastSelectionItemRowIndex = 0;
|
|
55
|
-
lastSelectionItemColIndex = 0;
|
|
56
|
-
cellClickSubscription;
|
|
57
|
-
dataChangedSubscription;
|
|
58
|
-
mousedownSubscription;
|
|
59
|
-
constructor(domEvents, aggregateService, localDataChangesService, navigationService) {
|
|
60
|
-
this.domEvents = domEvents;
|
|
61
|
-
this.aggregateService = aggregateService;
|
|
62
|
-
this.localDataChangesService = localDataChangesService;
|
|
63
|
-
this.navigationService = navigationService;
|
|
64
|
-
this.addSubscriptions();
|
|
65
|
-
}
|
|
66
|
-
init(settings) {
|
|
67
|
-
this.settings = settings;
|
|
68
|
-
this.currentSelection = [];
|
|
69
|
-
this.nonSelectableRows = new Map();
|
|
70
|
-
if (settings.selectable && settings.selectable.enabled !== false && !settings.isStacked) {
|
|
71
|
-
const iterator = this.getIterator();
|
|
72
|
-
let item = iterator.next();
|
|
73
|
-
while (!item.done) {
|
|
74
|
-
if (item.value && item.value.type === "data") {
|
|
75
|
-
const rowArgs = {
|
|
76
|
-
dataItem: item.value.data,
|
|
77
|
-
index: item.value.index
|
|
78
|
-
};
|
|
79
|
-
settings.columns.forEach(col => {
|
|
80
|
-
const selectedCellArgs = settings.cellSelected(rowArgs, col, col.leafIndex);
|
|
81
|
-
if (selectedCellArgs.selected) {
|
|
82
|
-
this.currentSelection.push(selectedCellArgs.item);
|
|
83
|
-
}
|
|
84
|
-
if (!settings.isRowSelectable(rowArgs)) {
|
|
85
|
-
this.nonSelectableRows.set(rowArgs.index, rowArgs.dataItem);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
item = iterator.next();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
isCellSelected(item, col) {
|
|
94
|
-
if (this.settings && this.active && !this.settings.isStacked) {
|
|
95
|
-
const selectedCellArgs = this.settings.cellSelected({ dataItem: item.data, index: item.index }, col, col.leafIndex);
|
|
96
|
-
return this.options.enabled && selectedCellArgs.selected && !this.nonSelectableRows.has(item.index);
|
|
97
|
-
}
|
|
98
|
-
return false;
|
|
99
|
-
}
|
|
100
|
-
handleClick(item, event) {
|
|
101
|
-
if (this.dragging) {
|
|
102
|
-
this.dragging = false;
|
|
103
|
-
return;
|
|
104
|
-
}
|
|
105
|
-
if (this.settings.isStacked) {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
let ev;
|
|
109
|
-
const ctrlKey = event.ctrlKey || event.metaKey;
|
|
110
|
-
if (this.options.mode === "single" && ctrlKey && this.isCellSelected(item, item.column)) {
|
|
111
|
-
ev = this.toggle(item);
|
|
112
|
-
}
|
|
113
|
-
else if (this.options.mode === "multiple") {
|
|
114
|
-
if ((ctrlKey || !this.options.metaKeyMultiSelect) && !event.shiftKey) {
|
|
115
|
-
ev = this.toggle(item);
|
|
116
|
-
}
|
|
117
|
-
else if (event.shiftKey) {
|
|
118
|
-
const startRowIndex = Math.min(this.lastSelectionItemRowIndex, item.index);
|
|
119
|
-
const startColIndex = Math.min(this.lastSelectionItemColIndex, item.column.leafIndex);
|
|
120
|
-
const endRowIndex = Math.max(this.lastSelectionItemRowIndex, item.index);
|
|
121
|
-
const endColIndex = Math.max(this.lastSelectionItemColIndex, item.column.leafIndex);
|
|
122
|
-
const preserveCurrentSelection = isMultipleRangesEnabled(this.settings);
|
|
123
|
-
ev = this.selectRange(startRowIndex, startColIndex, endRowIndex, endColIndex, preserveCurrentSelection);
|
|
124
|
-
if (preserveCurrentSelection) {
|
|
125
|
-
this.lastSelectionItemRowIndex = item.index;
|
|
126
|
-
this.lastSelectionItemColIndex = item.column.leafIndex;
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
if (!isPresent(ev)) {
|
|
131
|
-
ev = this.select(item);
|
|
132
|
-
this.currentSelection = [this.lastSelectionItem];
|
|
133
|
-
}
|
|
134
|
-
if (!ev.selectedCells.length && !ev.deselectedCells.length) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
ev.ctrlKey = ctrlKey;
|
|
138
|
-
ev.shiftKey = event.shiftKey;
|
|
139
|
-
if (this.options.cellAggregates && !event.shiftKey) {
|
|
140
|
-
ev.cellAggregates = this.aggregateService.onSelectionChange(ev);
|
|
141
|
-
}
|
|
142
|
-
if (ev.shiftKey) {
|
|
143
|
-
ev.rangeStartCell = this.lastSelectionItem;
|
|
144
|
-
ev.rangeEndCell = {
|
|
145
|
-
...this.settings.cellSelected({ dataItem: item.data, index: item.index }, item.column, item.column.leafIndex).item
|
|
146
|
-
};
|
|
147
|
-
}
|
|
148
|
-
this.changes.emit(ev);
|
|
149
|
-
}
|
|
150
|
-
toggle(item) {
|
|
151
|
-
const selectedCells = [];
|
|
152
|
-
const deselectedCells = [];
|
|
153
|
-
this.lastSelectionItem =
|
|
154
|
-
this.settings.cellSelected({ dataItem: item.data, index: item.index }, item.column, item.column.leafIndex).item;
|
|
155
|
-
this.lastSelectionItemRowIndex = item.index;
|
|
156
|
-
this.lastSelectionItemColIndex = item.column.leafIndex;
|
|
157
|
-
if (this.isCellSelected(item, item.column)) {
|
|
158
|
-
deselectedCells.push(this.lastSelectionItem);
|
|
159
|
-
}
|
|
160
|
-
else if (!this.nonSelectableRows.has(item.index)) {
|
|
161
|
-
selectedCells.push(this.lastSelectionItem);
|
|
162
|
-
}
|
|
163
|
-
return {
|
|
164
|
-
deselectedCells,
|
|
165
|
-
selectedCells
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
select(item) {
|
|
169
|
-
const selectedCells = [];
|
|
170
|
-
const deselectedCells = [];
|
|
171
|
-
this.lastSelectionItem =
|
|
172
|
-
this.settings.cellSelected({ dataItem: item.data, index: item.index }, item.column, item.column.leafIndex).item;
|
|
173
|
-
this.lastSelectionItemRowIndex = item.index;
|
|
174
|
-
this.lastSelectionItemColIndex = item.column.leafIndex;
|
|
175
|
-
if (!this.isCellSelected(item, item.column) && !this.nonSelectableRows.has(item.index)) {
|
|
176
|
-
selectedCells.push(this.lastSelectionItem);
|
|
177
|
-
}
|
|
178
|
-
this.currentSelection.forEach((selectedItem) => {
|
|
179
|
-
if (selectedItem.itemKey !== this.lastSelectionItem.itemKey || selectedItem.columnKey !== this.lastSelectionItem.columnKey) {
|
|
180
|
-
deselectedCells.push(selectedItem);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
return {
|
|
184
|
-
deselectedCells,
|
|
185
|
-
selectedCells
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
//Used to manually deselect removed items
|
|
189
|
-
deselect(removedItem) {
|
|
190
|
-
const iterator = this.getIterator();
|
|
191
|
-
let item = iterator.next();
|
|
192
|
-
let rowArgs;
|
|
193
|
-
while (!item.done) {
|
|
194
|
-
if (item.value && item.value.type === "data" && item.value.data === removedItem) {
|
|
195
|
-
rowArgs = {
|
|
196
|
-
dataItem: item.value.data,
|
|
197
|
-
index: item.value.index
|
|
198
|
-
};
|
|
199
|
-
break;
|
|
200
|
-
}
|
|
201
|
-
item = iterator.next();
|
|
202
|
-
}
|
|
203
|
-
if (rowArgs) {
|
|
204
|
-
const cellsToRemove = this.currentSelection.filter(selectedItem => {
|
|
205
|
-
const contender = this.settings.cellSelected(rowArgs, null, null).item;
|
|
206
|
-
return selectedItem.itemKey === contender.itemKey || this.nonSelectableRows.has(rowArgs.index);
|
|
207
|
-
});
|
|
208
|
-
if (cellsToRemove.length) {
|
|
209
|
-
const ev = {
|
|
210
|
-
ctrlKey: false,
|
|
211
|
-
deselectedCells: cellsToRemove,
|
|
212
|
-
selectedCells: []
|
|
213
|
-
};
|
|
214
|
-
this.changes.emit(ev);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
selectRange(startRowIndex, startColIndex, endRowIndex, endColIndex, preserveSelection = false, existingSelections = []) {
|
|
219
|
-
const selectedCells = [];
|
|
220
|
-
const deselectedCells = [];
|
|
221
|
-
const selectionStartRow = Math.min(startRowIndex, endRowIndex);
|
|
222
|
-
const selectionStartCol = Math.min(startColIndex, endColIndex);
|
|
223
|
-
const selectionEndRow = Math.max(startRowIndex, endRowIndex);
|
|
224
|
-
const selectionEndCol = Math.max(startColIndex, endColIndex);
|
|
225
|
-
const iterator = this.getIterator();
|
|
226
|
-
let next = iterator.next();
|
|
227
|
-
while (!next.done) {
|
|
228
|
-
if (next.value && next.value.type === "data") {
|
|
229
|
-
const idx = next.value.index;
|
|
230
|
-
const data = next.value.data;
|
|
231
|
-
const rowArgs = {
|
|
232
|
-
dataItem: data,
|
|
233
|
-
index: idx
|
|
234
|
-
};
|
|
235
|
-
this.settings.columns.forEach(col => {
|
|
236
|
-
const { item } = this.settings.cellSelected(rowArgs, col, col.leafIndex);
|
|
237
|
-
const selected = this.isCellSelected(next.value, col);
|
|
238
|
-
const isInRowRange = selectionStartRow <= idx && idx <= selectionEndRow;
|
|
239
|
-
const isInColRange = selectionStartCol <= col.leafIndex && col.leafIndex <= selectionEndCol;
|
|
240
|
-
const isInSelectionRect = isInRowRange && isInColRange;
|
|
241
|
-
if (!isInSelectionRect && selected) {
|
|
242
|
-
const deselectCell = !(preserveSelection || existingSelections.find((value) => value && value.itemKey === item.itemKey && value.columnKey === item.columnKey));
|
|
243
|
-
if (deselectCell) {
|
|
244
|
-
deselectedCells.push(item);
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
if (isInSelectionRect && !selected && !this.nonSelectableRows.has(idx)) {
|
|
248
|
-
selectedCells.push(item);
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
}
|
|
252
|
-
next = iterator.next();
|
|
253
|
-
}
|
|
254
|
-
let cellAggregates;
|
|
255
|
-
if (this.options.cellAggregates) {
|
|
256
|
-
cellAggregates = this.aggregateService.onSelectionChange({ selectedCells, deselectedCells });
|
|
257
|
-
}
|
|
258
|
-
return {
|
|
259
|
-
deselectedCells,
|
|
260
|
-
selectedCells,
|
|
261
|
-
cellAggregates
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
get options() {
|
|
265
|
-
const defaultOptions = {
|
|
266
|
-
cellAggregates: false,
|
|
267
|
-
checkboxOnly: false,
|
|
268
|
-
enabled: true,
|
|
269
|
-
mode: "multiple",
|
|
270
|
-
metaKeyMultiSelect: true
|
|
271
|
-
};
|
|
272
|
-
if (!isPresent(this.settings)) {
|
|
273
|
-
return defaultOptions;
|
|
274
|
-
}
|
|
275
|
-
if (typeof this.settings.selectable === 'boolean') {
|
|
276
|
-
return {
|
|
277
|
-
cellAggregates: false,
|
|
278
|
-
checkboxOnly: false,
|
|
279
|
-
enabled: this.settings.selectable,
|
|
280
|
-
mode: "multiple",
|
|
281
|
-
metaKeyMultiSelect: true
|
|
282
|
-
};
|
|
283
|
-
}
|
|
284
|
-
else {
|
|
285
|
-
return Object.assign(defaultOptions, this.settings.selectable);
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
ngOnDestroy() {
|
|
289
|
-
this.removeSubscriptions();
|
|
290
|
-
}
|
|
291
|
-
addSubscriptions() {
|
|
292
|
-
if (!this.cellClickSubscription) {
|
|
293
|
-
this.cellClickSubscription = this.domEvents.cellClick.subscribe((args) => {
|
|
294
|
-
if (this.options.enabled && !this.options.checkboxOnly && args.type !== 'contextmenu') {
|
|
295
|
-
if (this.active) {
|
|
296
|
-
this.handleClick({ index: args.rowIndex, data: args.dataItem, column: args.column }, args.originalEvent);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
});
|
|
300
|
-
}
|
|
301
|
-
if (!this.mousedownSubscription) {
|
|
302
|
-
this.mousedownSubscription = this.domEvents.cellMousedown.subscribe((args) => {
|
|
303
|
-
this.mouseDownEventArgs = args;
|
|
304
|
-
if (this.options.enabled && (!this.options.mode || this.options.mode === "multiple") &&
|
|
305
|
-
!this.options.checkboxOnly && args.originalEvent.shiftKey) {
|
|
306
|
-
if (this.active) {
|
|
307
|
-
args.originalEvent.preventDefault();
|
|
308
|
-
this.navigationService.focusCellByElement(args.originalEvent.target);
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
});
|
|
312
|
-
}
|
|
313
|
-
if (this.localDataChangesService && !this.dataChangedSubscription) {
|
|
314
|
-
this.dataChangedSubscription = this.localDataChangesService.changes.subscribe((args) => {
|
|
315
|
-
if (this.active) {
|
|
316
|
-
if (isPresent(args.action) && args.action === 'remove') {
|
|
317
|
-
this.deselect(args.item);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
});
|
|
321
|
-
}
|
|
322
|
-
}
|
|
323
|
-
getIterator() {
|
|
324
|
-
const accessor = this.settings.view.accessor();
|
|
325
|
-
if (!accessor) {
|
|
326
|
-
return;
|
|
327
|
-
}
|
|
328
|
-
return accessor[iterator]();
|
|
329
|
-
}
|
|
330
|
-
removeSubscriptions() {
|
|
331
|
-
if (this.cellClickSubscription) {
|
|
332
|
-
this.cellClickSubscription.unsubscribe();
|
|
333
|
-
this.cellClickSubscription = null;
|
|
334
|
-
}
|
|
335
|
-
if (this.mousedownSubscription) {
|
|
336
|
-
this.mousedownSubscription.unsubscribe();
|
|
337
|
-
this.mousedownSubscription = null;
|
|
338
|
-
}
|
|
339
|
-
if (this.dataChangedSubscription) {
|
|
340
|
-
this.dataChangedSubscription.unsubscribe();
|
|
341
|
-
this.dataChangedSubscription = null;
|
|
342
|
-
}
|
|
343
|
-
}
|
|
344
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CellSelectionService, deps: [{ token: i1.DomEventsService }, { token: i2.CellSelectionAggregateService }, { token: i3.LocalDataChangesService }, { token: i4.NavigationService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
345
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CellSelectionService });
|
|
346
|
-
}
|
|
347
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: CellSelectionService, decorators: [{
|
|
348
|
-
type: Injectable
|
|
349
|
-
}], ctorParameters: () => [{ type: i1.DomEventsService }, { type: i2.CellSelectionAggregateService }, { type: i3.LocalDataChangesService }, { type: i4.NavigationService }] });
|