@progress/kendo-angular-dropdowns 7.1.0-dev.202208301349 → 7.2.0-dev.202209121509

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 (30) hide show
  1. package/autocomplete/autocomplete.component.d.ts +0 -1
  2. package/bundles/kendo-angular-dropdowns.umd.js +1 -1
  3. package/comboboxes/combobox.component.d.ts +0 -1
  4. package/common/data.service.d.ts +5 -0
  5. package/common/list.component.d.ts +4 -1
  6. package/common/navigation/navigation-action.d.ts +6 -1
  7. package/common/navigation/navigation.service.d.ts +5 -0
  8. package/common/searchbar.component.d.ts +17 -6
  9. package/common/selection/selection.service.d.ts +18 -4
  10. package/common/shared.module.d.ts +1 -1
  11. package/common/util.d.ts +4 -0
  12. package/dropdownlist/dropdownlist.component.d.ts +22 -10
  13. package/esm2015/autocomplete/autocomplete.component.js +12 -8
  14. package/esm2015/comboboxes/combobox.component.js +14 -8
  15. package/esm2015/comboboxes/multicolumncombobox.component.js +13 -3
  16. package/esm2015/common/data.service.js +11 -1
  17. package/esm2015/common/list.component.js +17 -2
  18. package/esm2015/common/navigation/navigation-action.js +5 -0
  19. package/esm2015/common/navigation/navigation.service.js +22 -0
  20. package/esm2015/common/searchbar.component.js +79 -19
  21. package/esm2015/common/selection/selectable.directive.js +2 -1
  22. package/esm2015/common/selection/selection.service.js +70 -7
  23. package/esm2015/common/shared.module.js +6 -6
  24. package/esm2015/common/util.js +4 -0
  25. package/esm2015/dropdownlist/dropdownlist.component.js +73 -42
  26. package/esm2015/multiselect/multiselect.component.js +160 -44
  27. package/esm2015/package-metadata.js +1 -1
  28. package/fesm2015/kendo-angular-dropdowns.js +595 -251
  29. package/multiselect/multiselect.component.d.ts +14 -4
  30. package/package.json +1 -1
@@ -24,4 +24,9 @@ export var NavigationAction;
24
24
  NavigationAction[NavigationAction["Right"] = 13] = "Right";
25
25
  NavigationAction[NavigationAction["PageDown"] = 14] = "PageDown";
26
26
  NavigationAction[NavigationAction["PageUp"] = 15] = "PageUp";
27
+ NavigationAction[NavigationAction["SelectPrevious"] = 16] = "SelectPrevious";
28
+ NavigationAction[NavigationAction["SelectNext"] = 17] = "SelectNext";
29
+ NavigationAction[NavigationAction["SelectAll"] = 18] = "SelectAll";
30
+ NavigationAction[NavigationAction["SelectAllToBeginning"] = 19] = "SelectAllToBeginning";
31
+ NavigationAction[NavigationAction["SelectAllToEnd"] = 20] = "SelectAllToEnd";
27
32
  })(NavigationAction || (NavigationAction = {}));
@@ -44,10 +44,17 @@ export class NavigationService {
44
44
  this.end = new EventEmitter();
45
45
  this.pagedown = new EventEmitter();
46
46
  this.pageup = new EventEmitter();
47
+ this.selectnext = new EventEmitter();
48
+ this.selectprevious = new EventEmitter();
49
+ this.selectall = new EventEmitter();
50
+ this.selectalltobeginning = new EventEmitter();
51
+ this.selectalltoend = new EventEmitter();
47
52
  }
48
53
  process(args) {
49
54
  const keyCode = args.originalEvent.keyCode;
50
55
  const altKey = args.originalEvent.altKey;
56
+ const shiftKey = args.originalEvent.shiftKey;
57
+ const ctrlKey = args.originalEvent.ctrlKey;
51
58
  let index;
52
59
  let action = NavigationAction.Undefined;
53
60
  if (altKey && keyCode === Keys.ArrowDown) {
@@ -56,6 +63,21 @@ export class NavigationService {
56
63
  else if (altKey && keyCode === Keys.ArrowUp) {
57
64
  action = NavigationAction.Close;
58
65
  }
66
+ else if (shiftKey && keyCode === Keys.ArrowUp) {
67
+ action = NavigationAction.SelectPrevious;
68
+ }
69
+ else if (shiftKey && keyCode === Keys.ArrowDown) {
70
+ action = NavigationAction.SelectNext;
71
+ }
72
+ else if (ctrlKey && keyCode === Keys.KeyA) {
73
+ action = NavigationAction.SelectAll;
74
+ }
75
+ else if (ctrlKey && shiftKey && keyCode === Keys.Home) {
76
+ action = NavigationAction.SelectAllToBeginning;
77
+ }
78
+ else if (ctrlKey && shiftKey && keyCode === Keys.End) {
79
+ action = NavigationAction.SelectAllToEnd;
80
+ }
59
81
  else if (keyCode === Keys.Enter) {
60
82
  action = NavigationAction.Enter;
61
83
  }
@@ -6,6 +6,8 @@ import { Component, Input, Output, EventEmitter, ViewChild, HostBinding } from '
6
6
  import { isDocumentAvailable } from '@progress/kendo-angular-common';
7
7
  import { Keys } from '@progress/kendo-angular-common';
8
8
  import { combineStr } from './util';
9
+ import { Subscription } from 'rxjs';
10
+ import { NgControl } from '@angular/forms';
9
11
  import * as i0 from "@angular/core";
10
12
  import * as i1 from "@progress/kendo-angular-l10n";
11
13
  import * as i2 from "@progress/kendo-angular-common";
@@ -13,8 +15,9 @@ import * as i2 from "@progress/kendo-angular-common";
13
15
  * @hidden
14
16
  */
15
17
  export class SearchBarComponent {
16
- constructor(localization, renderer) {
18
+ constructor(localization, renderer, injector) {
17
19
  this.localization = localization;
20
+ this.injector = injector;
18
21
  this.valueChange = new EventEmitter();
19
22
  this.onBlur = new EventEmitter();
20
23
  this.onFocus = new EventEmitter();
@@ -24,9 +27,30 @@ export class SearchBarComponent {
24
27
  this._userInput = "";
25
28
  this._previousValue = "";
26
29
  this._placeholder = "";
30
+ this._isSuggestable = false;
31
+ this._isFilterable = false;
32
+ this.subs = new Subscription();
27
33
  this.direction = localization.rtl ? 'rtl' : 'ltr';
28
34
  this.renderer = renderer;
29
35
  }
36
+ set isSuggestable(isSuggestable) {
37
+ this._isSuggestable = isSuggestable;
38
+ this.setAriaAutocomplete();
39
+ }
40
+ ;
41
+ get isSuggestable() {
42
+ return this._isSuggestable;
43
+ }
44
+ ;
45
+ set isFilterable(isFilterable) {
46
+ this._isFilterable = isFilterable;
47
+ this.setAriaAutocomplete();
48
+ }
49
+ ;
50
+ get isFilterable() {
51
+ return this._isFilterable;
52
+ }
53
+ ;
30
54
  get userInput() {
31
55
  return this._userInput;
32
56
  }
@@ -47,8 +71,19 @@ export class SearchBarComponent {
47
71
  return this.role === 'combobox' ? this.popupOpen : null;
48
72
  }
49
73
  ngOnInit() {
50
- this.localizationChangeSubscription = this.localization
51
- .changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr');
74
+ this.subs.add(this.localization
75
+ .changes.subscribe(({ rtl }) => this.direction = rtl ? 'rtl' : 'ltr'));
76
+ }
77
+ ngAfterContentChecked() {
78
+ var _a;
79
+ const formControl = (_a = this.injector.get(NgControl, null)) === null || _a === void 0 ? void 0 : _a.control;
80
+ this.control = formControl;
81
+ if (formControl) {
82
+ this.subs.add(formControl.valueChanges.subscribe(() => {
83
+ this.control = formControl;
84
+ }));
85
+ }
86
+ this.setAriaInvalid();
52
87
  }
53
88
  ngOnChanges(changes) {
54
89
  let previousUserInput;
@@ -80,9 +115,7 @@ export class SearchBarComponent {
80
115
  }
81
116
  }
82
117
  ngOnDestroy() {
83
- if (this.localizationChangeSubscription) {
84
- this.localizationChangeSubscription.unsubscribe();
85
- }
118
+ this.subs.unsubscribe();
86
119
  }
87
120
  writeInputValue(text) {
88
121
  if (isDocumentAvailable()) {
@@ -99,6 +132,33 @@ export class SearchBarComponent {
99
132
  }
100
133
  }
101
134
  }
135
+ setAriaInvalid() {
136
+ if (this.control) {
137
+ if (this.control.invalid) {
138
+ this.renderer.setAttribute(this.input.nativeElement, 'aria-invalid', 'true');
139
+ }
140
+ else {
141
+ this.renderer.setAttribute(this.input.nativeElement, 'aria-invalid', 'false');
142
+ }
143
+ }
144
+ else {
145
+ this.renderer.removeAttribute(this.input.nativeElement, 'aria-invalid');
146
+ }
147
+ }
148
+ setAriaAutocomplete() {
149
+ if (this.isFilterable) {
150
+ this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'list');
151
+ }
152
+ if (this.isSuggestable) {
153
+ this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'inline');
154
+ }
155
+ if (this.isFilterable && this.isSuggestable) {
156
+ this.renderer.setAttribute(this.input.nativeElement, 'aria-autocomplete', 'both');
157
+ }
158
+ if (!this.isFilterable && !this.isSuggestable) {
159
+ this.renderer.removeAttribute(this.input.nativeElement, 'aria-autocomplete');
160
+ }
161
+ }
102
162
  handleInput(event) {
103
163
  const value = event.target.value;
104
164
  if (value !== this.userInput) {
@@ -139,8 +199,8 @@ export class SearchBarComponent {
139
199
  this.renderer.setAttribute(input, 'size', size.toString());
140
200
  }
141
201
  }
142
- SearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SearchBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
143
- SearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SearchBarComponent, selector: "kendo-searchbar", inputs: { id: "id", listId: "listId", tagListId: "tagListId", activeDescendant: "activeDescendant", noDataLabel: "noDataLabel", disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", popupOpen: "popupOpen", role: "role", userInput: "userInput", suggestedText: "suggestedText", placeholder: "placeholder" }, outputs: { valueChange: "valueChange", onBlur: "onBlur", onFocus: "onFocus", onClick: "onClick", onNavigate: "onNavigate" }, host: { properties: { "class.k-searchbar": "this.searchBarClass" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
202
+ SearchBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SearchBarComponent, deps: [{ token: i1.LocalizationService }, { token: i0.Renderer2 }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Component });
203
+ SearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SearchBarComponent, selector: "kendo-searchbar", inputs: { id: "id", listId: "listId", tagListId: "tagListId", activeDescendant: "activeDescendant", disabled: "disabled", readonly: "readonly", tabIndex: "tabIndex", popupOpen: "popupOpen", role: "role", isLoading: "isLoading", isSuggestable: "isSuggestable", isFilterable: "isFilterable", userInput: "userInput", suggestedText: "suggestedText", placeholder: "placeholder" }, outputs: { valueChange: "valueChange", onBlur: "onBlur", onFocus: "onFocus", onClick: "onClick", onNavigate: "onNavigate" }, host: { properties: { "class.k-searchbar": "this.searchBarClass" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: `
144
204
  <input #input
145
205
  autocomplete="off"
146
206
  [id]="id"
@@ -158,14 +218,12 @@ SearchBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", ver
158
218
  [attr.tabIndex]="tabIndex"
159
219
  [attr.dir]="direction"
160
220
  [attr.role]="role"
161
- [attr.aria-disabled]="disabled"
162
- [attr.aria-readonly]="readonly"
163
221
  aria-haspopup="listbox"
164
222
  [attr.aria-expanded]="ariaExpanded"
165
- [attr.aria-owns]="listId"
223
+ [attr.aria-controls]="listId"
166
224
  [attr.aria-describedby]="tagListId"
167
225
  [attr.aria-activedescendant]="activeDescendant"
168
- [attr.aria-label]="noDataLabel"
226
+ [attr.aria-busy]="isLoading"
169
227
  />
170
228
  `, isInline: true, directives: [{ type: i2.EventsOutsideAngularDirective, selector: "[kendoEventsOutsideAngular]", inputs: ["kendoEventsOutsideAngular", "scope"] }] });
171
229
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SearchBarComponent, decorators: [{
@@ -190,18 +248,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
190
248
  [attr.tabIndex]="tabIndex"
191
249
  [attr.dir]="direction"
192
250
  [attr.role]="role"
193
- [attr.aria-disabled]="disabled"
194
- [attr.aria-readonly]="readonly"
195
251
  aria-haspopup="listbox"
196
252
  [attr.aria-expanded]="ariaExpanded"
197
- [attr.aria-owns]="listId"
253
+ [attr.aria-controls]="listId"
198
254
  [attr.aria-describedby]="tagListId"
199
255
  [attr.aria-activedescendant]="activeDescendant"
200
- [attr.aria-label]="noDataLabel"
256
+ [attr.aria-busy]="isLoading"
201
257
  />
202
258
  `
203
259
  }]
204
- }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.Renderer2 }]; }, propDecorators: { id: [{
260
+ }], ctorParameters: function () { return [{ type: i1.LocalizationService }, { type: i0.Renderer2 }, { type: i0.Injector }]; }, propDecorators: { id: [{
205
261
  type: Input
206
262
  }], listId: [{
207
263
  type: Input
@@ -209,8 +265,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
209
265
  type: Input
210
266
  }], activeDescendant: [{
211
267
  type: Input
212
- }], noDataLabel: [{
213
- type: Input
214
268
  }], disabled: [{
215
269
  type: Input
216
270
  }], readonly: [{
@@ -221,6 +275,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
221
275
  type: Input
222
276
  }], role: [{
223
277
  type: Input
278
+ }], isLoading: [{
279
+ type: Input
280
+ }], isSuggestable: [{
281
+ type: Input
282
+ }], isFilterable: [{
283
+ type: Input
224
284
  }], userInput: [{
225
285
  type: Input
226
286
  }], suggestedText: [{
@@ -24,12 +24,13 @@ export class SelectableDirective {
24
24
  }
25
25
  onClick(event) {
26
26
  event.stopPropagation();
27
+ this.selectionService.lastClickedIndex = this.index;
27
28
  if (this.checkboxes.enabled && !this.checkboxes.checkOnClick) {
28
29
  return;
29
30
  }
30
31
  if (this.multipleSelection) {
31
32
  if (this.selectionService.isSelected(this.index)) {
32
- this.selectionService.unselect(this.index);
33
+ this.selectionService.deselect(this.index);
33
34
  }
34
35
  else {
35
36
  this.selectionService.add(this.index);
@@ -5,16 +5,20 @@
5
5
  import { Injectable, EventEmitter } from '@angular/core';
6
6
  import { isPresent } from '../util';
7
7
  import * as i0 from "@angular/core";
8
+ import * as i1 from "../disabled-items/disabled-items.service";
8
9
  /**
9
10
  * @hidden
10
11
  */
11
12
  export class SelectionService {
12
- constructor() {
13
+ constructor(disabledItemsService) {
14
+ this.disabledItemsService = disabledItemsService;
13
15
  this.onSelect = new EventEmitter();
14
16
  this.onChange = new EventEmitter();
15
17
  this.onFocus = new EventEmitter();
16
18
  this.total = 0;
17
19
  this.selectedIndices = [];
20
+ this.indicesToBeRemoved = [];
21
+ this.indicesToBeAdded = [];
18
22
  }
19
23
  getTotal() {
20
24
  return this.total;
@@ -43,7 +47,7 @@ export class SelectionService {
43
47
  newSelection: isPresent(index)
44
48
  });
45
49
  }
46
- add(index) {
50
+ add(index, preventClosingPopup) {
47
51
  if (this.isSelected(index)) {
48
52
  return;
49
53
  }
@@ -51,20 +55,47 @@ export class SelectionService {
51
55
  this.focused = index;
52
56
  this.onChange.emit({
53
57
  added: index,
54
- indices: this.selectedIndices.slice()
58
+ indices: this.selectedIndices.slice(),
59
+ preventClosingPopup: preventClosingPopup
60
+ });
61
+ }
62
+ emitMultipleAddedRemoved() {
63
+ this.onChange.emit({
64
+ added: this.indicesToBeAdded,
65
+ removed: this.indicesToBeRemoved,
66
+ indices: this.selectedIndices.slice(),
67
+ preventClosingPopup: true,
68
+ isMultipleSelection: true
55
69
  });
70
+ this.indicesToBeAdded = [];
71
+ this.indicesToBeRemoved = [];
72
+ }
73
+ addMultiple(indices) {
74
+ this.indicesToBeAdded = indices.slice();
75
+ this.selectedIndices.push(...indices);
56
76
  }
57
- unselect(index) {
77
+ deselect(index, preventClosingPopup) {
58
78
  if (!this.isSelected(index)) {
59
79
  return;
60
80
  }
61
81
  const position = this.selectedIndices.indexOf(index);
62
82
  this.selectedIndices.splice(position, 1);
63
83
  this.focused = index;
84
+ if (this.selected.length === 0) {
85
+ this.lastClickedIndex = null;
86
+ }
64
87
  this.onChange.emit({
65
88
  indices: this.selectedIndices.slice(),
66
- removed: index
89
+ removed: index,
90
+ preventClosingPopup: preventClosingPopup
91
+ });
92
+ }
93
+ unselectMultiple(indices) {
94
+ indices.forEach((index) => {
95
+ const position = this.selectedIndices.indexOf(index);
96
+ this.selectedIndices.splice(position, 1);
67
97
  });
98
+ this.indicesToBeRemoved = indices.slice();
68
99
  }
69
100
  change(index) {
70
101
  const newSelection = isPresent(index) && !this.isSelected(index);
@@ -91,9 +122,41 @@ export class SelectionService {
91
122
  this.onFocus.emit(index);
92
123
  }
93
124
  }
125
+ selectFromTo(from, to) {
126
+ let addedIndices = [];
127
+ for (let i = from; i <= to; i++) {
128
+ if (!this.isSelected(i) && !this.disabledItemsService.isIndexDisabled(i)) {
129
+ addedIndices.push(i);
130
+ }
131
+ }
132
+ this.addMultiple(addedIndices);
133
+ }
134
+ unselectFromTo(from, to) {
135
+ let indicesToBeUnselected = [];
136
+ for (let i = from; i >= to; i--) {
137
+ if (this.isSelected(i) && !this.disabledItemsService.isIndexDisabled(i)) {
138
+ indicesToBeUnselected.push(i);
139
+ }
140
+ }
141
+ this.unselectMultiple(indicesToBeUnselected);
142
+ }
143
+ unselectNotNeededIndices(startOfSelection, endOfSelection, totalItems) {
144
+ let indicesToBeUnselected = [];
145
+ for (let i = 0; i < startOfSelection; i++) {
146
+ if (this.isSelected(i)) {
147
+ indicesToBeUnselected.push(i);
148
+ }
149
+ }
150
+ for (let i = endOfSelection + 1; i < totalItems; i++) {
151
+ if (this.isSelected(i)) {
152
+ indicesToBeUnselected.push(i);
153
+ }
154
+ }
155
+ this.unselectMultiple(indicesToBeUnselected);
156
+ }
94
157
  }
95
- SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SelectionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
158
+ SelectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SelectionService, deps: [{ token: i1.DisabledItemsService }], target: i0.ɵɵFactoryTarget.Injectable });
96
159
  SelectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SelectionService });
97
160
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SelectionService, decorators: [{
98
161
  type: Injectable
99
- }] });
162
+ }], ctorParameters: function () { return [{ type: i1.DisabledItemsService }]; } });
@@ -4,7 +4,7 @@
4
4
  *-------------------------------------------------------------------------------------------*/
5
5
  import { NgModule } from '@angular/core';
6
6
  import { CommonModule } from '@angular/common';
7
- import { FormsModule } from '@angular/forms';
7
+ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
8
8
  import { ListComponent } from './list.component';
9
9
  import { SearchBarComponent } from './searchbar.component';
10
10
  import { TagListComponent } from './taglist.component';
@@ -40,20 +40,20 @@ SharedModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "
40
40
  TemplateContextDirective,
41
41
  TagListComponent,
42
42
  CheckDirective,
43
- CheckAllDirective], imports: [CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule], exports: [ListComponent,
43
+ CheckAllDirective], imports: [CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule], exports: [ListComponent,
44
44
  ListItemDirective,
45
45
  SelectableDirective,
46
46
  SearchBarComponent,
47
47
  TemplateContextDirective,
48
48
  TagListComponent,
49
49
  CheckDirective,
50
- CheckAllDirective, CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule] });
51
- SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule], CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule] });
50
+ CheckAllDirective, CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule] });
51
+ SharedModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, imports: [[CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule], CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule] });
52
52
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SharedModule, decorators: [{
53
53
  type: NgModule,
54
54
  args: [{
55
55
  declarations: [INTERNAL_DIRECTIVES],
56
- exports: [INTERNAL_DIRECTIVES, CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule],
57
- imports: [CommonModule, FormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule]
56
+ exports: [INTERNAL_DIRECTIVES, CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule],
57
+ imports: [CommonModule, FormsModule, ReactiveFormsModule, PopupModule, ResizeSensorModule, SharedDirectivesModule, EventsModule]
58
58
  }]
59
59
  }] });
@@ -324,3 +324,7 @@ export const getFillModeClass = (component, fillMode) => {
324
324
  };
325
325
  return FILLMODE_CLASSES[fillMode];
326
326
  };
327
+ /**
328
+ * @hidden
329
+ */
330
+ export const filterAndMap = (arr, predicate, mapper) => arr.reduce((acc, curr) => predicate(curr) ? [...acc, mapper(curr)] : acc, []);