@progress/kendo-angular-grid 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/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,188 +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 { DomEventsService } from './../common/dom-events.service';
|
|
6
|
-
import { Directive, ElementRef, Renderer2 } from '@angular/core';
|
|
7
|
-
import { DraggableDirective, isDocumentAvailable, isPresent } from '@progress/kendo-angular-common';
|
|
8
|
-
import { SelectionService } from './selection.service';
|
|
9
|
-
import { CellSelectionService } from './cell-selection.service';
|
|
10
|
-
import { take, delay } from 'rxjs/operators';
|
|
11
|
-
import { merge } from 'rxjs';
|
|
12
|
-
import { isMultipleRangesEnabled } from '../utils';
|
|
13
|
-
import * as i0 from "@angular/core";
|
|
14
|
-
import * as i1 from "@progress/kendo-angular-common";
|
|
15
|
-
import * as i2 from "./selection.service";
|
|
16
|
-
import * as i3 from "./cell-selection.service";
|
|
17
|
-
import * as i4 from "./../common/dom-events.service";
|
|
18
|
-
const createElement = () => {
|
|
19
|
-
if (!isDocumentAvailable()) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const marquee = document.createElement("div");
|
|
23
|
-
marquee.className = "k-marquee";
|
|
24
|
-
const marqueeColor = document.createElement("div");
|
|
25
|
-
marqueeColor.className = "k-marquee-color";
|
|
26
|
-
marquee.appendChild(marqueeColor);
|
|
27
|
-
return marquee;
|
|
28
|
-
};
|
|
29
|
-
const POINTER_OFFSET = 2;
|
|
30
|
-
const MINIMAL_DRAG_DISTANCE = 5;
|
|
31
|
-
const offsets = {
|
|
32
|
-
topLeft: { x: POINTER_OFFSET, y: POINTER_OFFSET },
|
|
33
|
-
topRight: { x: -POINTER_OFFSET, y: POINTER_OFFSET },
|
|
34
|
-
bottomLeft: { x: POINTER_OFFSET, y: -POINTER_OFFSET },
|
|
35
|
-
bottomRight: { x: -POINTER_OFFSET, y: -POINTER_OFFSET }
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* @hidden
|
|
39
|
-
*/
|
|
40
|
-
export class GridMarqueeDirective {
|
|
41
|
-
draggable;
|
|
42
|
-
selection;
|
|
43
|
-
cellSelection;
|
|
44
|
-
domEvents;
|
|
45
|
-
host;
|
|
46
|
-
renderer;
|
|
47
|
-
// possibly add snap
|
|
48
|
-
pressArgs;
|
|
49
|
-
marqueeElement;
|
|
50
|
-
pressTarget;
|
|
51
|
-
subscriptions;
|
|
52
|
-
selectionStarted = false;
|
|
53
|
-
dragEndSubscription;
|
|
54
|
-
constructor(draggable, selection, cellSelection, domEvents, host, renderer) {
|
|
55
|
-
this.draggable = draggable;
|
|
56
|
-
this.selection = selection;
|
|
57
|
-
this.cellSelection = cellSelection;
|
|
58
|
-
this.domEvents = domEvents;
|
|
59
|
-
this.host = host;
|
|
60
|
-
this.renderer = renderer;
|
|
61
|
-
}
|
|
62
|
-
ngOnInit() {
|
|
63
|
-
this.subscriptions = (this.draggable.kendoPress.subscribe(this.start.bind(this)));
|
|
64
|
-
this.subscriptions.add(this.draggable.kendoDrag.subscribe(this.moveMarquee.bind(this)));
|
|
65
|
-
}
|
|
66
|
-
ngOnDestroy() {
|
|
67
|
-
this.subscriptions.unsubscribe();
|
|
68
|
-
this.clean();
|
|
69
|
-
}
|
|
70
|
-
start(args) {
|
|
71
|
-
const isInvalidTarget = args.originalEvent.target.matches('.k-grid-content, .k-grid-content-locked, .k-grid-aria-root, .k-checkbox');
|
|
72
|
-
const isRowReorderColumn = isPresent(args.originalEvent.target.closest('.k-drag-cell'));
|
|
73
|
-
if (isInvalidTarget || isRowReorderColumn) {
|
|
74
|
-
this.pressArgs = null;
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
this.pressArgs = args;
|
|
78
|
-
this.pressTarget = null;
|
|
79
|
-
}
|
|
80
|
-
moveMarquee(args) {
|
|
81
|
-
if (!this.pressTarget) {
|
|
82
|
-
this.pressTarget = this.cellSelection.active ? this.cellSelection.mouseDownEventArgs : this.selection.mouseDownEventArgs;
|
|
83
|
-
}
|
|
84
|
-
const press = this.pressArgs;
|
|
85
|
-
if (!press) {
|
|
86
|
-
return;
|
|
87
|
-
}
|
|
88
|
-
if (!this.selectionStarted) {
|
|
89
|
-
const distance = Math.sqrt((args.pageX - press.pageX) ** 2 + (args.pageY - press.pageY) ** 2);
|
|
90
|
-
if (distance > MINIMAL_DRAG_DISTANCE) {
|
|
91
|
-
this.selectionStarted = true;
|
|
92
|
-
this.renderer.addClass(this.host.nativeElement, 'user-select-none');
|
|
93
|
-
this.renderer.setStyle(this.host.nativeElement, 'user-select', 'none');
|
|
94
|
-
this.dragEndSubscription = merge(this.domEvents.cellMouseup.pipe(take(1)), this.draggable.kendoRelease.pipe(delay(1), take(1)))
|
|
95
|
-
.subscribe(this.endSelection.bind(this));
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
this.initMarquee();
|
|
102
|
-
const element = this.marqueeElement;
|
|
103
|
-
const marqueeQuadrant = this.getMarqueeQuadrant(args.pageX, args.pageY, press.pageX, press.pageY);
|
|
104
|
-
let left = Math.min(args.pageX, press.pageX);
|
|
105
|
-
let top = Math.min(args.pageY, press.pageY);
|
|
106
|
-
const width = Math.abs(args.pageX - press.pageX);
|
|
107
|
-
const height = Math.abs(args.pageY - press.pageY);
|
|
108
|
-
if (marqueeQuadrant) {
|
|
109
|
-
left += offsets[marqueeQuadrant].x;
|
|
110
|
-
top += offsets[marqueeQuadrant].y;
|
|
111
|
-
}
|
|
112
|
-
element.style.left = `${left}px`;
|
|
113
|
-
element.style.top = `${top}px`;
|
|
114
|
-
element.style.width = `${width}px`;
|
|
115
|
-
element.style.height = `${height}px`;
|
|
116
|
-
}
|
|
117
|
-
endSelection(args) {
|
|
118
|
-
if (args.type === 'mouseup' || args.type === 'touchend') {
|
|
119
|
-
const modifier = args.originalEvent.ctrlKey || args.originalEvent.metaKey;
|
|
120
|
-
const preserveCurrentSelection = modifier &&
|
|
121
|
-
(isMultipleRangesEnabled(this.selection.settings) ||
|
|
122
|
-
isMultipleRangesEnabled(this.cellSelection.settings));
|
|
123
|
-
if (this.cellSelection.active) {
|
|
124
|
-
this.cellSelection.dragging = true;
|
|
125
|
-
this.cellSelection.changes.emit(this.cellSelection.selectRange(this.pressTarget.rowIndex, this.pressTarget.column.leafIndex, args.rowIndex, args.column.leafIndex, preserveCurrentSelection));
|
|
126
|
-
}
|
|
127
|
-
else if (this.selection.active) {
|
|
128
|
-
this.selection.dragging = true;
|
|
129
|
-
this.selection.changes.emit(this.selection.selectRange(this.pressTarget.rowIndex, args.rowIndex, preserveCurrentSelection));
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
this.clean();
|
|
133
|
-
}
|
|
134
|
-
clean() {
|
|
135
|
-
if (this.marqueeElement) {
|
|
136
|
-
document.body.removeChild(this.marqueeElement);
|
|
137
|
-
this.marqueeElement = null;
|
|
138
|
-
}
|
|
139
|
-
if (this.dragEndSubscription) {
|
|
140
|
-
this.dragEndSubscription.unsubscribe();
|
|
141
|
-
}
|
|
142
|
-
this.renderer.removeClass(this.host.nativeElement, 'user-select-none');
|
|
143
|
-
this.renderer.removeStyle(this.host.nativeElement, 'user-select');
|
|
144
|
-
this.dragEndSubscription = null;
|
|
145
|
-
this.pressTarget = null;
|
|
146
|
-
this.pressArgs = null;
|
|
147
|
-
this.selectionStarted = false;
|
|
148
|
-
// eslint-disable-next-line no-unused-expressions
|
|
149
|
-
this.cellSelection.active ? this.cellSelection.dragging = false : this.selection.dragging = false;
|
|
150
|
-
}
|
|
151
|
-
initMarquee() {
|
|
152
|
-
if (!isDocumentAvailable()) {
|
|
153
|
-
return;
|
|
154
|
-
}
|
|
155
|
-
if (!this.marqueeElement) {
|
|
156
|
-
this.marqueeElement = createElement();
|
|
157
|
-
document.body.appendChild(this.marqueeElement);
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
getMarqueeQuadrant(pointerX, pointerY, startX, startY) {
|
|
161
|
-
const leftHalf = pointerX < startX;
|
|
162
|
-
const rightHalf = pointerX > startX;
|
|
163
|
-
const topHalf = pointerY < startY;
|
|
164
|
-
const bottomHalf = pointerY > startY;
|
|
165
|
-
if (leftHalf && topHalf) {
|
|
166
|
-
return 'topLeft';
|
|
167
|
-
}
|
|
168
|
-
if (leftHalf && bottomHalf) {
|
|
169
|
-
return 'bottomLeft';
|
|
170
|
-
}
|
|
171
|
-
if (rightHalf && topHalf) {
|
|
172
|
-
return 'topRight';
|
|
173
|
-
}
|
|
174
|
-
if (rightHalf && bottomHalf) {
|
|
175
|
-
return 'bottomRight';
|
|
176
|
-
}
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridMarqueeDirective, deps: [{ token: i1.DraggableDirective }, { token: i2.SelectionService }, { token: i3.CellSelectionService }, { token: i4.DomEventsService }, { token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
180
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: GridMarqueeDirective, isStandalone: true, selector: "[kendoGridSelectionMarquee]", ngImport: i0 });
|
|
181
|
-
}
|
|
182
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: GridMarqueeDirective, decorators: [{
|
|
183
|
-
type: Directive,
|
|
184
|
-
args: [{
|
|
185
|
-
selector: '[kendoGridSelectionMarquee]',
|
|
186
|
-
standalone: true
|
|
187
|
-
}]
|
|
188
|
-
}], ctorParameters: () => [{ type: i1.DraggableDirective }, { type: i2.SelectionService }, { type: i3.CellSelectionService }, { type: i4.DomEventsService }, { type: i0.ElementRef }, { type: i0.Renderer2 }] });
|
|
@@ -1,158 +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
|
-
/**
|
|
6
|
-
* @hidden
|
|
7
|
-
*
|
|
8
|
-
* Quick look-up structure for combinations of keys or single keys.
|
|
9
|
-
* Similar to the native JS Set, however, working with single keys or a couple of keys.
|
|
10
|
-
* Supports both primitive keys and object keys (compared by reference).
|
|
11
|
-
*/
|
|
12
|
-
export class PairSet {
|
|
13
|
-
/**
|
|
14
|
-
* Symbol used internally to represent "no Y key" when storing single X keys.
|
|
15
|
-
*/
|
|
16
|
-
static SINGLE_KEY_SYMBOL = Symbol('SINGLE_KEY');
|
|
17
|
-
/**
|
|
18
|
-
* Gets the total number of key entries (both single keys and key pairs).
|
|
19
|
-
*/
|
|
20
|
-
get size() {
|
|
21
|
-
return this.totalKeysCount;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Holds a set of Y keys for each defined X key.
|
|
25
|
-
* Each X key creates a map which holds a set of Y keys.
|
|
26
|
-
* For single keys, the Y value is the SINGLE_KEY_SYMBOL.
|
|
27
|
-
*
|
|
28
|
-
* Map { 'foo' => Set { Symbol(SINGLE_KEY) } } // single key: {x: 'foo'}
|
|
29
|
-
* Map { 'foo2' => Set { 'bar', 'baz' } } // pairs: {x: 'foo2', y: 'bar'}, {x: 'foo2', y: 'baz'}
|
|
30
|
-
*/
|
|
31
|
-
keysX = new Map();
|
|
32
|
-
/**
|
|
33
|
-
* Count each added or deleted key manually to avoid iterating over all items when calling `this.size`.
|
|
34
|
-
*/
|
|
35
|
-
totalKeysCount = 0;
|
|
36
|
-
constructor(items, keyXField, keyYField) {
|
|
37
|
-
if (items && keyXField) {
|
|
38
|
-
items.forEach(item => {
|
|
39
|
-
if (keyYField && item[keyYField] !== undefined) {
|
|
40
|
-
this.add(item[keyXField], item[keyYField]);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
this.addSingle(item[keyXField]);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Adds a single key entry.
|
|
50
|
-
*/
|
|
51
|
-
addSingle(keyX) {
|
|
52
|
-
if (!this.keysX.has(keyX)) {
|
|
53
|
-
this.keysX.set(keyX, new Set());
|
|
54
|
-
}
|
|
55
|
-
if (!this.hasSingle(keyX)) {
|
|
56
|
-
this.keysX.get(keyX).add(PairSet.SINGLE_KEY_SYMBOL);
|
|
57
|
-
this.totalKeysCount += 1;
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Adds a couple of items identified as a combination.
|
|
62
|
-
*/
|
|
63
|
-
add(keyX, keyY) {
|
|
64
|
-
if (!this.keysX.has(keyX)) {
|
|
65
|
-
this.keysX.set(keyX, new Set());
|
|
66
|
-
}
|
|
67
|
-
if (!this.has(keyX, keyY)) {
|
|
68
|
-
this.keysX.get(keyX).add(keyY);
|
|
69
|
-
this.totalKeysCount += 1;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
/**
|
|
73
|
-
* Deletes a single key entry.
|
|
74
|
-
*/
|
|
75
|
-
deleteSingle(keyX) {
|
|
76
|
-
if (this.hasSingle(keyX)) {
|
|
77
|
-
this.keysX.get(keyX).delete(PairSet.SINGLE_KEY_SYMBOL);
|
|
78
|
-
this.totalKeysCount -= 1;
|
|
79
|
-
if (this.keysX.get(keyX).size === 0) {
|
|
80
|
-
this.keysX.delete(keyX);
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Deletes a combination of a couple of items identified together.
|
|
86
|
-
*/
|
|
87
|
-
delete(keyX, keyY) {
|
|
88
|
-
if (this.has(keyX, keyY)) {
|
|
89
|
-
this.keysX.get(keyX).delete(keyY);
|
|
90
|
-
this.totalKeysCount -= 1;
|
|
91
|
-
if (this.keysX.get(keyX).size === 0) {
|
|
92
|
-
this.keysX.delete(keyX);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Checks whether a single key is stored.
|
|
98
|
-
*/
|
|
99
|
-
hasSingle(keyX) {
|
|
100
|
-
return this.keysX.has(keyX) && this.keysX.get(keyX).has(PairSet.SINGLE_KEY_SYMBOL);
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Checks whether the defined combination is stored.
|
|
104
|
-
*/
|
|
105
|
-
has(keyX, keyY) {
|
|
106
|
-
return this.keysX.has(keyX) && this.keysX.get(keyX).has(keyY);
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Checks whether any entry exists for the given X key (single or paired).
|
|
110
|
-
*/
|
|
111
|
-
hasX(keyX) {
|
|
112
|
-
return this.keysX.has(keyX) && this.keysX.get(keyX).size > 0;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Gets all Y keys for a given X key, excluding single key entries.
|
|
116
|
-
*/
|
|
117
|
-
getYKeys(keyX) {
|
|
118
|
-
if (!this.keysX.has(keyX)) {
|
|
119
|
-
return [];
|
|
120
|
-
}
|
|
121
|
-
const yKeys = Array.from(this.keysX.get(keyX));
|
|
122
|
-
return yKeys.filter(yKey => yKey !== PairSet.SINGLE_KEY_SYMBOL);
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Clears all key combinations and single keys.
|
|
126
|
-
*/
|
|
127
|
-
clear() {
|
|
128
|
-
this.keysX.clear();
|
|
129
|
-
this.totalKeysCount = 0;
|
|
130
|
-
}
|
|
131
|
-
/**
|
|
132
|
-
* Converts the persisted data structure to an array of objects,
|
|
133
|
-
* using the provided field names for the object props.
|
|
134
|
-
* Single keys will only have the keyXField property.
|
|
135
|
-
* Pair keys will have both keyXField and keyYField properties.
|
|
136
|
-
*/
|
|
137
|
-
toArray(keyXField, keyYField) {
|
|
138
|
-
return Array.from(this.keysX).reduce((pairs, pair) => {
|
|
139
|
-
// Array.from(mapInstance) returns an array of arrays [[itemKey1, columnKeysSet1], [itemKey2, columnKeysSet2]]
|
|
140
|
-
const [keyX, keysY] = pair;
|
|
141
|
-
Array.from(keysY).forEach(keyY => {
|
|
142
|
-
if (keyY === PairSet.SINGLE_KEY_SYMBOL) {
|
|
143
|
-
// Single key entry
|
|
144
|
-
pairs.push({ [keyXField]: keyX });
|
|
145
|
-
}
|
|
146
|
-
else {
|
|
147
|
-
// Pair key entry
|
|
148
|
-
const entry = { [keyXField]: keyX };
|
|
149
|
-
if (keyYField) {
|
|
150
|
-
entry[keyYField] = keyY;
|
|
151
|
-
}
|
|
152
|
-
pairs.push(entry);
|
|
153
|
-
}
|
|
154
|
-
});
|
|
155
|
-
return pairs;
|
|
156
|
-
}, []);
|
|
157
|
-
}
|
|
158
|
-
}
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, Input, Output, EventEmitter, NgZone, Host, Optional, Renderer2, ElementRef } from '@angular/core';
|
|
6
|
-
import { SelectionService } from './selection.service';
|
|
7
|
-
import { isPresent } from '../utils';
|
|
8
|
-
import { hasObservers } from '@progress/kendo-angular-common';
|
|
9
|
-
import { CellSelectionService } from './cell-selection.service';
|
|
10
|
-
import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "./selection.service";
|
|
13
|
-
import * as i2 from "./cell-selection.service";
|
|
14
|
-
import * as i3 from "@progress/kendo-angular-inputs";
|
|
15
|
-
/**
|
|
16
|
-
* Adds a select-all checkbox to the Grid. [See example](slug:grid_selection_persistence#selecting-all-rows).
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```html
|
|
20
|
-
* <kendo-checkbox
|
|
21
|
-
* kendoGridSelectAllCheckbox
|
|
22
|
-
* [state]="selectAllState"
|
|
23
|
-
* (selectAllChange)="onSelectAllChange($event)"
|
|
24
|
-
* ></kendo-checkbox>
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export class SelectAllCheckboxDirective {
|
|
28
|
-
selectionService;
|
|
29
|
-
cellSelectionService;
|
|
30
|
-
ngZone;
|
|
31
|
-
element;
|
|
32
|
-
renderer;
|
|
33
|
-
checkbox;
|
|
34
|
-
/**
|
|
35
|
-
* Explicitly overrides the state of the select-all checkbox.
|
|
36
|
-
*/
|
|
37
|
-
state;
|
|
38
|
-
/**
|
|
39
|
-
* Emits when the user clicks the select-all checkbox.
|
|
40
|
-
* ([see example](slug:grid_row_selection#toc-select-all-checkbox)).
|
|
41
|
-
*/
|
|
42
|
-
selectAllChange = new EventEmitter();
|
|
43
|
-
destroyClick;
|
|
44
|
-
checkboxChange;
|
|
45
|
-
stateSet = false;
|
|
46
|
-
ngAfterContentChecked() {
|
|
47
|
-
this.setState();
|
|
48
|
-
}
|
|
49
|
-
ngOnChanges() {
|
|
50
|
-
this.stateSet = true;
|
|
51
|
-
}
|
|
52
|
-
constructor(selectionService, cellSelectionService, ngZone, element, renderer, checkbox) {
|
|
53
|
-
this.selectionService = selectionService;
|
|
54
|
-
this.cellSelectionService = cellSelectionService;
|
|
55
|
-
this.ngZone = ngZone;
|
|
56
|
-
this.element = element;
|
|
57
|
-
this.renderer = renderer;
|
|
58
|
-
this.checkbox = checkbox;
|
|
59
|
-
this.ngZone.runOutsideAngular(() => {
|
|
60
|
-
if (this.checkbox) {
|
|
61
|
-
this.checkboxChange = this.checkbox.checkedStateChange.subscribe(this.onClick.bind(this));
|
|
62
|
-
}
|
|
63
|
-
else {
|
|
64
|
-
this.destroyClick = this.renderer.listen(this.element.nativeElement, 'click', this.onClick.bind(this));
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
ngOnDestroy() {
|
|
69
|
-
if (this.checkboxChange) {
|
|
70
|
-
this.checkboxChange.unsubscribe();
|
|
71
|
-
}
|
|
72
|
-
if (this.destroyClick) {
|
|
73
|
-
this.destroyClick();
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* @hidden
|
|
78
|
-
*/
|
|
79
|
-
onClick() {
|
|
80
|
-
const isIndeterminateState = this.checkbox?.checkedState === 'indeterminate' || this.element.nativeElement.indeterminate;
|
|
81
|
-
const isCheckedState = this.checkbox?.checkedState === true || this.element.nativeElement.checked;
|
|
82
|
-
const uncheckedState = isIndeterminateState ? 'indeterminate' : 'unchecked';
|
|
83
|
-
const checkboxState = isCheckedState ? 'checked' : uncheckedState;
|
|
84
|
-
const isChecked = this.selectionService.hasNonSelectable ? !this.selectionService.selectAllChecked : isCheckedState;
|
|
85
|
-
const options = this.selectionService.options;
|
|
86
|
-
const enabledAndMultiple = options.enabled && options.mode === 'multiple' && !this.cellSelectionService.active;
|
|
87
|
-
const shouldEmitSelectAll = hasObservers(this.selectAllChange);
|
|
88
|
-
if (enabledAndMultiple || shouldEmitSelectAll) {
|
|
89
|
-
this.ngZone.run(() => {
|
|
90
|
-
if (enabledAndMultiple) {
|
|
91
|
-
this.selectionService.updateAll(isChecked);
|
|
92
|
-
}
|
|
93
|
-
if (shouldEmitSelectAll) {
|
|
94
|
-
this.selectAllChange.emit(checkboxState);
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* @hidden
|
|
101
|
-
*/
|
|
102
|
-
setState() {
|
|
103
|
-
const state = this.stateSet ? this.stateToBool() : this.selectionService.selectAllState;
|
|
104
|
-
if (this.checkbox) {
|
|
105
|
-
this.checkbox.checkedState = isPresent(state) ? state : 'indeterminate';
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
const elem = this.element.nativeElement;
|
|
109
|
-
this.renderer.setProperty(elem, 'indeterminate', !isPresent(state));
|
|
110
|
-
this.renderer.setProperty(elem, 'checked', isPresent(state) ? state : false);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
/**
|
|
114
|
-
* @hidden
|
|
115
|
-
*/
|
|
116
|
-
stateToBool() {
|
|
117
|
-
switch (this.state) {
|
|
118
|
-
case 'checked':
|
|
119
|
-
return true;
|
|
120
|
-
case 'unchecked':
|
|
121
|
-
return false;
|
|
122
|
-
default:
|
|
123
|
-
return undefined;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectAllCheckboxDirective, deps: [{ token: i1.SelectionService }, { token: i2.CellSelectionService }, { token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i3.CheckBoxComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
127
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: SelectAllCheckboxDirective, isStandalone: true, selector: "[kendoGridSelectAllCheckbox]", inputs: { state: "state" }, outputs: { selectAllChange: "selectAllChange" }, usesOnChanges: true, ngImport: i0 });
|
|
128
|
-
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectAllCheckboxDirective, decorators: [{
|
|
130
|
-
type: Directive,
|
|
131
|
-
args: [{
|
|
132
|
-
selector: '[kendoGridSelectAllCheckbox]',
|
|
133
|
-
standalone: true
|
|
134
|
-
}]
|
|
135
|
-
}], ctorParameters: () => [{ type: i1.SelectionService }, { type: i2.CellSelectionService }, { type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i3.CheckBoxComponent, decorators: [{
|
|
136
|
-
type: Host
|
|
137
|
-
}, {
|
|
138
|
-
type: Optional
|
|
139
|
-
}] }], propDecorators: { state: [{
|
|
140
|
-
type: Input
|
|
141
|
-
}], selectAllChange: [{
|
|
142
|
-
type: Output
|
|
143
|
-
}] } });
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
/**-----------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
3
|
-
* Licensed under commercial license. See LICENSE.md in the project root for more information
|
|
4
|
-
*-------------------------------------------------------------------------------------------*/
|
|
5
|
-
import { Directive, ElementRef, Input, Renderer2, NgZone, Host, Optional } from '@angular/core';
|
|
6
|
-
import { SelectionService } from './selection.service';
|
|
7
|
-
import { Keys } from '@progress/kendo-angular-common';
|
|
8
|
-
import { CellSelectionAggregateService } from '../aggregates/selection-aggregate.service';
|
|
9
|
-
import { CellSelectionService } from './cell-selection.service';
|
|
10
|
-
import { CheckBoxComponent } from '@progress/kendo-angular-inputs';
|
|
11
|
-
import * as i0 from "@angular/core";
|
|
12
|
-
import * as i1 from "./selection.service";
|
|
13
|
-
import * as i2 from "./cell-selection.service";
|
|
14
|
-
import * as i3 from "../aggregates/selection-aggregate.service";
|
|
15
|
-
import * as i4 from "@progress/kendo-angular-inputs";
|
|
16
|
-
/**
|
|
17
|
-
* Adds a row-selection checkbox to the Grid.
|
|
18
|
-
* Use this directive on a `<kendo-checkbox>` component or `<input type="checkbox">` element inside a cell template.
|
|
19
|
-
* When the user clicks the checkbox, the Grid triggers a [`selectionChange`](slug:api_grid_gridcomponent#toc-selectionChange) event.
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```html
|
|
23
|
-
* <kendo-grid>
|
|
24
|
-
* <kendo-grid-column>
|
|
25
|
-
* <ng-template kendoGridCellTemplate let-rowIndex="rowIndex">
|
|
26
|
-
* <input [kendoGridSelectionCheckbox]="rowIndex"/>
|
|
27
|
-
* <kendo-checkbox [kendoGridSelectionCheckbox]="rowIndex"></kendo-checkbox>
|
|
28
|
-
* </ng-template>
|
|
29
|
-
* </kendo-grid-column>
|
|
30
|
-
* </kendo-grid>
|
|
31
|
-
* ```
|
|
32
|
-
* @remarks
|
|
33
|
-
* Applied to: {@link CheckBoxComponent}.
|
|
34
|
-
*/
|
|
35
|
-
export class SelectionCheckboxDirective {
|
|
36
|
-
selectionService;
|
|
37
|
-
cellSelectionService;
|
|
38
|
-
aggregateService;
|
|
39
|
-
el;
|
|
40
|
-
renderer;
|
|
41
|
-
ngZone;
|
|
42
|
-
checkbox;
|
|
43
|
-
/**
|
|
44
|
-
* Sets the index of the `dataItem` to select.
|
|
45
|
-
*/
|
|
46
|
-
itemIndex;
|
|
47
|
-
destroyClick;
|
|
48
|
-
destroyKeyDown;
|
|
49
|
-
ngAfterContentChecked() {
|
|
50
|
-
this.setCheckedState();
|
|
51
|
-
}
|
|
52
|
-
constructor(selectionService, cellSelectionService, aggregateService, el, renderer, ngZone, checkbox) {
|
|
53
|
-
this.selectionService = selectionService;
|
|
54
|
-
this.cellSelectionService = cellSelectionService;
|
|
55
|
-
this.aggregateService = aggregateService;
|
|
56
|
-
this.el = el;
|
|
57
|
-
this.renderer = renderer;
|
|
58
|
-
this.ngZone = ngZone;
|
|
59
|
-
this.checkbox = checkbox;
|
|
60
|
-
this.ngZone.runOutsideAngular(() => {
|
|
61
|
-
this.destroyClick = this.renderer.listen(this.el.nativeElement, 'click', this.onClick.bind(this));
|
|
62
|
-
this.destroyKeyDown = this.renderer.listen(this.el.nativeElement, 'keydown', this.onKeyDown.bind(this));
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
ngOnDestroy() {
|
|
66
|
-
if (this.destroyClick) {
|
|
67
|
-
this.destroyClick();
|
|
68
|
-
}
|
|
69
|
-
if (this.destroyKeyDown) {
|
|
70
|
-
this.destroyKeyDown();
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
onClick(event) {
|
|
74
|
-
const nonSelectableRow = this.selectionService.nonSelectableRows.has(this.itemIndex) || this.cellSelectionService.nonSelectableRows.has(this.itemIndex);
|
|
75
|
-
if (nonSelectableRow || this.cellSelectionService.active) {
|
|
76
|
-
event.preventDefault();
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (this.selectionService.options.enabled) {
|
|
80
|
-
this.ngZone.run(() => {
|
|
81
|
-
let ev;
|
|
82
|
-
const ctrlKey = event.ctrlKey || event.metaKey;
|
|
83
|
-
if (event.shiftKey && this.selectionService.options.mode === 'multiple') {
|
|
84
|
-
const item = { index: this.itemIndex };
|
|
85
|
-
ev = this.selectionService.addAllTo(item, ctrlKey, false, event.shiftKey);
|
|
86
|
-
}
|
|
87
|
-
else {
|
|
88
|
-
ev = this.selectionService.toggleByIndex(this.itemIndex);
|
|
89
|
-
}
|
|
90
|
-
ev.ctrlKey = event.ctrlKey;
|
|
91
|
-
ev.shiftKey = event.shiftKey;
|
|
92
|
-
if (this.selectionService.options.cellAggregates) {
|
|
93
|
-
ev.cellAggregates = this.aggregateService.onSelectionChange(ev);
|
|
94
|
-
}
|
|
95
|
-
this.selectionService.changes.emit(ev);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
onKeyDown(e) {
|
|
100
|
-
if (e.code === Keys.Enter || e.code === Keys.NumpadEnter) {
|
|
101
|
-
this.onClick(e);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
/*
|
|
105
|
-
* @hidden
|
|
106
|
-
*/
|
|
107
|
-
setCheckedState() {
|
|
108
|
-
const isSelected = this.selectionService.nonSelectableRows.has(this.itemIndex) ? false : this.selectionService.isSelected(this.itemIndex);
|
|
109
|
-
if (this.checkbox) {
|
|
110
|
-
this.checkbox.checkedState = isSelected;
|
|
111
|
-
}
|
|
112
|
-
else {
|
|
113
|
-
this.renderer.setProperty(this.el.nativeElement, 'checked', isSelected);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectionCheckboxDirective, deps: [{ token: i1.SelectionService }, { token: i2.CellSelectionService }, { token: i3.CellSelectionAggregateService }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i4.CheckBoxComponent, host: true, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
117
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: SelectionCheckboxDirective, isStandalone: true, selector: "[kendoGridSelectionCheckbox]", inputs: { itemIndex: ["kendoGridSelectionCheckbox", "itemIndex"] }, ngImport: i0 });
|
|
118
|
-
}
|
|
119
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectionCheckboxDirective, decorators: [{
|
|
120
|
-
type: Directive,
|
|
121
|
-
args: [{
|
|
122
|
-
selector: '[kendoGridSelectionCheckbox]',
|
|
123
|
-
standalone: true
|
|
124
|
-
}]
|
|
125
|
-
}], ctorParameters: () => [{ type: i1.SelectionService }, { type: i2.CellSelectionService }, { type: i3.CellSelectionAggregateService }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i4.CheckBoxComponent, decorators: [{
|
|
126
|
-
type: Host
|
|
127
|
-
}, {
|
|
128
|
-
type: Optional
|
|
129
|
-
}] }], propDecorators: { itemIndex: [{
|
|
130
|
-
type: Input,
|
|
131
|
-
args: ['kendoGridSelectionCheckbox']
|
|
132
|
-
}] } });
|