@progress/kendo-angular-dropdowns 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.
Files changed (84) hide show
  1. package/common/localization/messages.d.ts +1 -1
  2. package/dropdowntrees/checked-state/base-check.directive.d.ts +1 -1
  3. package/fesm2022/progress-kendo-angular-dropdowns.mjs +173 -173
  4. package/package.json +14 -22
  5. package/schematics/ngAdd/index.js +2 -2
  6. package/esm2022/autocomplete/autocomplete.component.mjs +0 -1687
  7. package/esm2022/autocomplete/autocomplete.module.mjs +0 -70
  8. package/esm2022/comboboxes/combobox-column/column-cell-template.directive.mjs +0 -42
  9. package/esm2022/comboboxes/combobox-column/column-header-template.directive.mjs +0 -40
  10. package/esm2022/comboboxes/combobox-column/combobox-column.component.mjs +0 -116
  11. package/esm2022/comboboxes/combobox-column/util.mjs +0 -60
  12. package/esm2022/comboboxes/combobox.component.mjs +0 -2149
  13. package/esm2022/comboboxes/combobox.module.mjs +0 -77
  14. package/esm2022/comboboxes/multicolumncombobox.component.mjs +0 -883
  15. package/esm2022/common/adaptive-renderer.component.mjs +0 -253
  16. package/esm2022/common/constants/error-messages.mjs +0 -61
  17. package/esm2022/common/data.service.mjs +0 -250
  18. package/esm2022/common/disabled-items/disabled-items.service.mjs +0 -47
  19. package/esm2022/common/disabled-items/item-disabled.mjs +0 -5
  20. package/esm2022/common/filter-input.directive.mjs +0 -39
  21. package/esm2022/common/filtering/filter-settings.mjs +0 -5
  22. package/esm2022/common/filtering/filter.directive.mjs +0 -136
  23. package/esm2022/common/filtering/filterable-component.mjs +0 -34
  24. package/esm2022/common/list-item.directive.mjs +0 -25
  25. package/esm2022/common/list.component.mjs +0 -968
  26. package/esm2022/common/localization/custom-messages.component.mjs +0 -96
  27. package/esm2022/common/localization/localized-messages.directive.mjs +0 -47
  28. package/esm2022/common/localization/messages.mjs +0 -77
  29. package/esm2022/common/models/checkboxes-settings.mjs +0 -15
  30. package/esm2022/common/models/direction.mjs +0 -5
  31. package/esm2022/common/models/fillmode.mjs +0 -5
  32. package/esm2022/common/models/list-type.mjs +0 -5
  33. package/esm2022/common/models/page-change-event.mjs +0 -5
  34. package/esm2022/common/models/popup-settings.mjs +0 -5
  35. package/esm2022/common/models/preventable-event.mjs +0 -25
  36. package/esm2022/common/models/remove-tag-event.mjs +0 -23
  37. package/esm2022/common/models/rounded.mjs +0 -5
  38. package/esm2022/common/models/size.mjs +0 -5
  39. package/esm2022/common/models/virtualization-settings.mjs +0 -24
  40. package/esm2022/common/navigation/navigation-action.mjs +0 -32
  41. package/esm2022/common/navigation/navigation.service.mjs +0 -188
  42. package/esm2022/common/searchbar.component.mjs +0 -386
  43. package/esm2022/common/selection/selectable.directive.mjs +0 -83
  44. package/esm2022/common/selection/selection.service.mjs +0 -166
  45. package/esm2022/common/shared-events.directive.mjs +0 -99
  46. package/esm2022/common/taglist.component.mjs +0 -295
  47. package/esm2022/common/templates/custom-item-template.directive.mjs +0 -48
  48. package/esm2022/common/templates/fixed-group-template.directive.mjs +0 -55
  49. package/esm2022/common/templates/footer-template.directive.mjs +0 -49
  50. package/esm2022/common/templates/group-tag-template.directive.mjs +0 -47
  51. package/esm2022/common/templates/group-template.directive.mjs +0 -55
  52. package/esm2022/common/templates/header-template.directive.mjs +0 -49
  53. package/esm2022/common/templates/item-template.directive.mjs +0 -48
  54. package/esm2022/common/templates/no-data-template.directive.mjs +0 -49
  55. package/esm2022/common/templates/tag-template.directive.mjs +0 -46
  56. package/esm2022/common/templates/value-template.directive.mjs +0 -50
  57. package/esm2022/common/util.mjs +0 -376
  58. package/esm2022/directives.mjs +0 -172
  59. package/esm2022/dropdownlist/dropdownlist.component.mjs +0 -1999
  60. package/esm2022/dropdownlist/dropdownlist.module.mjs +0 -79
  61. package/esm2022/dropdowns.module.mjs +0 -76
  62. package/esm2022/dropdowntrees/checked-state/base-check.directive.mjs +0 -76
  63. package/esm2022/dropdowntrees/checked-state/check-all.directive.mjs +0 -170
  64. package/esm2022/dropdowntrees/checked-state/check.directive.mjs +0 -168
  65. package/esm2022/dropdowntrees/checked-state/checkable-settings.mjs +0 -5
  66. package/esm2022/dropdowntrees/checked-state/checked-item.mjs +0 -5
  67. package/esm2022/dropdowntrees/data-binding/dropdowntree/flat-binding.directive.mjs +0 -69
  68. package/esm2022/dropdowntrees/data-binding/dropdowntree/hierarchy-binding.directive.mjs +0 -62
  69. package/esm2022/dropdowntrees/data-binding/multiselecttree/flat-binding.directive.mjs +0 -69
  70. package/esm2022/dropdowntrees/data-binding/multiselecttree/hierarchy-binding.directive.mjs +0 -62
  71. package/esm2022/dropdowntrees/dropdowntree.component.mjs +0 -1967
  72. package/esm2022/dropdowntrees/dropdowntrees.module.mjs +0 -79
  73. package/esm2022/dropdowntrees/expanded-state/expand.directive.mjs +0 -49
  74. package/esm2022/dropdowntrees/lookup/lookup.mjs +0 -5
  75. package/esm2022/dropdowntrees/lookup/lookup.service.mjs +0 -82
  76. package/esm2022/dropdowntrees/multiselecttree.component.mjs +0 -2359
  77. package/esm2022/dropdowntrees/summary-tag/summary-tag.directive.mjs +0 -70
  78. package/esm2022/dropdowntrees/templates/node-template.directive.mjs +0 -31
  79. package/esm2022/index.mjs +0 -55
  80. package/esm2022/multiselect/multiselect.component.mjs +0 -2380
  81. package/esm2022/multiselect/multiselect.module.mjs +0 -79
  82. package/esm2022/multiselect/summary-tag.directive.mjs +0 -68
  83. package/esm2022/package-metadata.mjs +0 -16
  84. package/esm2022/progress-kendo-angular-dropdowns.mjs +0 -8
@@ -1,386 +0,0 @@
1
- /**-----------------------------------------------------------------------------------------
2
- * Copyright © 2026 Progress Software Corporation. All rights reserved.
3
- * Licensed under commercial license. See LICENSE.md in the project root for more information
4
- *-------------------------------------------------------------------------------------------*/
5
- import { Component, Renderer2, Input, Output, EventEmitter, ElementRef, HostBinding, Injector, NgZone } from '@angular/core';
6
- import { isDocumentAvailable, isObjectPresent, isSafari, removeHTMLAttributes, setHTMLAttributes, Keys, parseAttributes, normalizeKeys } from '@progress/kendo-angular-common';
7
- import { combineStr, isJapanese } from './util';
8
- import { LocalizationService } from '@progress/kendo-angular-l10n';
9
- import { Subscription } from 'rxjs';
10
- import { NgControl } from '@angular/forms';
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@progress/kendo-angular-l10n";
13
- /**
14
- * @hidden
15
- */
16
- export class SearchBarComponent {
17
- localization;
18
- injector;
19
- input;
20
- ngZone;
21
- direction;
22
- tagListId;
23
- set readonly(readonly) {
24
- this._readonly = readonly;
25
- if (this._readonly) {
26
- this.renderer.setAttribute(this.input.nativeElement, 'readonly', '');
27
- }
28
- else {
29
- this.renderer.removeAttribute(this.input.nativeElement, 'readonly');
30
- }
31
- }
32
- get readonly() {
33
- return this._readonly;
34
- }
35
- set disabled(disabled) {
36
- this._disabled = disabled;
37
- if (this._disabled) {
38
- this.renderer.setAttribute(this.input.nativeElement, 'disabled', '');
39
- }
40
- else {
41
- this.renderer.removeAttribute(this.input.nativeElement, 'disabled');
42
- }
43
- }
44
- get disabled() {
45
- return this._disabled;
46
- }
47
- set isRequired(isRequired) {
48
- this._isRequired = isRequired;
49
- if (this._isRequired) {
50
- this.renderer.setAttribute(this.input.nativeElement, 'required', '');
51
- }
52
- else {
53
- this.renderer.removeAttribute(this.input.nativeElement, 'required');
54
- }
55
- }
56
- get isRequired() {
57
- return this._isRequired;
58
- }
59
- set isSuggestable(isSuggestable) {
60
- this._isSuggestable = isSuggestable;
61
- this.setAriaAutocomplete();
62
- }
63
- get isSuggestable() {
64
- return this._isSuggestable;
65
- }
66
- set isFilterable(isFilterable) {
67
- this._isFilterable = isFilterable;
68
- this.setAriaAutocomplete();
69
- }
70
- get isFilterable() {
71
- return this._isFilterable;
72
- }
73
- get userInput() {
74
- return this._userInput;
75
- }
76
- set userInput(userInput) {
77
- this._userInput = userInput || "";
78
- }
79
- /**
80
- * @hidden
81
- */
82
- get formControl() {
83
- const ngControl = this.injector.get(NgControl, null);
84
- return ngControl?.control || null;
85
- }
86
- suggestedText;
87
- /**
88
- * @hidden
89
- */
90
- set inputAttributes(attributes) {
91
- if (isObjectPresent(this.parsedAttributes)) {
92
- removeHTMLAttributes(this.parsedAttributes, this.renderer, this.input.nativeElement);
93
- }
94
- this._inputAttributes = attributes;
95
- this.parsedAttributes = this.inputAttributes ?
96
- parseAttributes(this.inputAttributes, this.defaultAttributes) :
97
- this.inputAttributes;
98
- this.setInputAttributes();
99
- }
100
- get inputAttributes() {
101
- return this._inputAttributes;
102
- }
103
- id;
104
- activeDescendant;
105
- tabIndex;
106
- isLoading;
107
- ariaControls;
108
- ariaExpanded = null;
109
- get attrAriaInvalid() {
110
- return this.formControl?.invalid ? true : null;
111
- }
112
- set placeholder(text) {
113
- this._placeholder = text || '';
114
- this.setInputSize();
115
- }
116
- get placeholder() {
117
- return this._placeholder;
118
- }
119
- role = 'combobox';
120
- get dir() {
121
- return this.direction;
122
- }
123
- valueChange = new EventEmitter();
124
- onBlur = new EventEmitter();
125
- onFocus = new EventEmitter();
126
- onClick = new EventEmitter();
127
- onNavigate = new EventEmitter();
128
- get value() {
129
- return this.input.nativeElement.value;
130
- }
131
- _isRequired;
132
- _readonly;
133
- _disabled;
134
- _userInput = "";
135
- _previousValue = "";
136
- _placeholder = "";
137
- _isSuggestable = false;
138
- _isFilterable = false;
139
- renderer;
140
- subs = new Subscription();
141
- _inputAttributes;
142
- parsedAttributes = {};
143
- get defaultAttributes() {
144
- return {
145
- id: this.id,
146
- disabled: this.disabled ? '' : null,
147
- readonly: this.readonly ? '' : null,
148
- placeholder: this.placeholder,
149
- tabIndex: this.tabIndex,
150
- tabindex: this.tabIndex,
151
- dir: this.direction,
152
- required: this.isRequired ? '' : null,
153
- 'aria-haspopup': 'listbox',
154
- 'aria-expanded': this.ariaExpanded,
155
- 'aria-controls': this.ariaControls,
156
- 'aria-activedescendant': this.activeDescendant,
157
- 'aria-busy': this.isLoading,
158
- 'aria-invalid': this.formControl?.invalid
159
- };
160
- }
161
- get mutableAttributes() {
162
- return {
163
- autocomplete: 'off',
164
- role: this.role,
165
- 'aria-describedby': this.tagListId
166
- };
167
- }
168
- constructor(localization, renderer, injector, input, ngZone) {
169
- this.localization = localization;
170
- this.injector = injector;
171
- this.input = input;
172
- this.ngZone = ngZone;
173
- this.direction = localization.rtl ? 'rtl' : 'ltr';
174
- this.renderer = renderer;
175
- this.renderer.addClass(this.input.nativeElement, 'k-input-inner');
176
- this.renderer.setAttribute(this.input.nativeElement, 'aria-haspopup', 'listbox');
177
- this.renderer.setAttribute(this.input.nativeElement, 'autocomplete', 'off');
178
- }
179
- ngOnInit() {
180
- this.subs.add(this.localization
181
- .changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
182
- }
183
- ngOnChanges(changes) {
184
- if (!isDocumentAvailable()) {
185
- return;
186
- }
187
- let previousUserInput;
188
- if (this.input && (changes.userInput || changes.suggestedText)) {
189
- if (changes.userInput && changes.userInput.previousValue) {
190
- if (this._previousValue === changes.userInput.previousValue) {
191
- previousUserInput = this._previousValue;
192
- }
193
- else {
194
- previousUserInput = changes.userInput.currentValue || "";
195
- }
196
- }
197
- else {
198
- previousUserInput = this._previousValue;
199
- }
200
- const caretStart = this.input.nativeElement.selectionStart;
201
- const caretAtEnd = previousUserInput.length === caretStart;
202
- this.writeInputValue(this.suggestedText ? combineStr(this.userInput, this.suggestedText) : this.userInput);
203
- if (this.suggestedText) {
204
- this.setInputSelection(this.userInput.length, this.suggestedText.length);
205
- }
206
- else if (isSafari(navigator.userAgent) && !caretAtEnd) {
207
- this.setInputSelection(caretStart, this.userInput.length);
208
- }
209
- else if (caretAtEnd) {
210
- this.setInputSelection(this.userInput.length, this.userInput.length);
211
- }
212
- else {
213
- this.setInputSelection(caretStart, caretStart);
214
- }
215
- this._previousValue = this.userInput;
216
- }
217
- }
218
- ngAfterViewInit() {
219
- this.subs.add(this.renderer.listen(this.input.nativeElement, 'input', (event) => this.handleInput(event)));
220
- this.subs.add(this.renderer.listen(this.input.nativeElement, 'focus', (event) => this.handleFocus(event)));
221
- this.subs.add(this.renderer.listen(this.input.nativeElement, 'blur', (event) => this.handleBlur(event)));
222
- this.subs.add(this.ngZone.runOutsideAngular(() => this.renderer.listen(this.input.nativeElement, 'keydown', (event) => this.handleKeydown(event))));
223
- }
224
- ngOnDestroy() {
225
- this.subs.unsubscribe();
226
- }
227
- writeInputValue(text) {
228
- if (isDocumentAvailable()) {
229
- this.renderer.setProperty(this.input.nativeElement, 'value', text);
230
- }
231
- }
232
- setInputSelection(start, end) {
233
- if (isDocumentAvailable() && this.input.nativeElement === document.activeElement) {
234
- try {
235
- this.input.nativeElement.setSelectionRange(start, end);
236
- }
237
- catch (_e) {
238
- //Make sure that the element is in the DOM before you invoke its methods
239
- }
240
- }
241
- }
242
- setAriaAutocomplete() {
243
- if (this.isFilterable) {
244
- this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'list');
245
- }
246
- if (this.isSuggestable) {
247
- this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'inline');
248
- }
249
- if (this.isFilterable && this.isSuggestable) {
250
- this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'both');
251
- }
252
- if (!this.isFilterable && !this.isSuggestable) {
253
- this.renderer.removeAttribute(this.input.nativeElement, 'aria-autocomplete');
254
- }
255
- }
256
- handleInput(event) {
257
- const target = event.target;
258
- const isBrowserSafari = isSafari(navigator.userAgent);
259
- const value = isBrowserSafari && isJapanese(target.value) ? event.data : target.value;
260
- if (value !== this.userInput) {
261
- this._previousValue = value;
262
- this.valueChange.emit(value);
263
- }
264
- }
265
- handleFocus(event) {
266
- this.onFocus.emit(event);
267
- }
268
- handleBlur(event) {
269
- this.onBlur.emit(event);
270
- }
271
- handleKeydown(event) {
272
- // on some keyboards arrow keys, PageUp/Down, and Home/End are mapped to Numpad keys
273
- const keyCode = normalizeKeys(event);
274
- const keys = [Keys.ArrowUp, Keys.ArrowDown, Keys.ArrowLeft, Keys.ArrowRight, Keys.Enter,
275
- Keys.Escape, Keys.Delete, Keys.Backspace, Keys.Home, Keys.End, Keys.PageDown, Keys.PageUp];
276
- if (keys.indexOf(keyCode) > -1) {
277
- this.ngZone.run(() => {
278
- this.onNavigate.emit(event);
279
- });
280
- }
281
- }
282
- focus() {
283
- if (isDocumentAvailable()) {
284
- this.input.nativeElement.focus();
285
- }
286
- }
287
- blur() {
288
- if (isDocumentAvailable()) {
289
- this.input.nativeElement.blur();
290
- }
291
- }
292
- setInputSize() {
293
- const lengthOf = x => x ? x.length : 0;
294
- const input = this.input.nativeElement;
295
- const placeholderLength = lengthOf(this.placeholder);
296
- const textLength = lengthOf(this.value);
297
- const size = Math.max(placeholderLength, textLength, 1);
298
- this.renderer.setAttribute(input, 'size', size.toString());
299
- }
300
- setInputAttributes() {
301
- const attributesToRender = Object.assign({}, this.mutableAttributes, this.parsedAttributes);
302
- setHTMLAttributes(attributesToRender, this.renderer, this.input.nativeElement, this.ngZone);
303
- }
304
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SearchBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.Injector }, { token: i0.ElementRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
305
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.14", type: SearchBarComponent, isStandalone: true, selector: "input[kendoSearchbar]", inputs: { tagListId: "tagListId", readonly: "readonly", disabled: "disabled", isRequired: "isRequired", isSuggestable: "isSuggestable", isFilterable: "isFilterable", userInput: "userInput", suggestedText: "suggestedText", inputAttributes: "inputAttributes", id: "id", activeDescendant: "activeDescendant", tabIndex: "tabIndex", isLoading: "isLoading", ariaControls: "ariaControls", ariaExpanded: "ariaExpanded", placeholder: "placeholder" }, outputs: { valueChange: "valueChange", onBlur: "onBlur", onFocus: "onFocus", onClick: "onClick", onNavigate: "onNavigate" }, host: { properties: { "attr.id": "this.id", "attr.aria-activedescendant": "this.activeDescendant", "attr.tabindex": "this.tabIndex", "attr.aria-busy": "this.isLoading", "attr.aria-controls": "this.ariaControls", "attr.aria-expanded": "this.ariaExpanded", "attr.aria-invalid": "this.attrAriaInvalid", "attr.placeholder": "this.placeholder", "attr.role": "this.role", "attr.dir": "this.dir" } }, usesOnChanges: true, ngImport: i0, template: ``, isInline: true });
306
- }
307
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SearchBarComponent, decorators: [{
308
- type: Component,
309
- args: [{
310
- selector: 'input[kendoSearchbar]',
311
- template: ``,
312
- standalone: true
313
- }]
314
- }], ctorParameters: () => [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.Injector }, { type: i0.ElementRef }, { type: i0.NgZone }], propDecorators: { tagListId: [{
315
- type: Input
316
- }], readonly: [{
317
- type: Input
318
- }], disabled: [{
319
- type: Input
320
- }], isRequired: [{
321
- type: Input
322
- }], isSuggestable: [{
323
- type: Input
324
- }], isFilterable: [{
325
- type: Input
326
- }], userInput: [{
327
- type: Input
328
- }], suggestedText: [{
329
- type: Input
330
- }], inputAttributes: [{
331
- type: Input
332
- }], id: [{
333
- type: HostBinding,
334
- args: ['attr.id']
335
- }, {
336
- type: Input
337
- }], activeDescendant: [{
338
- type: HostBinding,
339
- args: ['attr.aria-activedescendant']
340
- }, {
341
- type: Input
342
- }], tabIndex: [{
343
- type: HostBinding,
344
- args: ['attr.tabindex']
345
- }, {
346
- type: Input
347
- }], isLoading: [{
348
- type: HostBinding,
349
- args: ['attr.aria-busy']
350
- }, {
351
- type: Input
352
- }], ariaControls: [{
353
- type: HostBinding,
354
- args: ['attr.aria-controls']
355
- }, {
356
- type: Input
357
- }], ariaExpanded: [{
358
- type: HostBinding,
359
- args: ['attr.aria-expanded']
360
- }, {
361
- type: Input
362
- }], attrAriaInvalid: [{
363
- type: HostBinding,
364
- args: ['attr.aria-invalid']
365
- }], placeholder: [{
366
- type: HostBinding,
367
- args: ['attr.placeholder']
368
- }, {
369
- type: Input
370
- }], role: [{
371
- type: HostBinding,
372
- args: ['attr.role']
373
- }], dir: [{
374
- type: HostBinding,
375
- args: ['attr.dir']
376
- }], valueChange: [{
377
- type: Output
378
- }], onBlur: [{
379
- type: Output
380
- }], onFocus: [{
381
- type: Output
382
- }], onClick: [{
383
- type: Output
384
- }], onNavigate: [{
385
- type: Output
386
- }] } });
@@ -1,83 +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, HostBinding, HostListener } from '@angular/core';
6
- import { SelectionService } from './selection.service';
7
- import * as i0 from "@angular/core";
8
- import * as i1 from "./selection.service";
9
- /**
10
- * @hidden
11
- */
12
- export class SelectableDirective {
13
- index;
14
- checkboxes = { enabled: false };
15
- height;
16
- isMultiselect;
17
- multipleSelection = false;
18
- selectionService;
19
- constructor(selectionService) {
20
- this.selectionService = selectionService;
21
- }
22
- get focusedClassName() {
23
- return this.selectionService.isFocused(this.index);
24
- }
25
- get selectedClassName() {
26
- return !this.checkboxes.enabled && this.selectionService.isSelected(this.index);
27
- }
28
- onClick(event) {
29
- event.stopPropagation();
30
- this.selectionService.lastClickedIndex = this.index;
31
- if (this.checkboxes.enabled && !this.checkboxes.checkOnClick) {
32
- return;
33
- }
34
- if (this.multipleSelection) {
35
- if (this.selectionService.isSelected(this.index)) {
36
- this.selectionService.deselect(this.index);
37
- }
38
- else {
39
- this.selectionService.add(this.index);
40
- }
41
- }
42
- else {
43
- this.selectionService.change(this.index);
44
- }
45
- }
46
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectableDirective, deps: [{ token: i1.SelectionService }], target: i0.ɵɵFactoryTarget.Directive });
47
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: SelectableDirective, isStandalone: true, selector: "[kendoDropDownsSelectable]", inputs: { index: "index", checkboxes: "checkboxes", height: "height", isMultiselect: "isMultiselect", multipleSelection: "multipleSelection" }, host: { listeners: { "click": "onClick($event)" }, properties: { "attr.index": "this.index", "style.height.px": "this.height", "style.minHeight.px": "this.height", "class.k-focus": "this.focusedClassName", "class.k-selected": "this.selectedClassName" } }, ngImport: i0 });
48
- }
49
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectableDirective, decorators: [{
50
- type: Directive,
51
- args: [{
52
- selector: '[kendoDropDownsSelectable]',
53
- standalone: true
54
- }]
55
- }], ctorParameters: () => [{ type: i1.SelectionService }], propDecorators: { index: [{
56
- type: HostBinding,
57
- args: ['attr.index']
58
- }, {
59
- type: Input
60
- }], checkboxes: [{
61
- type: Input
62
- }], height: [{
63
- type: HostBinding,
64
- args: ['style.height.px']
65
- }, {
66
- type: HostBinding,
67
- args: ['style.minHeight.px']
68
- }, {
69
- type: Input
70
- }], isMultiselect: [{
71
- type: Input
72
- }], multipleSelection: [{
73
- type: Input
74
- }], focusedClassName: [{
75
- type: HostBinding,
76
- args: ['class.k-focus']
77
- }], selectedClassName: [{
78
- type: HostBinding,
79
- args: ['class.k-selected']
80
- }], onClick: [{
81
- type: HostListener,
82
- args: ['click', ['$event']]
83
- }] } });
@@ -1,166 +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 { DisabledItemsService } from '../disabled-items/disabled-items.service';
7
- import { isPresent } from '../util';
8
- import * as i0 from "@angular/core";
9
- import * as i1 from "../disabled-items/disabled-items.service";
10
- /**
11
- * @hidden
12
- */
13
- export class SelectionService {
14
- disabledItemsService;
15
- onSelect = new EventEmitter();
16
- onChange = new EventEmitter();
17
- onFocus = new EventEmitter();
18
- total = 0;
19
- lastClickedIndex;
20
- selectedIndices = [];
21
- focusedIndex;
22
- constructor(disabledItemsService) {
23
- this.disabledItemsService = disabledItemsService;
24
- }
25
- getTotal() {
26
- return this.total;
27
- }
28
- isSelected(index) {
29
- return isPresent(this.selectedIndices.find(current => current === index));
30
- }
31
- isFocused(index) {
32
- return index === this.focused;
33
- }
34
- focus(index) {
35
- if (this.isFocused(index)) {
36
- return;
37
- }
38
- this.focused = index;
39
- this.onFocus.emit(index);
40
- }
41
- select(index) {
42
- if (this.isSelected(index)) {
43
- return;
44
- }
45
- this.selectedIndices = [index];
46
- this.focused = index;
47
- this.onSelect.emit({
48
- indices: [index],
49
- newSelection: isPresent(index)
50
- });
51
- }
52
- add(index, preventClosingPopup) {
53
- if (this.isSelected(index)) {
54
- return;
55
- }
56
- this.selectedIndices.push(index);
57
- this.focused = index;
58
- this.onChange.emit({
59
- added: index,
60
- indices: this.selectedIndices.slice(),
61
- preventClosingPopup: preventClosingPopup
62
- });
63
- }
64
- indicesToBeRemoved = [];
65
- indicesToBeAdded = [];
66
- emitMultipleAddedRemoved() {
67
- this.onChange.emit({
68
- added: this.indicesToBeAdded,
69
- removed: this.indicesToBeRemoved,
70
- indices: this.selectedIndices.slice(),
71
- preventClosingPopup: true,
72
- isMultipleSelection: true
73
- });
74
- this.indicesToBeAdded = [];
75
- this.indicesToBeRemoved = [];
76
- }
77
- addMultiple(indices) {
78
- this.indicesToBeAdded = indices.slice();
79
- this.selectedIndices.push(...indices);
80
- }
81
- deselect(index, preventClosingPopup) {
82
- if (!this.isSelected(index)) {
83
- return;
84
- }
85
- const position = this.selectedIndices.indexOf(index);
86
- this.selectedIndices.splice(position, 1);
87
- this.focused = index;
88
- if (this.selected.length === 0) {
89
- this.lastClickedIndex = null;
90
- }
91
- this.onChange.emit({
92
- indices: this.selectedIndices.slice(),
93
- removed: index,
94
- preventClosingPopup: preventClosingPopup
95
- });
96
- }
97
- unselectMultiple(indices) {
98
- indices.forEach((index) => {
99
- const position = this.selectedIndices.indexOf(index);
100
- this.selectedIndices.splice(position, 1);
101
- });
102
- this.indicesToBeRemoved = indices.slice();
103
- }
104
- change(index) {
105
- const newSelection = isPresent(index) && !this.isSelected(index);
106
- this.selectedIndices = [index];
107
- this.focused = index;
108
- this.onChange.emit({
109
- indices: [index],
110
- newSelection: newSelection
111
- });
112
- }
113
- resetSelection(index) {
114
- this.selectedIndices = index instanceof Array ? index : [index];
115
- this.focused = this.selectedIndices[this.selectedIndices.length - 1];
116
- }
117
- get selected() {
118
- return this.selectedIndices.slice();
119
- }
120
- get focused() {
121
- return this.focusedIndex;
122
- }
123
- set focused(index) {
124
- if (this.focusedIndex !== index) {
125
- this.focusedIndex = index;
126
- this.onFocus.emit(index);
127
- }
128
- }
129
- selectFromTo(from, to) {
130
- const addedIndices = [];
131
- for (let i = from; i <= to; i++) {
132
- if (!this.isSelected(i) && !this.disabledItemsService.isIndexDisabled(i)) {
133
- addedIndices.push(i);
134
- }
135
- }
136
- this.addMultiple(addedIndices);
137
- }
138
- unselectFromTo(from, to) {
139
- const indicesToBeUnselected = [];
140
- for (let i = from; i >= to; i--) {
141
- if (this.isSelected(i) && !this.disabledItemsService.isIndexDisabled(i)) {
142
- indicesToBeUnselected.push(i);
143
- }
144
- }
145
- this.unselectMultiple(indicesToBeUnselected);
146
- }
147
- unselectNotNeededIndices(startOfSelection, endOfSelection, totalItems) {
148
- const indicesToBeUnselected = [];
149
- for (let i = 0; i < startOfSelection; i++) {
150
- if (this.isSelected(i)) {
151
- indicesToBeUnselected.push(i);
152
- }
153
- }
154
- for (let i = endOfSelection + 1; i < totalItems; i++) {
155
- if (this.isSelected(i)) {
156
- indicesToBeUnselected.push(i);
157
- }
158
- }
159
- this.unselectMultiple(indicesToBeUnselected);
160
- }
161
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectionService, deps: [{ token: i1.DisabledItemsService }], target: i0.ɵɵFactoryTarget.Injectable });
162
- static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectionService });
163
- }
164
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: SelectionService, decorators: [{
165
- type: Injectable
166
- }], ctorParameters: () => [{ type: i1.DisabledItemsService }] });