@stackline/angular-multiselect-dropdown 21.0.1 → 21.0.3

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.
@@ -1,14 +1,12 @@
1
1
  import * as i0 from '@angular/core';
2
- import { EventEmitter, HostListener, Output, Directive, Input, Pipe, TemplateRef, ContentChild, Component, forwardRef, ViewChild, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/forms';
2
+ import { EventEmitter, HostListener, Output, Directive, Input, Injectable, Pipe, TemplateRef, ContentChild, Component, ViewEncapsulation, PLATFORM_ID, ElementRef, ViewChild, Inject, Optional, NgModule, forwardRef } from '@angular/core';
3
+ import * as i3 from '@angular/forms';
4
4
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
5
- import * as i1 from '@angular/common';
6
- import { CommonModule } from '@angular/common';
5
+ import * as i2 from '@angular/common';
6
+ import { isPlatformServer, CommonModule } from '@angular/common';
7
+ import { Subject } from 'rxjs';
8
+ import { debounceTime, distinctUntilChanged, tap } from 'rxjs/operators';
7
9
 
8
- class ListItem {
9
- id;
10
- itemName;
11
- }
12
10
  class MyException {
13
11
  status;
14
12
  body;
@@ -33,20 +31,20 @@ class ClickOutsideDirective {
33
31
  this.clickOutside.emit(event);
34
32
  }
35
33
  }
36
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
37
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: ClickOutsideDirective, isStandalone: false, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "document:click": "onClick($event,$event.target)", "document:touchstart": "onClick($event,$event.target)" } }, ngImport: i0 });
34
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ClickOutsideDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
35
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: ClickOutsideDirective, isStandalone: false, selector: "[clickOutside]", outputs: { clickOutside: "clickOutside" }, host: { listeners: { "document:pointerdown": "onClick($event,$event.target)", "document:touchstart": "onClick($event,$event.target)" } }, ngImport: i0 });
38
36
  }
39
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ClickOutsideDirective, decorators: [{
37
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ClickOutsideDirective, decorators: [{
40
38
  type: Directive,
41
39
  args: [{
42
- standalone: false,
43
- selector: '[clickOutside]'
40
+ selector: '[clickOutside]',
41
+ standalone: false
44
42
  }]
45
43
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { clickOutside: [{
46
44
  type: Output
47
45
  }], onClick: [{
48
46
  type: HostListener,
49
- args: ['document:click', ['$event', '$event.target']]
47
+ args: ['document:pointerdown', ['$event', '$event.target']]
50
48
  }, {
51
49
  type: HostListener,
52
50
  args: ['document:touchstart', ['$event', '$event.target']]
@@ -60,14 +58,14 @@ class ScrollDirective {
60
58
  onClick(event) {
61
59
  this.scroll.emit(event);
62
60
  }
63
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
64
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: ScrollDirective, isStandalone: false, selector: "[scroll]", outputs: { scroll: "scroll" }, host: { listeners: { "scroll": "onClick($event)" } }, ngImport: i0 });
61
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
62
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: ScrollDirective, isStandalone: false, selector: "[scroll]", outputs: { scroll: "scroll" }, host: { listeners: { "scroll": "onClick($event)" } }, ngImport: i0 });
65
63
  }
66
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ScrollDirective, decorators: [{
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ScrollDirective, decorators: [{
67
65
  type: Directive,
68
66
  args: [{
69
- standalone: false,
70
- selector: '[scroll]'
67
+ selector: '[scroll]',
68
+ standalone: false
71
69
  }]
72
70
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { scroll: [{
73
71
  type: Output
@@ -87,120 +85,1453 @@ class styleDirective {
87
85
  ngOnChanges() {
88
86
  this.el.nativeElement.style.top = this.styleVal;
89
87
  }
90
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: styleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
91
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: styleDirective, isStandalone: false, selector: "[styleProp]", inputs: { styleVal: ["styleProp", "styleVal"] }, usesOnChanges: true, ngImport: i0 });
88
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: styleDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
89
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: styleDirective, isStandalone: false, selector: "[styleProp]", inputs: { styleVal: ["styleProp", "styleVal"] }, usesOnChanges: true, ngImport: i0 });
92
90
  }
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: styleDirective, decorators: [{
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: styleDirective, decorators: [{
94
92
  type: Directive,
95
93
  args: [{
96
- standalone: false,
97
- selector: '[styleProp]'
94
+ selector: '[styleProp]',
95
+ standalone: false
98
96
  }]
99
97
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { styleVal: [{
100
98
  type: Input,
101
99
  args: ['styleProp']
102
100
  }] } });
101
+ class setPosition {
102
+ el;
103
+ height;
104
+ constructor(el) {
105
+ this.el = el;
106
+ }
107
+ ngOnInit() {
108
+ if (this.height) {
109
+ this.el.nativeElement.style.bottom = parseInt(this.height + 15 + "") + 'px';
110
+ }
111
+ }
112
+ ngOnChanges() {
113
+ if (this.height) {
114
+ this.el.nativeElement.style.bottom = parseInt(this.height + 15 + "") + 'px';
115
+ }
116
+ }
117
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: setPosition, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
118
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.7", type: setPosition, isStandalone: false, selector: "[setPosition]", inputs: { height: ["setPosition", "height"] }, usesOnChanges: true, ngImport: i0 });
119
+ }
120
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: setPosition, decorators: [{
121
+ type: Directive,
122
+ args: [{
123
+ selector: '[setPosition]',
124
+ standalone: false
125
+ }]
126
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { height: [{
127
+ type: Input,
128
+ args: ['setPosition']
129
+ }] } });
130
+
131
+ class DataService {
132
+ filteredData = [];
133
+ subject = new Subject();
134
+ setData(data) {
135
+ this.filteredData = data;
136
+ this.subject.next(data);
137
+ }
138
+ getData() {
139
+ return this.subject.asObservable();
140
+ }
141
+ getFilteredData() {
142
+ if (this.filteredData && this.filteredData.length > 0) {
143
+ return this.filteredData;
144
+ }
145
+ else {
146
+ return [];
147
+ }
148
+ }
149
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: DataService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
150
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: DataService });
151
+ }
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: DataService, decorators: [{
153
+ type: Injectable
154
+ }] });
103
155
 
104
156
  class ListFilterPipe {
105
- transform(items, filter) {
106
- if (!items || !filter) {
157
+ ds;
158
+ filteredList = [];
159
+ constructor(ds) {
160
+ this.ds = ds;
161
+ }
162
+ transform(items, filter, searchBy) {
163
+ if (!items || !filter || filter == "") {
107
164
  return items;
108
165
  }
109
- return items.filter((item) => this.applyFilter(item, filter));
166
+ this.filteredList = items.filter((item) => this.applyFilter(item, filter, searchBy));
167
+ return this.filteredList;
110
168
  }
111
- applyFilter(item, filter) {
169
+ applyFilter(item, filter, searchBy) {
112
170
  let found = false;
113
- for (var prop in item) {
114
- if (filter) {
115
- if (item[prop].toString().toLowerCase().indexOf(filter.toLowerCase()) >= 0) {
116
- found = true;
171
+ if (searchBy.length > 0) {
172
+ if (item.grpTitle) {
173
+ found = true;
174
+ }
175
+ else {
176
+ for (var t = 0; t < searchBy.length; t++) {
177
+ if (filter && item[searchBy[t]] && item[searchBy[t]] != "") {
178
+ if (item[searchBy[t]].toString().toLowerCase().indexOf(filter.toLowerCase()) >= 0) {
179
+ found = true;
180
+ }
181
+ }
117
182
  }
118
183
  }
119
- else
184
+ }
185
+ else {
186
+ if (item.grpTitle) {
120
187
  found = true;
188
+ }
189
+ else {
190
+ for (var prop in item) {
191
+ if (filter && item[prop]) {
192
+ if (item[prop].toString().toLowerCase().indexOf(filter.toLowerCase()) >= 0) {
193
+ found = true;
194
+ }
195
+ }
196
+ }
197
+ }
121
198
  }
122
199
  return found;
123
200
  }
124
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ListFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
125
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: ListFilterPipe, isStandalone: false, name: "listFilter", pure: false });
201
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ListFilterPipe, deps: [{ token: DataService }], target: i0.ɵɵFactoryTarget.Pipe });
202
+ static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "21.2.7", ngImport: i0, type: ListFilterPipe, isStandalone: false, name: "listFilter" });
126
203
  }
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: ListFilterPipe, decorators: [{
204
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: ListFilterPipe, decorators: [{
128
205
  type: Pipe,
129
206
  args: [{
130
- standalone: false,
131
207
  name: 'listFilter',
132
- pure: false
208
+ pure: true,
209
+ standalone: false
133
210
  }]
134
- }] });
211
+ }], ctorParameters: () => [{ type: DataService }] });
135
212
 
136
213
  class Item {
137
214
  template;
138
215
  constructor() {
139
216
  }
140
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: Item, deps: [], target: i0.ɵɵFactoryTarget.Component });
141
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: Item, isStandalone: false, selector: "c-item", queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: ``, isInline: true });
217
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: Item, deps: [], target: i0.ɵɵFactoryTarget.Component });
218
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: Item, isStandalone: false, selector: "c-item", queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: ``, isInline: true });
142
219
  }
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: Item, decorators: [{
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: Item, decorators: [{
144
221
  type: Component,
145
222
  args: [{
146
- standalone: false,
147
223
  selector: 'c-item',
148
- template: ``
224
+ template: ``,
225
+ standalone: false
149
226
  }]
150
227
  }], ctorParameters: () => [], propDecorators: { template: [{
151
228
  type: ContentChild,
152
- args: [TemplateRef, { static: false }]
229
+ args: [TemplateRef, { static: true }]
153
230
  }] } });
154
231
  class Badge {
155
232
  template;
156
233
  constructor() {
157
234
  }
158
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: Badge, deps: [], target: i0.ɵɵFactoryTarget.Component });
159
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: Badge, isStandalone: false, selector: "c-badge", queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true }], ngImport: i0, template: ``, isInline: true });
235
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: Badge, deps: [], target: i0.ɵɵFactoryTarget.Component });
236
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: Badge, isStandalone: false, selector: "c-badge", queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: ``, isInline: true });
160
237
  }
161
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: Badge, decorators: [{
238
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: Badge, decorators: [{
162
239
  type: Component,
163
240
  args: [{
164
- standalone: false,
165
241
  selector: 'c-badge',
166
- template: ``
242
+ template: ``,
243
+ standalone: false
167
244
  }]
168
245
  }], ctorParameters: () => [], propDecorators: { template: [{
169
246
  type: ContentChild,
170
- args: [TemplateRef, { static: false }]
247
+ args: [TemplateRef, { static: true }]
248
+ }] } });
249
+ class Search {
250
+ template;
251
+ constructor() {
252
+ }
253
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: Search, deps: [], target: i0.ɵɵFactoryTarget.Component });
254
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: Search, isStandalone: false, selector: "c-search", queries: [{ propertyName: "template", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: ``, isInline: true });
255
+ }
256
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: Search, decorators: [{
257
+ type: Component,
258
+ args: [{
259
+ selector: 'c-search',
260
+ template: ``,
261
+ standalone: false
262
+ }]
263
+ }], ctorParameters: () => [], propDecorators: { template: [{
264
+ type: ContentChild,
265
+ args: [TemplateRef, { static: true }]
266
+ }] } });
267
+ class TemplateRenderer {
268
+ viewContainer;
269
+ data;
270
+ item;
271
+ view;
272
+ constructor(viewContainer) {
273
+ this.viewContainer = viewContainer;
274
+ }
275
+ ngOnInit() {
276
+ this.view = this.viewContainer.createEmbeddedView(this.data.template, {
277
+ '\$implicit': this.data,
278
+ 'item': this.item
279
+ });
280
+ }
281
+ ngOnDestroy() {
282
+ this.view.destroy();
283
+ }
284
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: TemplateRenderer, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
285
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: TemplateRenderer, isStandalone: false, selector: "c-templateRenderer", inputs: { data: "data", item: "item" }, ngImport: i0, template: ``, isInline: true });
286
+ }
287
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: TemplateRenderer, decorators: [{
288
+ type: Component,
289
+ args: [{
290
+ selector: 'c-templateRenderer',
291
+ template: ``,
292
+ standalone: false
293
+ }]
294
+ }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { data: [{
295
+ type: Input
296
+ }], item: [{
297
+ type: Input
298
+ }] } });
299
+ class CIcon {
300
+ name;
301
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CIcon, deps: [], target: i0.ɵɵFactoryTarget.Component });
302
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: CIcon, isStandalone: false, selector: "c-icon", inputs: { name: "name" }, ngImport: i0, template: `<svg *ngIf="name == 'remove'" width="100%" height="100%" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
303
+ viewBox="0 0 47.971 47.971" style="enable-background:new 0 0 47.971 47.971;" xml:space="preserve">
304
+ <g>
305
+ <path d="M28.228,23.986L47.092,5.122c1.172-1.171,1.172-3.071,0-4.242c-1.172-1.172-3.07-1.172-4.242,0L23.986,19.744L5.121,0.88
306
+ c-1.172-1.172-3.07-1.172-4.242,0c-1.172,1.171-1.172,3.071,0,4.242l18.865,18.864L0.879,42.85c-1.172,1.171-1.172,3.071,0,4.242
307
+ C1.465,47.677,2.233,47.97,3,47.97s1.535-0.293,2.121-0.879l18.865-18.864L42.85,47.091c0.586,0.586,1.354,0.879,2.121,0.879
308
+ s1.535-0.293,2.121-0.879c1.172-1.171,1.172-3.071,0-4.242L28.228,23.986z"/>
309
+ </g>
310
+ </svg>
311
+ <svg *ngIf="name == 'angle-down'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
312
+ width="100%" height="100%" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">
313
+ <g>
314
+ <g id="_x31_0_34_">
315
+ <g>
316
+ <path d="M604.501,134.782c-9.999-10.05-26.222-10.05-36.221,0L306.014,422.558L43.721,134.782
317
+ c-9.999-10.05-26.223-10.05-36.222,0s-9.999,26.35,0,36.399l279.103,306.241c5.331,5.357,12.422,7.652,19.386,7.296
318
+ c6.988,0.356,14.055-1.939,19.386-7.296l279.128-306.268C614.5,161.106,614.5,144.832,604.501,134.782z"/>
319
+ </g>
320
+ </g>
321
+ </g>
322
+ </svg>
323
+ <svg *ngIf="name == 'angle-up'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
324
+ width="100%" height="100%" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">
325
+ <g>
326
+ <g id="_x39__30_">
327
+ <g>
328
+ <path d="M604.501,440.509L325.398,134.956c-5.331-5.357-12.423-7.627-19.386-7.27c-6.989-0.357-14.056,1.913-19.387,7.27
329
+ L7.499,440.509c-9.999,10.024-9.999,26.298,0,36.323s26.223,10.024,36.222,0l262.293-287.164L568.28,476.832
330
+ c9.999,10.024,26.222,10.024,36.221,0C614.5,466.809,614.5,450.534,604.501,440.509z"/>
331
+ </g>
332
+ </g>
333
+ </g>
334
+
335
+ </svg>
336
+ <svg *ngIf="name == 'search'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
337
+ width="100%" height="100%" viewBox="0 0 615.52 615.52" style="enable-background:new 0 0 615.52 615.52;"
338
+ xml:space="preserve">
339
+ <g>
340
+ <g>
341
+ <g id="Search__x28_and_thou_shall_find_x29_">
342
+ <g>
343
+ <path d="M602.531,549.736l-184.31-185.368c26.679-37.72,42.528-83.729,42.528-133.548C460.75,103.35,357.997,0,231.258,0
344
+ C104.518,0,1.765,103.35,1.765,230.82c0,127.47,102.753,230.82,229.493,230.82c49.53,0,95.271-15.944,132.78-42.777
345
+ l184.31,185.366c7.482,7.521,17.292,11.291,27.102,11.291c9.812,0,19.62-3.77,27.083-11.291
346
+ C617.496,589.188,617.496,564.777,602.531,549.736z M355.9,319.763l-15.042,21.273L319.7,356.174
347
+ c-26.083,18.658-56.667,28.526-88.442,28.526c-84.365,0-152.995-69.035-152.995-153.88c0-84.846,68.63-153.88,152.995-153.88
348
+ s152.996,69.034,152.996,153.88C384.271,262.769,374.462,293.526,355.9,319.763z"/>
349
+ </g>
350
+ </g>
351
+ </g>
352
+ </g>
353
+
354
+ </svg>
355
+ <svg *ngIf="name == 'clear'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
356
+ viewBox="0 0 51.976 51.976" style="enable-background:new 0 0 51.976 51.976;" xml:space="preserve">
357
+ <g>
358
+ <path d="M44.373,7.603c-10.137-10.137-26.632-10.138-36.77,0c-10.138,10.138-10.137,26.632,0,36.77s26.632,10.138,36.77,0
359
+ C54.51,34.235,54.51,17.74,44.373,7.603z M36.241,36.241c-0.781,0.781-2.047,0.781-2.828,0l-7.425-7.425l-7.778,7.778
360
+ c-0.781,0.781-2.047,0.781-2.828,0c-0.781-0.781-0.781-2.047,0-2.828l7.778-7.778l-7.425-7.425c-0.781-0.781-0.781-2.048,0-2.828
361
+ c0.781-0.781,2.047-0.781,2.828,0l7.425,7.425l7.071-7.071c0.781-0.781,2.047-0.781,2.828,0c0.781,0.781,0.781,2.047,0,2.828
362
+ l-7.071,7.071l7.425,7.425C37.022,34.194,37.022,35.46,36.241,36.241z"/>
363
+ </g>
364
+ </svg>`, isInline: true, dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
365
+ }
366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: CIcon, decorators: [{
367
+ type: Component,
368
+ args: [{
369
+ selector: 'c-icon',
370
+ standalone: false,
371
+ template: `<svg *ngIf="name == 'remove'" width="100%" height="100%" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
372
+ viewBox="0 0 47.971 47.971" style="enable-background:new 0 0 47.971 47.971;" xml:space="preserve">
373
+ <g>
374
+ <path d="M28.228,23.986L47.092,5.122c1.172-1.171,1.172-3.071,0-4.242c-1.172-1.172-3.07-1.172-4.242,0L23.986,19.744L5.121,0.88
375
+ c-1.172-1.172-3.07-1.172-4.242,0c-1.172,1.171-1.172,3.071,0,4.242l18.865,18.864L0.879,42.85c-1.172,1.171-1.172,3.071,0,4.242
376
+ C1.465,47.677,2.233,47.97,3,47.97s1.535-0.293,2.121-0.879l18.865-18.864L42.85,47.091c0.586,0.586,1.354,0.879,2.121,0.879
377
+ s1.535-0.293,2.121-0.879c1.172-1.171,1.172-3.071,0-4.242L28.228,23.986z"/>
378
+ </g>
379
+ </svg>
380
+ <svg *ngIf="name == 'angle-down'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
381
+ width="100%" height="100%" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">
382
+ <g>
383
+ <g id="_x31_0_34_">
384
+ <g>
385
+ <path d="M604.501,134.782c-9.999-10.05-26.222-10.05-36.221,0L306.014,422.558L43.721,134.782
386
+ c-9.999-10.05-26.223-10.05-36.222,0s-9.999,26.35,0,36.399l279.103,306.241c5.331,5.357,12.422,7.652,19.386,7.296
387
+ c6.988,0.356,14.055-1.939,19.386-7.296l279.128-306.268C614.5,161.106,614.5,144.832,604.501,134.782z"/>
388
+ </g>
389
+ </g>
390
+ </g>
391
+ </svg>
392
+ <svg *ngIf="name == 'angle-up'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
393
+ width="100%" height="100%" viewBox="0 0 612 612" style="enable-background:new 0 0 612 612;" xml:space="preserve">
394
+ <g>
395
+ <g id="_x39__30_">
396
+ <g>
397
+ <path d="M604.501,440.509L325.398,134.956c-5.331-5.357-12.423-7.627-19.386-7.27c-6.989-0.357-14.056,1.913-19.387,7.27
398
+ L7.499,440.509c-9.999,10.024-9.999,26.298,0,36.323s26.223,10.024,36.222,0l262.293-287.164L568.28,476.832
399
+ c9.999,10.024,26.222,10.024,36.221,0C614.5,466.809,614.5,450.534,604.501,440.509z"/>
400
+ </g>
401
+ </g>
402
+ </g>
403
+
404
+ </svg>
405
+ <svg *ngIf="name == 'search'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
406
+ width="100%" height="100%" viewBox="0 0 615.52 615.52" style="enable-background:new 0 0 615.52 615.52;"
407
+ xml:space="preserve">
408
+ <g>
409
+ <g>
410
+ <g id="Search__x28_and_thou_shall_find_x29_">
411
+ <g>
412
+ <path d="M602.531,549.736l-184.31-185.368c26.679-37.72,42.528-83.729,42.528-133.548C460.75,103.35,357.997,0,231.258,0
413
+ C104.518,0,1.765,103.35,1.765,230.82c0,127.47,102.753,230.82,229.493,230.82c49.53,0,95.271-15.944,132.78-42.777
414
+ l184.31,185.366c7.482,7.521,17.292,11.291,27.102,11.291c9.812,0,19.62-3.77,27.083-11.291
415
+ C617.496,589.188,617.496,564.777,602.531,549.736z M355.9,319.763l-15.042,21.273L319.7,356.174
416
+ c-26.083,18.658-56.667,28.526-88.442,28.526c-84.365,0-152.995-69.035-152.995-153.88c0-84.846,68.63-153.88,152.995-153.88
417
+ s152.996,69.034,152.996,153.88C384.271,262.769,374.462,293.526,355.9,319.763z"/>
418
+ </g>
419
+ </g>
420
+ </g>
421
+ </g>
422
+
423
+ </svg>
424
+ <svg *ngIf="name == 'clear'" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
425
+ viewBox="0 0 51.976 51.976" style="enable-background:new 0 0 51.976 51.976;" xml:space="preserve">
426
+ <g>
427
+ <path d="M44.373,7.603c-10.137-10.137-26.632-10.138-36.77,0c-10.138,10.138-10.137,26.632,0,36.77s26.632,10.138,36.77,0
428
+ C54.51,34.235,54.51,17.74,44.373,7.603z M36.241,36.241c-0.781,0.781-2.047,0.781-2.828,0l-7.425-7.425l-7.778,7.778
429
+ c-0.781,0.781-2.047,0.781-2.828,0c-0.781-0.781-0.781-2.047,0-2.828l7.778-7.778l-7.425-7.425c-0.781-0.781-0.781-2.048,0-2.828
430
+ c0.781-0.781,2.047-0.781,2.828,0l7.425,7.425l7.071-7.071c0.781-0.781,2.047-0.781,2.828,0c0.781,0.781,0.781,2.047,0,2.828
431
+ l-7.071,7.071l7.425,7.425C37.022,34.194,37.022,35.46,36.241,36.241z"/>
432
+ </g>
433
+ </svg>`,
434
+ encapsulation: ViewEncapsulation.None,
435
+ }]
436
+ }], propDecorators: { name: [{
437
+ type: Input
438
+ }] } });
439
+
440
+ function VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY() {
441
+ return {
442
+ scrollThrottlingTime: 0,
443
+ scrollDebounceTime: 0,
444
+ scrollAnimationTime: 750,
445
+ checkResizeInterval: 1000,
446
+ resizeBypassRefreshThreshold: 5,
447
+ modifyOverflowStyleOfParentScroll: true,
448
+ stripedTable: false
449
+ };
450
+ }
451
+ class VirtualScrollerComponent {
452
+ element;
453
+ renderer;
454
+ zone;
455
+ changeDetectorRef;
456
+ viewPortItems;
457
+ window = window;
458
+ get viewPortInfo() {
459
+ let pageInfo = this.previousViewPort || {};
460
+ return {
461
+ startIndex: pageInfo.startIndex || 0,
462
+ endIndex: pageInfo.endIndex || 0,
463
+ scrollStartPosition: pageInfo.scrollStartPosition || 0,
464
+ scrollEndPosition: pageInfo.scrollEndPosition || 0,
465
+ maxScrollPosition: pageInfo.maxScrollPosition || 0,
466
+ startIndexWithBuffer: pageInfo.startIndexWithBuffer || 0,
467
+ endIndexWithBuffer: pageInfo.endIndexWithBuffer || 0
468
+ };
469
+ }
470
+ executeRefreshOutsideAngularZone = false;
471
+ _enableUnequalChildrenSizes = false;
472
+ get enableUnequalChildrenSizes() {
473
+ return this._enableUnequalChildrenSizes;
474
+ }
475
+ set enableUnequalChildrenSizes(value) {
476
+ if (this._enableUnequalChildrenSizes === value) {
477
+ return;
478
+ }
479
+ this._enableUnequalChildrenSizes = value;
480
+ this.minMeasuredChildWidth = undefined;
481
+ this.minMeasuredChildHeight = undefined;
482
+ }
483
+ useMarginInsteadOfTranslate = false;
484
+ modifyOverflowStyleOfParentScroll;
485
+ stripedTable;
486
+ scrollbarWidth;
487
+ scrollbarHeight;
488
+ childWidth;
489
+ childHeight;
490
+ ssrChildWidth;
491
+ ssrChildHeight;
492
+ ssrViewportWidth = 1920;
493
+ ssrViewportHeight = 1080;
494
+ _bufferAmount = 0;
495
+ get bufferAmount() {
496
+ if (typeof (this._bufferAmount) === 'number' && this._bufferAmount >= 0) {
497
+ return this._bufferAmount;
498
+ }
499
+ else {
500
+ return this.enableUnequalChildrenSizes ? 5 : 0;
501
+ }
502
+ }
503
+ set bufferAmount(value) {
504
+ this._bufferAmount = value;
505
+ }
506
+ scrollAnimationTime;
507
+ resizeBypassRefreshThreshold;
508
+ _scrollThrottlingTime;
509
+ get scrollThrottlingTime() {
510
+ return this._scrollThrottlingTime;
511
+ }
512
+ set scrollThrottlingTime(value) {
513
+ this._scrollThrottlingTime = value;
514
+ this.updateOnScrollFunction();
515
+ }
516
+ _scrollDebounceTime;
517
+ get scrollDebounceTime() {
518
+ return this._scrollDebounceTime;
519
+ }
520
+ set scrollDebounceTime(value) {
521
+ this._scrollDebounceTime = value;
522
+ this.updateOnScrollFunction();
523
+ }
524
+ onScroll;
525
+ updateOnScrollFunction() {
526
+ if (this.scrollDebounceTime) {
527
+ this.onScroll = this.debounce(() => {
528
+ this.refresh_internal(false);
529
+ }, this.scrollDebounceTime);
530
+ }
531
+ else if (this.scrollThrottlingTime) {
532
+ this.onScroll = this.throttleTrailing(() => {
533
+ this.refresh_internal(false);
534
+ }, this.scrollThrottlingTime);
535
+ }
536
+ else {
537
+ this.onScroll = () => {
538
+ this.refresh_internal(false);
539
+ };
540
+ }
541
+ }
542
+ checkScrollElementResizedTimer;
543
+ _checkResizeInterval;
544
+ get checkResizeInterval() {
545
+ return this._checkResizeInterval;
546
+ }
547
+ set checkResizeInterval(value) {
548
+ if (this._checkResizeInterval === value) {
549
+ return;
550
+ }
551
+ this._checkResizeInterval = value;
552
+ this.addScrollEventHandlers();
553
+ }
554
+ _items = [];
555
+ get items() {
556
+ return this._items;
557
+ }
558
+ set items(value) {
559
+ if (value === this._items) {
560
+ return;
561
+ }
562
+ this._items = value || [];
563
+ this.refresh_internal(true);
564
+ }
565
+ compareItems = (item1, item2) => item1 === item2;
566
+ _horizontal;
567
+ get horizontal() {
568
+ return this._horizontal;
569
+ }
570
+ set horizontal(value) {
571
+ this._horizontal = value;
572
+ this.updateDirection();
573
+ }
574
+ revertParentOverscroll() {
575
+ const scrollElement = this.getScrollElement();
576
+ if (scrollElement && this.oldParentScrollOverflow) {
577
+ scrollElement.style['overflow-y'] = this.oldParentScrollOverflow.y;
578
+ scrollElement.style['overflow-x'] = this.oldParentScrollOverflow.x;
579
+ }
580
+ this.oldParentScrollOverflow = undefined;
581
+ }
582
+ oldParentScrollOverflow;
583
+ _parentScroll;
584
+ get parentScroll() {
585
+ return this._parentScroll;
586
+ }
587
+ set parentScroll(value) {
588
+ if (this._parentScroll === value) {
589
+ return;
590
+ }
591
+ this.revertParentOverscroll();
592
+ this._parentScroll = value;
593
+ this.addScrollEventHandlers();
594
+ const scrollElement = this.getScrollElement();
595
+ if (this.modifyOverflowStyleOfParentScroll && scrollElement !== this.element.nativeElement) {
596
+ this.oldParentScrollOverflow = { x: scrollElement.style['overflow-x'], y: scrollElement.style['overflow-y'] };
597
+ scrollElement.style['overflow-y'] = this.horizontal ? 'visible' : 'auto';
598
+ scrollElement.style['overflow-x'] = this.horizontal ? 'auto' : 'visible';
599
+ }
600
+ }
601
+ vsUpdate = new EventEmitter();
602
+ vsChange = new EventEmitter();
603
+ vsStart = new EventEmitter();
604
+ vsEnd = new EventEmitter();
605
+ contentElementRef;
606
+ invisiblePaddingElementRef;
607
+ headerElementRef;
608
+ containerElementRef;
609
+ ngOnInit() {
610
+ this.addScrollEventHandlers();
611
+ }
612
+ ngOnDestroy() {
613
+ this.removeScrollEventHandlers();
614
+ this.revertParentOverscroll();
615
+ }
616
+ ngOnChanges(changes) {
617
+ let indexLengthChanged = this.cachedItemsLength !== this.items.length;
618
+ this.cachedItemsLength = this.items.length;
619
+ const firstRun = !changes.items || !changes.items.previousValue || changes.items.previousValue.length === 0;
620
+ this.refresh_internal(indexLengthChanged || firstRun);
621
+ }
622
+ ngDoCheck() {
623
+ if (this.cachedItemsLength !== this.items.length) {
624
+ this.cachedItemsLength = this.items.length;
625
+ this.refresh_internal(true);
626
+ return;
627
+ }
628
+ if (this.previousViewPort && this.viewPortItems && this.viewPortItems.length > 0) {
629
+ let itemsArrayChanged = false;
630
+ for (let i = 0; i < this.viewPortItems.length; ++i) {
631
+ if (!this.compareItems(this.items[this.previousViewPort.startIndexWithBuffer + i], this.viewPortItems[i])) {
632
+ itemsArrayChanged = true;
633
+ break;
634
+ }
635
+ }
636
+ if (itemsArrayChanged) {
637
+ this.refresh_internal(true);
638
+ }
639
+ }
640
+ }
641
+ refresh() {
642
+ this.refresh_internal(true);
643
+ }
644
+ invalidateAllCachedMeasurements() {
645
+ this.wrapGroupDimensions = {
646
+ maxChildSizePerWrapGroup: [],
647
+ numberOfKnownWrapGroupChildSizes: 0,
648
+ sumOfKnownWrapGroupChildWidths: 0,
649
+ sumOfKnownWrapGroupChildHeights: 0
650
+ };
651
+ this.minMeasuredChildWidth = undefined;
652
+ this.minMeasuredChildHeight = undefined;
653
+ this.refresh_internal(false);
654
+ }
655
+ invalidateCachedMeasurementForItem(item) {
656
+ if (this.enableUnequalChildrenSizes) {
657
+ let index = this.items && this.items.indexOf(item);
658
+ if (index >= 0) {
659
+ this.invalidateCachedMeasurementAtIndex(index);
660
+ }
661
+ }
662
+ else {
663
+ this.minMeasuredChildWidth = undefined;
664
+ this.minMeasuredChildHeight = undefined;
665
+ }
666
+ this.refresh_internal(false);
667
+ }
668
+ invalidateCachedMeasurementAtIndex(index) {
669
+ if (this.enableUnequalChildrenSizes) {
670
+ let cachedMeasurement = this.wrapGroupDimensions.maxChildSizePerWrapGroup[index];
671
+ if (cachedMeasurement) {
672
+ this.wrapGroupDimensions.maxChildSizePerWrapGroup[index] = undefined;
673
+ --this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
674
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths -= cachedMeasurement.childWidth || 0;
675
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights -= cachedMeasurement.childHeight || 0;
676
+ }
677
+ }
678
+ else {
679
+ this.minMeasuredChildWidth = undefined;
680
+ this.minMeasuredChildHeight = undefined;
681
+ }
682
+ this.refresh_internal(false);
683
+ }
684
+ scrollInto(item, alignToBeginning = true, additionalOffset = 0, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
685
+ let index = this.items.indexOf(item);
686
+ if (index === -1) {
687
+ return;
688
+ }
689
+ this.scrollToIndex(index, alignToBeginning, additionalOffset, animationMilliseconds, animationCompletedCallback);
690
+ }
691
+ scrollToIndex(index, alignToBeginning = true, additionalOffset = 0, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
692
+ let maxRetries = 5;
693
+ let retryIfNeeded = () => {
694
+ --maxRetries;
695
+ if (maxRetries <= 0) {
696
+ if (animationCompletedCallback) {
697
+ animationCompletedCallback();
698
+ }
699
+ return;
700
+ }
701
+ let dimensions = this.calculateDimensions();
702
+ let desiredStartIndex = Math.min(Math.max(index, 0), dimensions.itemCount - 1);
703
+ if (this.previousViewPort.startIndex === desiredStartIndex) {
704
+ if (animationCompletedCallback) {
705
+ animationCompletedCallback();
706
+ }
707
+ return;
708
+ }
709
+ this.scrollToIndex_internal(index, alignToBeginning, additionalOffset, 0, retryIfNeeded);
710
+ };
711
+ this.scrollToIndex_internal(index, alignToBeginning, additionalOffset, animationMilliseconds, retryIfNeeded);
712
+ }
713
+ scrollToIndex_internal(index, alignToBeginning = true, additionalOffset = 0, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
714
+ animationMilliseconds = animationMilliseconds === undefined ? this.scrollAnimationTime : animationMilliseconds;
715
+ let dimensions = this.calculateDimensions();
716
+ let scroll = this.calculatePadding(index, dimensions) + additionalOffset;
717
+ if (!alignToBeginning) {
718
+ scroll -= dimensions.wrapGroupsPerPage * dimensions[this._childScrollDim];
719
+ }
720
+ this.scrollToPosition(scroll, animationMilliseconds, animationCompletedCallback);
721
+ }
722
+ scrollToPosition(scrollPosition, animationMilliseconds = undefined, animationCompletedCallback = undefined) {
723
+ scrollPosition += this.getElementsOffset();
724
+ animationMilliseconds = animationMilliseconds === undefined ? this.scrollAnimationTime : animationMilliseconds;
725
+ let scrollElement = this.getScrollElement();
726
+ if (this.currentTween) {
727
+ this.currentTween.stop();
728
+ this.currentTween = undefined;
729
+ }
730
+ if (!animationMilliseconds) {
731
+ this.renderer.setProperty(scrollElement, this._scrollType, scrollPosition);
732
+ this.refresh_internal(false, animationCompletedCallback);
733
+ return;
734
+ }
735
+ const startPosition = Number(scrollElement[this._scrollType]) || 0;
736
+ const distance = scrollPosition - startPosition;
737
+ const duration = Math.max(0, animationMilliseconds);
738
+ let animationRequest = 0;
739
+ let startTime;
740
+ let stopped = false;
741
+ let completed = false;
742
+ const finish = () => {
743
+ if (completed) {
744
+ return;
745
+ }
746
+ completed = true;
747
+ this.renderer.setProperty(scrollElement, this._scrollType, scrollPosition);
748
+ this.refresh_internal(false, animationCompletedCallback);
749
+ if (this.currentTween && this.currentTween.stop === stopAnimation) {
750
+ this.currentTween = undefined;
751
+ }
752
+ };
753
+ const easeOutQuadratic = (progress) => progress * (2 - progress);
754
+ const getNow = () => typeof performance !== 'undefined' && performance.now
755
+ ? performance.now()
756
+ : Date.now();
757
+ const stopAnimation = () => {
758
+ stopped = true;
759
+ if (animationRequest) {
760
+ cancelAnimationFrame(animationRequest);
761
+ }
762
+ };
763
+ const animate = (time) => {
764
+ if (stopped) {
765
+ return;
766
+ }
767
+ const currentTime = typeof time === 'number' ? time : getNow();
768
+ startTime = startTime === undefined ? currentTime : startTime;
769
+ const progress = duration ? Math.min((currentTime - startTime) / duration, 1) : 1;
770
+ const nextPosition = startPosition + distance * easeOutQuadratic(progress);
771
+ if (!isNaN(nextPosition)) {
772
+ this.renderer.setProperty(scrollElement, this._scrollType, nextPosition);
773
+ this.refresh_internal(false);
774
+ }
775
+ if (progress >= 1) {
776
+ finish();
777
+ return;
778
+ }
779
+ this.zone.runOutsideAngular(() => animationRequest = requestAnimationFrame(animate));
780
+ };
781
+ this.currentTween = { stop: stopAnimation };
782
+ this.zone.runOutsideAngular(() => animationRequest = requestAnimationFrame(animate));
783
+ }
784
+ isAngularUniversalSSR;
785
+ constructor(element, renderer, zone, changeDetectorRef, platformId, options) {
786
+ this.element = element;
787
+ this.renderer = renderer;
788
+ this.zone = zone;
789
+ this.changeDetectorRef = changeDetectorRef;
790
+ this.isAngularUniversalSSR = isPlatformServer(platformId);
791
+ this.scrollThrottlingTime = options.scrollThrottlingTime;
792
+ this.scrollDebounceTime = options.scrollDebounceTime;
793
+ this.scrollAnimationTime = options.scrollAnimationTime;
794
+ this.scrollbarWidth = options.scrollbarWidth;
795
+ this.scrollbarHeight = options.scrollbarHeight;
796
+ this.checkResizeInterval = options.checkResizeInterval;
797
+ this.resizeBypassRefreshThreshold = options.resizeBypassRefreshThreshold;
798
+ this.modifyOverflowStyleOfParentScroll = options.modifyOverflowStyleOfParentScroll;
799
+ this.stripedTable = options.stripedTable;
800
+ this.horizontal = false;
801
+ this.resetWrapGroupDimensions();
802
+ }
803
+ getElementSize(element) {
804
+ let result = element.getBoundingClientRect();
805
+ let styles = getComputedStyle(element);
806
+ let marginTop = parseInt(styles['margin-top'], 10) || 0;
807
+ let marginBottom = parseInt(styles['margin-bottom'], 10) || 0;
808
+ let marginLeft = parseInt(styles['margin-left'], 10) || 0;
809
+ let marginRight = parseInt(styles['margin-right'], 10) || 0;
810
+ return {
811
+ top: result.top + marginTop,
812
+ bottom: result.bottom + marginBottom,
813
+ left: result.left + marginLeft,
814
+ right: result.right + marginRight,
815
+ width: result.width + marginLeft + marginRight,
816
+ height: result.height + marginTop + marginBottom,
817
+ y: result.top + marginTop,
818
+ x: result.left + marginLeft,
819
+ toJSON() {
820
+ result.toJSON();
821
+ }
822
+ };
823
+ }
824
+ previousScrollBoundingRect;
825
+ checkScrollElementResized() {
826
+ let boundingRect = this.getElementSize(this.getScrollElement());
827
+ let sizeChanged;
828
+ if (!this.previousScrollBoundingRect) {
829
+ sizeChanged = true;
830
+ }
831
+ else {
832
+ let widthChange = Math.abs(boundingRect.width - this.previousScrollBoundingRect.width);
833
+ let heightChange = Math.abs(boundingRect.height - this.previousScrollBoundingRect.height);
834
+ sizeChanged = widthChange > this.resizeBypassRefreshThreshold || heightChange > this.resizeBypassRefreshThreshold;
835
+ }
836
+ if (sizeChanged) {
837
+ this.previousScrollBoundingRect = boundingRect;
838
+ if (boundingRect.width > 0 && boundingRect.height > 0) {
839
+ this.refresh_internal(false);
840
+ }
841
+ }
842
+ }
843
+ _invisiblePaddingProperty;
844
+ _offsetType;
845
+ _scrollType;
846
+ _pageOffsetType;
847
+ _childScrollDim;
848
+ _translateDir;
849
+ _marginDir;
850
+ updateDirection() {
851
+ if (this.horizontal) {
852
+ this._invisiblePaddingProperty = 'width';
853
+ this._offsetType = 'offsetLeft';
854
+ this._pageOffsetType = 'pageXOffset';
855
+ this._childScrollDim = 'childWidth';
856
+ this._marginDir = 'margin-left';
857
+ this._translateDir = 'translateX';
858
+ this._scrollType = 'scrollLeft';
859
+ }
860
+ else {
861
+ this._invisiblePaddingProperty = 'height';
862
+ this._offsetType = 'offsetTop';
863
+ this._pageOffsetType = 'pageYOffset';
864
+ this._childScrollDim = 'childHeight';
865
+ this._marginDir = 'margin-top';
866
+ this._translateDir = 'translateY';
867
+ this._scrollType = 'scrollTop';
868
+ }
869
+ }
870
+ debounce(func, wait) {
871
+ const throttled = this.throttleTrailing(func, wait);
872
+ const result = function () {
873
+ throttled['cancel']();
874
+ throttled.apply(this, arguments);
875
+ };
876
+ result['cancel'] = function () {
877
+ throttled['cancel']();
878
+ };
879
+ return result;
880
+ }
881
+ throttleTrailing(func, wait) {
882
+ let timeout = undefined;
883
+ let _arguments = arguments;
884
+ const result = function () {
885
+ const _this = this;
886
+ _arguments = arguments;
887
+ if (timeout) {
888
+ return;
889
+ }
890
+ if (wait <= 0) {
891
+ func.apply(_this, _arguments);
892
+ }
893
+ else {
894
+ timeout = setTimeout(function () {
895
+ timeout = undefined;
896
+ func.apply(_this, _arguments);
897
+ }, wait);
898
+ }
899
+ };
900
+ result['cancel'] = function () {
901
+ if (timeout) {
902
+ clearTimeout(timeout);
903
+ timeout = undefined;
904
+ }
905
+ };
906
+ return result;
907
+ }
908
+ calculatedScrollbarWidth = 0;
909
+ calculatedScrollbarHeight = 0;
910
+ padding = 0;
911
+ previousViewPort = {};
912
+ currentTween;
913
+ cachedItemsLength;
914
+ disposeScrollHandler;
915
+ disposeResizeHandler;
916
+ refresh_internal(itemsArrayModified, refreshCompletedCallback = undefined, maxRunTimes = 2) {
917
+ //note: maxRunTimes is to force it to keep recalculating if the previous iteration caused a re-render (different sliced items in viewport or scrollPosition changed).
918
+ //The default of 2x max will probably be accurate enough without causing too large a performance bottleneck
919
+ //The code would typically quit out on the 2nd iteration anyways. The main time it'd think more than 2 runs would be necessary would be for vastly different sized child items or if this is the 1st time the items array was initialized.
920
+ //Without maxRunTimes, If the user is actively scrolling this code would become an infinite loop until they stopped scrolling. This would be okay, except each scroll event would start an additional infinte loop. We want to short-circuit it to prevent this.
921
+ if (itemsArrayModified && this.previousViewPort && this.previousViewPort.scrollStartPosition > 0) {
922
+ //if items were prepended, scroll forward to keep same items visible
923
+ let oldViewPort = this.previousViewPort;
924
+ let oldViewPortItems = this.viewPortItems;
925
+ let oldRefreshCompletedCallback = refreshCompletedCallback;
926
+ refreshCompletedCallback = () => {
927
+ let scrollLengthDelta = this.previousViewPort.scrollLength - oldViewPort.scrollLength;
928
+ if (scrollLengthDelta > 0 && this.viewPortItems) {
929
+ let oldStartItem = oldViewPortItems[0];
930
+ let oldStartItemIndex = this.items.findIndex(x => this.compareItems(oldStartItem, x));
931
+ if (oldStartItemIndex > this.previousViewPort.startIndexWithBuffer) {
932
+ let itemOrderChanged = false;
933
+ for (let i = 1; i < this.viewPortItems.length; ++i) {
934
+ if (!this.compareItems(this.items[oldStartItemIndex + i], oldViewPortItems[i])) {
935
+ itemOrderChanged = true;
936
+ break;
937
+ }
938
+ }
939
+ if (!itemOrderChanged) {
940
+ this.scrollToPosition(this.previousViewPort.scrollStartPosition + scrollLengthDelta, 0, oldRefreshCompletedCallback);
941
+ return;
942
+ }
943
+ }
944
+ }
945
+ if (oldRefreshCompletedCallback) {
946
+ oldRefreshCompletedCallback();
947
+ }
948
+ };
949
+ }
950
+ this.zone.runOutsideAngular(() => {
951
+ requestAnimationFrame(() => {
952
+ if (itemsArrayModified) {
953
+ this.resetWrapGroupDimensions();
954
+ }
955
+ let viewport = this.calculateViewport();
956
+ let startChanged = itemsArrayModified || viewport.startIndex !== this.previousViewPort.startIndex;
957
+ let endChanged = itemsArrayModified || viewport.endIndex !== this.previousViewPort.endIndex;
958
+ let scrollLengthChanged = viewport.scrollLength !== this.previousViewPort.scrollLength;
959
+ let paddingChanged = viewport.padding !== this.previousViewPort.padding;
960
+ let scrollPositionChanged = viewport.scrollStartPosition !== this.previousViewPort.scrollStartPosition || viewport.scrollEndPosition !== this.previousViewPort.scrollEndPosition || viewport.maxScrollPosition !== this.previousViewPort.maxScrollPosition;
961
+ this.previousViewPort = viewport;
962
+ if (scrollLengthChanged) {
963
+ this.renderer.setStyle(this.invisiblePaddingElementRef.nativeElement, this._invisiblePaddingProperty, `${viewport.scrollLength}px`);
964
+ }
965
+ if (paddingChanged) {
966
+ if (this.useMarginInsteadOfTranslate) {
967
+ this.renderer.setStyle(this.contentElementRef.nativeElement, this._marginDir, `${viewport.padding}px`);
968
+ }
969
+ else {
970
+ this.renderer.setStyle(this.contentElementRef.nativeElement, 'transform', `${this._translateDir}(${viewport.padding}px)`);
971
+ this.renderer.setStyle(this.contentElementRef.nativeElement, 'webkitTransform', `${this._translateDir}(${viewport.padding}px)`);
972
+ }
973
+ }
974
+ if (this.headerElementRef) {
975
+ let scrollPosition = this.getScrollElement()[this._scrollType];
976
+ let containerOffset = this.getElementsOffset();
977
+ let offset = Math.max(scrollPosition - viewport.padding - containerOffset + this.headerElementRef.nativeElement.clientHeight, 0);
978
+ this.renderer.setStyle(this.headerElementRef.nativeElement, 'transform', `${this._translateDir}(${offset}px)`);
979
+ this.renderer.setStyle(this.headerElementRef.nativeElement, 'webkitTransform', `${this._translateDir}(${offset}px)`);
980
+ }
981
+ const changeEventArg = (startChanged || endChanged) ? {
982
+ startIndex: viewport.startIndex,
983
+ endIndex: viewport.endIndex,
984
+ scrollStartPosition: viewport.scrollStartPosition,
985
+ scrollEndPosition: viewport.scrollEndPosition,
986
+ startIndexWithBuffer: viewport.startIndexWithBuffer,
987
+ endIndexWithBuffer: viewport.endIndexWithBuffer,
988
+ maxScrollPosition: viewport.maxScrollPosition
989
+ } : undefined;
990
+ if (startChanged || endChanged || scrollPositionChanged) {
991
+ const handleChanged = () => {
992
+ // update the scroll list to trigger re-render of components in viewport
993
+ this.viewPortItems = viewport.startIndexWithBuffer >= 0 && viewport.endIndexWithBuffer >= 0 ? this.items.slice(viewport.startIndexWithBuffer, viewport.endIndexWithBuffer + 1) : [];
994
+ this.vsUpdate.emit(this.viewPortItems);
995
+ if (startChanged) {
996
+ this.vsStart.emit(changeEventArg);
997
+ }
998
+ if (endChanged) {
999
+ this.vsEnd.emit(changeEventArg);
1000
+ }
1001
+ if (startChanged || endChanged) {
1002
+ this.changeDetectorRef.markForCheck();
1003
+ this.vsChange.emit(changeEventArg);
1004
+ }
1005
+ if (maxRunTimes > 0) {
1006
+ this.refresh_internal(false, refreshCompletedCallback, maxRunTimes - 1);
1007
+ return;
1008
+ }
1009
+ if (refreshCompletedCallback) {
1010
+ refreshCompletedCallback();
1011
+ }
1012
+ };
1013
+ if (this.executeRefreshOutsideAngularZone) {
1014
+ handleChanged();
1015
+ }
1016
+ else {
1017
+ this.zone.run(handleChanged);
1018
+ }
1019
+ }
1020
+ else {
1021
+ if (maxRunTimes > 0 && (scrollLengthChanged || paddingChanged)) {
1022
+ this.refresh_internal(false, refreshCompletedCallback, maxRunTimes - 1);
1023
+ return;
1024
+ }
1025
+ if (refreshCompletedCallback) {
1026
+ refreshCompletedCallback();
1027
+ }
1028
+ }
1029
+ });
1030
+ });
1031
+ }
1032
+ getScrollElement() {
1033
+ return this.parentScroll instanceof Window ? document.scrollingElement || document.documentElement || document.body : this.parentScroll || this.element.nativeElement;
1034
+ }
1035
+ addScrollEventHandlers() {
1036
+ if (this.isAngularUniversalSSR) {
1037
+ return;
1038
+ }
1039
+ let scrollElement = this.getScrollElement();
1040
+ this.removeScrollEventHandlers();
1041
+ this.zone.runOutsideAngular(() => {
1042
+ if (this.parentScroll instanceof Window) {
1043
+ this.disposeScrollHandler = this.renderer.listen('window', 'scroll', this.onScroll);
1044
+ this.disposeResizeHandler = this.renderer.listen('window', 'resize', this.onScroll);
1045
+ }
1046
+ else {
1047
+ this.disposeScrollHandler = this.renderer.listen(scrollElement, 'scroll', this.onScroll);
1048
+ if (this._checkResizeInterval > 0) {
1049
+ this.checkScrollElementResizedTimer = setInterval(() => { this.checkScrollElementResized(); }, this._checkResizeInterval);
1050
+ }
1051
+ }
1052
+ });
1053
+ }
1054
+ removeScrollEventHandlers() {
1055
+ if (this.checkScrollElementResizedTimer) {
1056
+ clearInterval(this.checkScrollElementResizedTimer);
1057
+ }
1058
+ if (this.disposeScrollHandler) {
1059
+ this.disposeScrollHandler();
1060
+ this.disposeScrollHandler = undefined;
1061
+ }
1062
+ if (this.disposeResizeHandler) {
1063
+ this.disposeResizeHandler();
1064
+ this.disposeResizeHandler = undefined;
1065
+ }
1066
+ }
1067
+ getElementsOffset() {
1068
+ if (this.isAngularUniversalSSR) {
1069
+ return 0;
1070
+ }
1071
+ let offset = 0;
1072
+ if (this.containerElementRef && this.containerElementRef.nativeElement) {
1073
+ offset += this.containerElementRef.nativeElement[this._offsetType];
1074
+ }
1075
+ if (this.parentScroll) {
1076
+ let scrollElement = this.getScrollElement();
1077
+ let elementClientRect = this.getElementSize(this.element.nativeElement);
1078
+ let scrollClientRect = this.getElementSize(scrollElement);
1079
+ if (this.horizontal) {
1080
+ offset += elementClientRect.left - scrollClientRect.left;
1081
+ }
1082
+ else {
1083
+ offset += elementClientRect.top - scrollClientRect.top;
1084
+ }
1085
+ if (!(this.parentScroll instanceof Window)) {
1086
+ offset += scrollElement[this._scrollType];
1087
+ }
1088
+ }
1089
+ return offset;
1090
+ }
1091
+ countItemsPerWrapGroup() {
1092
+ if (this.isAngularUniversalSSR) {
1093
+ return Math.round(this.horizontal ? this.ssrViewportHeight / this.ssrChildHeight : this.ssrViewportWidth / this.ssrChildWidth);
1094
+ }
1095
+ let propertyName = this.horizontal ? 'offsetLeft' : 'offsetTop';
1096
+ let children = ((this.containerElementRef && this.containerElementRef.nativeElement) || this.contentElementRef.nativeElement).children;
1097
+ let childrenLength = children ? children.length : 0;
1098
+ if (childrenLength === 0) {
1099
+ return 1;
1100
+ }
1101
+ let firstOffset = children[0][propertyName];
1102
+ let result = 1;
1103
+ while (result < childrenLength && firstOffset === children[result][propertyName]) {
1104
+ ++result;
1105
+ }
1106
+ return result;
1107
+ }
1108
+ getScrollStartPosition() {
1109
+ let windowScrollValue = undefined;
1110
+ if (this.parentScroll instanceof Window) {
1111
+ windowScrollValue = window[this._pageOffsetType];
1112
+ }
1113
+ return windowScrollValue || this.getScrollElement()[this._scrollType] || 0;
1114
+ }
1115
+ minMeasuredChildWidth;
1116
+ minMeasuredChildHeight;
1117
+ wrapGroupDimensions;
1118
+ resetWrapGroupDimensions() {
1119
+ const oldWrapGroupDimensions = this.wrapGroupDimensions;
1120
+ this.invalidateAllCachedMeasurements();
1121
+ if (!this.enableUnequalChildrenSizes || !oldWrapGroupDimensions || oldWrapGroupDimensions.numberOfKnownWrapGroupChildSizes === 0) {
1122
+ return;
1123
+ }
1124
+ const itemsPerWrapGroup = this.countItemsPerWrapGroup();
1125
+ for (let wrapGroupIndex = 0; wrapGroupIndex < oldWrapGroupDimensions.maxChildSizePerWrapGroup.length; ++wrapGroupIndex) {
1126
+ const oldWrapGroupDimension = oldWrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex];
1127
+ if (!oldWrapGroupDimension || !oldWrapGroupDimension.items || !oldWrapGroupDimension.items.length) {
1128
+ continue;
1129
+ }
1130
+ if (oldWrapGroupDimension.items.length !== itemsPerWrapGroup) {
1131
+ return;
1132
+ }
1133
+ let itemsChanged = false;
1134
+ let arrayStartIndex = itemsPerWrapGroup * wrapGroupIndex;
1135
+ for (let i = 0; i < itemsPerWrapGroup; ++i) {
1136
+ if (!this.compareItems(oldWrapGroupDimension.items[i], this.items[arrayStartIndex + i])) {
1137
+ itemsChanged = true;
1138
+ break;
1139
+ }
1140
+ }
1141
+ if (!itemsChanged) {
1142
+ ++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
1143
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths += oldWrapGroupDimension.childWidth || 0;
1144
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights += oldWrapGroupDimension.childHeight || 0;
1145
+ this.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex] = oldWrapGroupDimension;
1146
+ }
1147
+ }
1148
+ }
1149
+ calculateDimensions() {
1150
+ let scrollElement = this.getScrollElement();
1151
+ const maxCalculatedScrollBarSize = 25; // Note: Formula to auto-calculate doesn't work for ParentScroll, so we default to this if not set by consuming application
1152
+ this.calculatedScrollbarHeight = Math.max(Math.min(scrollElement.offsetHeight - scrollElement.clientHeight, maxCalculatedScrollBarSize), this.calculatedScrollbarHeight);
1153
+ this.calculatedScrollbarWidth = Math.max(Math.min(scrollElement.offsetWidth - scrollElement.clientWidth, maxCalculatedScrollBarSize), this.calculatedScrollbarWidth);
1154
+ let viewportWidth = scrollElement.offsetWidth - (this.scrollbarWidth || this.calculatedScrollbarWidth || (this.horizontal ? 0 : maxCalculatedScrollBarSize));
1155
+ let viewportHeight = scrollElement.offsetHeight - (this.scrollbarHeight || this.calculatedScrollbarHeight || (this.horizontal ? maxCalculatedScrollBarSize : 0));
1156
+ let content = (this.containerElementRef && this.containerElementRef.nativeElement) || this.contentElementRef.nativeElement;
1157
+ let itemsPerWrapGroup = this.countItemsPerWrapGroup();
1158
+ let wrapGroupsPerPage;
1159
+ let defaultChildWidth;
1160
+ let defaultChildHeight;
1161
+ if (this.isAngularUniversalSSR) {
1162
+ viewportWidth = this.ssrViewportWidth;
1163
+ viewportHeight = this.ssrViewportHeight;
1164
+ defaultChildWidth = this.ssrChildWidth;
1165
+ defaultChildHeight = this.ssrChildHeight;
1166
+ let itemsPerRow = Math.max(Math.ceil(viewportWidth / defaultChildWidth), 1);
1167
+ let itemsPerCol = Math.max(Math.ceil(viewportHeight / defaultChildHeight), 1);
1168
+ wrapGroupsPerPage = this.horizontal ? itemsPerRow : itemsPerCol;
1169
+ }
1170
+ else if (!this.enableUnequalChildrenSizes) {
1171
+ if (content.children.length > 0) {
1172
+ if (!this.childWidth || !this.childHeight) {
1173
+ if (!this.minMeasuredChildWidth && viewportWidth > 0) {
1174
+ this.minMeasuredChildWidth = viewportWidth;
1175
+ }
1176
+ if (!this.minMeasuredChildHeight && viewportHeight > 0) {
1177
+ this.minMeasuredChildHeight = viewportHeight;
1178
+ }
1179
+ }
1180
+ let child = content.children[0];
1181
+ let clientRect = this.getElementSize(child);
1182
+ this.minMeasuredChildWidth = Math.min(this.minMeasuredChildWidth, clientRect.width);
1183
+ this.minMeasuredChildHeight = Math.min(this.minMeasuredChildHeight, clientRect.height);
1184
+ }
1185
+ defaultChildWidth = this.childWidth || this.minMeasuredChildWidth || viewportWidth;
1186
+ defaultChildHeight = this.childHeight || this.minMeasuredChildHeight || viewportHeight;
1187
+ let itemsPerRow = Math.max(Math.ceil(viewportWidth / defaultChildWidth), 1);
1188
+ let itemsPerCol = Math.max(Math.ceil(viewportHeight / defaultChildHeight), 1);
1189
+ wrapGroupsPerPage = this.horizontal ? itemsPerRow : itemsPerCol;
1190
+ }
1191
+ else {
1192
+ let scrollOffset = scrollElement[this._scrollType] - (this.previousViewPort ? this.previousViewPort.padding : 0);
1193
+ let arrayStartIndex = this.previousViewPort.startIndexWithBuffer || 0;
1194
+ let wrapGroupIndex = Math.ceil(arrayStartIndex / itemsPerWrapGroup);
1195
+ let maxWidthForWrapGroup = 0;
1196
+ let maxHeightForWrapGroup = 0;
1197
+ let sumOfVisibleMaxWidths = 0;
1198
+ let sumOfVisibleMaxHeights = 0;
1199
+ wrapGroupsPerPage = 0;
1200
+ for (let i = 0; i < content.children.length; ++i) {
1201
+ ++arrayStartIndex;
1202
+ let child = content.children[i];
1203
+ let clientRect = this.getElementSize(child);
1204
+ maxWidthForWrapGroup = Math.max(maxWidthForWrapGroup, clientRect.width);
1205
+ maxHeightForWrapGroup = Math.max(maxHeightForWrapGroup, clientRect.height);
1206
+ if (arrayStartIndex % itemsPerWrapGroup === 0) {
1207
+ let oldValue = this.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex];
1208
+ if (oldValue) {
1209
+ --this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
1210
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths -= oldValue.childWidth || 0;
1211
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights -= oldValue.childHeight || 0;
1212
+ }
1213
+ ++this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
1214
+ const items = this.items.slice(arrayStartIndex - itemsPerWrapGroup, arrayStartIndex);
1215
+ this.wrapGroupDimensions.maxChildSizePerWrapGroup[wrapGroupIndex] = {
1216
+ childWidth: maxWidthForWrapGroup,
1217
+ childHeight: maxHeightForWrapGroup,
1218
+ items: items
1219
+ };
1220
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths += maxWidthForWrapGroup;
1221
+ this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights += maxHeightForWrapGroup;
1222
+ if (this.horizontal) {
1223
+ let maxVisibleWidthForWrapGroup = Math.min(maxWidthForWrapGroup, Math.max(viewportWidth - sumOfVisibleMaxWidths, 0));
1224
+ if (scrollOffset > 0) {
1225
+ let scrollOffsetToRemove = Math.min(scrollOffset, maxVisibleWidthForWrapGroup);
1226
+ maxVisibleWidthForWrapGroup -= scrollOffsetToRemove;
1227
+ scrollOffset -= scrollOffsetToRemove;
1228
+ }
1229
+ sumOfVisibleMaxWidths += maxVisibleWidthForWrapGroup;
1230
+ if (maxVisibleWidthForWrapGroup > 0 && viewportWidth >= sumOfVisibleMaxWidths) {
1231
+ ++wrapGroupsPerPage;
1232
+ }
1233
+ }
1234
+ else {
1235
+ let maxVisibleHeightForWrapGroup = Math.min(maxHeightForWrapGroup, Math.max(viewportHeight - sumOfVisibleMaxHeights, 0));
1236
+ if (scrollOffset > 0) {
1237
+ let scrollOffsetToRemove = Math.min(scrollOffset, maxVisibleHeightForWrapGroup);
1238
+ maxVisibleHeightForWrapGroup -= scrollOffsetToRemove;
1239
+ scrollOffset -= scrollOffsetToRemove;
1240
+ }
1241
+ sumOfVisibleMaxHeights += maxVisibleHeightForWrapGroup;
1242
+ if (maxVisibleHeightForWrapGroup > 0 && viewportHeight >= sumOfVisibleMaxHeights) {
1243
+ ++wrapGroupsPerPage;
1244
+ }
1245
+ }
1246
+ ++wrapGroupIndex;
1247
+ maxWidthForWrapGroup = 0;
1248
+ maxHeightForWrapGroup = 0;
1249
+ }
1250
+ }
1251
+ let averageChildWidth = this.wrapGroupDimensions.sumOfKnownWrapGroupChildWidths / this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
1252
+ let averageChildHeight = this.wrapGroupDimensions.sumOfKnownWrapGroupChildHeights / this.wrapGroupDimensions.numberOfKnownWrapGroupChildSizes;
1253
+ defaultChildWidth = this.childWidth || averageChildWidth || viewportWidth;
1254
+ defaultChildHeight = this.childHeight || averageChildHeight || viewportHeight;
1255
+ if (this.horizontal) {
1256
+ if (viewportWidth > sumOfVisibleMaxWidths) {
1257
+ wrapGroupsPerPage += Math.ceil((viewportWidth - sumOfVisibleMaxWidths) / defaultChildWidth);
1258
+ }
1259
+ }
1260
+ else {
1261
+ if (viewportHeight > sumOfVisibleMaxHeights) {
1262
+ wrapGroupsPerPage += Math.ceil((viewportHeight - sumOfVisibleMaxHeights) / defaultChildHeight);
1263
+ }
1264
+ }
1265
+ }
1266
+ let itemCount = this.items.length;
1267
+ let itemsPerPage = itemsPerWrapGroup * wrapGroupsPerPage;
1268
+ let pageCount_fractional = itemCount / itemsPerPage;
1269
+ let numberOfWrapGroups = Math.ceil(itemCount / itemsPerWrapGroup);
1270
+ let scrollLength = 0;
1271
+ let defaultScrollLengthPerWrapGroup = this.horizontal ? defaultChildWidth : defaultChildHeight;
1272
+ if (this.enableUnequalChildrenSizes) {
1273
+ let numUnknownChildSizes = 0;
1274
+ for (let i = 0; i < numberOfWrapGroups; ++i) {
1275
+ let childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];
1276
+ if (childSize) {
1277
+ scrollLength += childSize;
1278
+ }
1279
+ else {
1280
+ ++numUnknownChildSizes;
1281
+ }
1282
+ }
1283
+ scrollLength += Math.round(numUnknownChildSizes * defaultScrollLengthPerWrapGroup);
1284
+ }
1285
+ else {
1286
+ scrollLength = numberOfWrapGroups * defaultScrollLengthPerWrapGroup;
1287
+ }
1288
+ if (this.headerElementRef) {
1289
+ scrollLength += this.headerElementRef.nativeElement.clientHeight;
1290
+ }
1291
+ let viewportLength = this.horizontal ? viewportWidth : viewportHeight;
1292
+ let maxScrollPosition = Math.max(scrollLength - viewportLength, 0);
1293
+ return {
1294
+ itemCount: itemCount,
1295
+ itemsPerWrapGroup: itemsPerWrapGroup,
1296
+ wrapGroupsPerPage: wrapGroupsPerPage,
1297
+ itemsPerPage: itemsPerPage,
1298
+ pageCount_fractional: pageCount_fractional,
1299
+ childWidth: defaultChildWidth,
1300
+ childHeight: defaultChildHeight,
1301
+ scrollLength: scrollLength,
1302
+ viewportLength: viewportLength,
1303
+ maxScrollPosition: maxScrollPosition
1304
+ };
1305
+ }
1306
+ cachedPageSize = 0;
1307
+ previousScrollNumberElements = 0;
1308
+ calculatePadding(arrayStartIndexWithBuffer, dimensions) {
1309
+ if (dimensions.itemCount === 0) {
1310
+ return 0;
1311
+ }
1312
+ let defaultScrollLengthPerWrapGroup = dimensions[this._childScrollDim];
1313
+ let startingWrapGroupIndex = Math.floor(arrayStartIndexWithBuffer / dimensions.itemsPerWrapGroup) || 0;
1314
+ if (!this.enableUnequalChildrenSizes) {
1315
+ return defaultScrollLengthPerWrapGroup * startingWrapGroupIndex;
1316
+ }
1317
+ let numUnknownChildSizes = 0;
1318
+ let result = 0;
1319
+ for (let i = 0; i < startingWrapGroupIndex; ++i) {
1320
+ let childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];
1321
+ if (childSize) {
1322
+ result += childSize;
1323
+ }
1324
+ else {
1325
+ ++numUnknownChildSizes;
1326
+ }
1327
+ }
1328
+ result += Math.round(numUnknownChildSizes * defaultScrollLengthPerWrapGroup);
1329
+ return result;
1330
+ }
1331
+ calculatePageInfo(scrollPosition, dimensions) {
1332
+ let scrollPercentage = 0;
1333
+ if (this.enableUnequalChildrenSizes) {
1334
+ const numberOfWrapGroups = Math.ceil(dimensions.itemCount / dimensions.itemsPerWrapGroup);
1335
+ let totalScrolledLength = 0;
1336
+ let defaultScrollLengthPerWrapGroup = dimensions[this._childScrollDim];
1337
+ for (let i = 0; i < numberOfWrapGroups; ++i) {
1338
+ let childSize = this.wrapGroupDimensions.maxChildSizePerWrapGroup[i] && this.wrapGroupDimensions.maxChildSizePerWrapGroup[i][this._childScrollDim];
1339
+ if (childSize) {
1340
+ totalScrolledLength += childSize;
1341
+ }
1342
+ else {
1343
+ totalScrolledLength += defaultScrollLengthPerWrapGroup;
1344
+ }
1345
+ if (scrollPosition < totalScrolledLength) {
1346
+ scrollPercentage = i / numberOfWrapGroups;
1347
+ break;
1348
+ }
1349
+ }
1350
+ }
1351
+ else {
1352
+ scrollPercentage = scrollPosition / dimensions.scrollLength;
1353
+ }
1354
+ let startingArrayIndex_fractional = Math.min(Math.max(scrollPercentage * dimensions.pageCount_fractional, 0), dimensions.pageCount_fractional) * dimensions.itemsPerPage;
1355
+ let maxStart = dimensions.itemCount - dimensions.itemsPerPage - 1;
1356
+ let arrayStartIndex = Math.min(Math.floor(startingArrayIndex_fractional), maxStart);
1357
+ arrayStartIndex -= arrayStartIndex % dimensions.itemsPerWrapGroup; // round down to start of wrapGroup
1358
+ if (this.stripedTable) {
1359
+ let bufferBoundary = 2 * dimensions.itemsPerWrapGroup;
1360
+ if (arrayStartIndex % bufferBoundary !== 0) {
1361
+ arrayStartIndex = Math.max(arrayStartIndex - arrayStartIndex % bufferBoundary, 0);
1362
+ }
1363
+ }
1364
+ let arrayEndIndex = Math.ceil(startingArrayIndex_fractional) + dimensions.itemsPerPage - 1;
1365
+ let endIndexWithinWrapGroup = (arrayEndIndex + 1) % dimensions.itemsPerWrapGroup;
1366
+ if (endIndexWithinWrapGroup > 0) {
1367
+ arrayEndIndex += dimensions.itemsPerWrapGroup - endIndexWithinWrapGroup; // round up to end of wrapGroup
1368
+ }
1369
+ if (isNaN(arrayStartIndex)) {
1370
+ arrayStartIndex = 0;
1371
+ }
1372
+ if (isNaN(arrayEndIndex)) {
1373
+ arrayEndIndex = 0;
1374
+ }
1375
+ arrayStartIndex = Math.min(Math.max(arrayStartIndex, 0), dimensions.itemCount - 1);
1376
+ arrayEndIndex = Math.min(Math.max(arrayEndIndex, 0), dimensions.itemCount - 1);
1377
+ let bufferSize = this.bufferAmount * dimensions.itemsPerWrapGroup;
1378
+ let startIndexWithBuffer = Math.min(Math.max(arrayStartIndex - bufferSize, 0), dimensions.itemCount - 1);
1379
+ let endIndexWithBuffer = Math.min(Math.max(arrayEndIndex + bufferSize, 0), dimensions.itemCount - 1);
1380
+ return {
1381
+ startIndex: arrayStartIndex,
1382
+ endIndex: arrayEndIndex,
1383
+ startIndexWithBuffer: startIndexWithBuffer,
1384
+ endIndexWithBuffer: endIndexWithBuffer,
1385
+ scrollStartPosition: scrollPosition,
1386
+ scrollEndPosition: scrollPosition + dimensions.viewportLength,
1387
+ maxScrollPosition: dimensions.maxScrollPosition
1388
+ };
1389
+ }
1390
+ calculateViewport() {
1391
+ let dimensions = this.calculateDimensions();
1392
+ let offset = this.getElementsOffset();
1393
+ let scrollStartPosition = this.getScrollStartPosition();
1394
+ if (scrollStartPosition > (dimensions.scrollLength + offset) && !(this.parentScroll instanceof Window)) {
1395
+ scrollStartPosition = dimensions.scrollLength;
1396
+ }
1397
+ else {
1398
+ scrollStartPosition -= offset;
1399
+ }
1400
+ scrollStartPosition = Math.max(0, scrollStartPosition);
1401
+ let pageInfo = this.calculatePageInfo(scrollStartPosition, dimensions);
1402
+ let newPadding = this.calculatePadding(pageInfo.startIndexWithBuffer, dimensions);
1403
+ let newScrollLength = dimensions.scrollLength;
1404
+ return {
1405
+ startIndex: pageInfo.startIndex,
1406
+ endIndex: pageInfo.endIndex,
1407
+ startIndexWithBuffer: pageInfo.startIndexWithBuffer,
1408
+ endIndexWithBuffer: pageInfo.endIndexWithBuffer,
1409
+ padding: Math.round(newPadding),
1410
+ scrollLength: Math.round(newScrollLength),
1411
+ scrollStartPosition: pageInfo.scrollStartPosition,
1412
+ scrollEndPosition: pageInfo.scrollEndPosition,
1413
+ maxScrollPosition: pageInfo.maxScrollPosition
1414
+ };
1415
+ }
1416
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: VirtualScrollerComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.NgZone }, { token: i0.ChangeDetectorRef }, { token: PLATFORM_ID }, { token: 'virtual-scroller-default-options', optional: true }], target: i0.ɵɵFactoryTarget.Component });
1417
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: VirtualScrollerComponent, isStandalone: false, selector: "virtual-scroller,[virtualScroller]", inputs: { executeRefreshOutsideAngularZone: "executeRefreshOutsideAngularZone", enableUnequalChildrenSizes: "enableUnequalChildrenSizes", useMarginInsteadOfTranslate: "useMarginInsteadOfTranslate", modifyOverflowStyleOfParentScroll: "modifyOverflowStyleOfParentScroll", stripedTable: "stripedTable", scrollbarWidth: "scrollbarWidth", scrollbarHeight: "scrollbarHeight", childWidth: "childWidth", childHeight: "childHeight", ssrChildWidth: "ssrChildWidth", ssrChildHeight: "ssrChildHeight", ssrViewportWidth: "ssrViewportWidth", ssrViewportHeight: "ssrViewportHeight", bufferAmount: "bufferAmount", scrollAnimationTime: "scrollAnimationTime", resizeBypassRefreshThreshold: "resizeBypassRefreshThreshold", scrollThrottlingTime: "scrollThrottlingTime", scrollDebounceTime: "scrollDebounceTime", checkResizeInterval: "checkResizeInterval", items: "items", compareItems: "compareItems", horizontal: "horizontal", parentScroll: "parentScroll" }, outputs: { vsUpdate: "vsUpdate", vsChange: "vsChange", vsStart: "vsStart", vsEnd: "vsEnd" }, host: { properties: { "class.horizontal": "horizontal", "class.vertical": "!horizontal", "class.selfScroll": "!parentScroll" } }, queries: [{ propertyName: "headerElementRef", first: true, predicate: ["header"], descendants: true, read: ElementRef }, { propertyName: "containerElementRef", first: true, predicate: ["container"], descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "contentElementRef", first: true, predicate: ["content"], descendants: true, read: ElementRef }, { propertyName: "invisiblePaddingElementRef", first: true, predicate: ["invisiblePadding"], descendants: true, read: ElementRef }], exportAs: ["virtualScroller"], usesOnChanges: true, ngImport: i0, template: `
1418
+ <div class="total-padding" #invisiblePadding></div>
1419
+ <div class="scrollable-content" #content>
1420
+ <ng-content></ng-content>
1421
+ </div>
1422
+ `, isInline: true, styles: [":host{position:relative;display:block;-webkit-overflow-scrolling:touch}:host.horizontal.selfScroll{overflow-y:visible;overflow-x:auto}:host.vertical.selfScroll{overflow-y:auto;overflow-x:visible}.scrollable-content{top:0;left:0;width:100%;height:100%;max-width:100vw;max-height:100vh;position:absolute}.scrollable-content ::ng-deep>*{box-sizing:border-box}:host.horizontal{white-space:nowrap}:host.horizontal .scrollable-content{display:flex}:host.horizontal .scrollable-content ::ng-deep>*{flex-shrink:0;flex-grow:0;white-space:initial}.total-padding{width:1px;opacity:0}:host.horizontal .total-padding{height:100%}\n"] });
1423
+ }
1424
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: VirtualScrollerComponent, decorators: [{
1425
+ type: Component,
1426
+ args: [{ selector: 'virtual-scroller,[virtualScroller]', exportAs: 'virtualScroller', standalone: false, template: `
1427
+ <div class="total-padding" #invisiblePadding></div>
1428
+ <div class="scrollable-content" #content>
1429
+ <ng-content></ng-content>
1430
+ </div>
1431
+ `, host: {
1432
+ '[class.horizontal]': "horizontal",
1433
+ '[class.vertical]': "!horizontal",
1434
+ '[class.selfScroll]': "!parentScroll"
1435
+ }, styles: [":host{position:relative;display:block;-webkit-overflow-scrolling:touch}:host.horizontal.selfScroll{overflow-y:visible;overflow-x:auto}:host.vertical.selfScroll{overflow-y:auto;overflow-x:visible}.scrollable-content{top:0;left:0;width:100%;height:100%;max-width:100vw;max-height:100vh;position:absolute}.scrollable-content ::ng-deep>*{box-sizing:border-box}:host.horizontal{white-space:nowrap}:host.horizontal .scrollable-content{display:flex}:host.horizontal .scrollable-content ::ng-deep>*{flex-shrink:0;flex-grow:0;white-space:initial}.total-padding{width:1px;opacity:0}:host.horizontal .total-padding{height:100%}\n"] }]
1436
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.NgZone }, { type: i0.ChangeDetectorRef }, { type: Object, decorators: [{
1437
+ type: Inject,
1438
+ args: [PLATFORM_ID]
1439
+ }] }, { type: undefined, decorators: [{
1440
+ type: Optional
1441
+ }, {
1442
+ type: Inject,
1443
+ args: ['virtual-scroller-default-options']
1444
+ }] }], propDecorators: { executeRefreshOutsideAngularZone: [{
1445
+ type: Input
1446
+ }], enableUnequalChildrenSizes: [{
1447
+ type: Input
1448
+ }], useMarginInsteadOfTranslate: [{
1449
+ type: Input
1450
+ }], modifyOverflowStyleOfParentScroll: [{
1451
+ type: Input
1452
+ }], stripedTable: [{
1453
+ type: Input
1454
+ }], scrollbarWidth: [{
1455
+ type: Input
1456
+ }], scrollbarHeight: [{
1457
+ type: Input
1458
+ }], childWidth: [{
1459
+ type: Input
1460
+ }], childHeight: [{
1461
+ type: Input
1462
+ }], ssrChildWidth: [{
1463
+ type: Input
1464
+ }], ssrChildHeight: [{
1465
+ type: Input
1466
+ }], ssrViewportWidth: [{
1467
+ type: Input
1468
+ }], ssrViewportHeight: [{
1469
+ type: Input
1470
+ }], bufferAmount: [{
1471
+ type: Input
1472
+ }], scrollAnimationTime: [{
1473
+ type: Input
1474
+ }], resizeBypassRefreshThreshold: [{
1475
+ type: Input
1476
+ }], scrollThrottlingTime: [{
1477
+ type: Input
1478
+ }], scrollDebounceTime: [{
1479
+ type: Input
1480
+ }], checkResizeInterval: [{
1481
+ type: Input
1482
+ }], items: [{
1483
+ type: Input
1484
+ }], compareItems: [{
1485
+ type: Input
1486
+ }], horizontal: [{
1487
+ type: Input
1488
+ }], parentScroll: [{
1489
+ type: Input
1490
+ }], vsUpdate: [{
1491
+ type: Output
1492
+ }], vsChange: [{
1493
+ type: Output
1494
+ }], vsStart: [{
1495
+ type: Output
1496
+ }], vsEnd: [{
1497
+ type: Output
1498
+ }], contentElementRef: [{
1499
+ type: ViewChild,
1500
+ args: ['content', { read: ElementRef, static: false }]
1501
+ }], invisiblePaddingElementRef: [{
1502
+ type: ViewChild,
1503
+ args: ['invisiblePadding', { read: ElementRef, static: false }]
1504
+ }], headerElementRef: [{
1505
+ type: ContentChild,
1506
+ args: ['header', { read: ElementRef, static: false }]
1507
+ }], containerElementRef: [{
1508
+ type: ContentChild,
1509
+ args: ['container', { read: ElementRef, static: false }]
171
1510
  }] } });
172
- class TemplateRenderer {
173
- viewContainer;
174
- data;
175
- item;
176
- view;
177
- constructor(viewContainer) {
178
- this.viewContainer = viewContainer;
179
- }
180
- ngOnInit() {
181
- this.view = this.viewContainer.createEmbeddedView(this.data.template, {
182
- '\$implicit': this.data,
183
- 'item': this.item
184
- });
185
- }
186
- ngOnDestroy() {
187
- this.view.destroy();
188
- }
189
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TemplateRenderer, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component });
190
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: TemplateRenderer, isStandalone: false, selector: "c-templateRenderer", inputs: { data: "data", item: "item" }, ngImport: i0, template: ``, isInline: true });
1511
+ class VirtualScrollerModule {
1512
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: VirtualScrollerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1513
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.7", ngImport: i0, type: VirtualScrollerModule, declarations: [VirtualScrollerComponent], imports: [CommonModule], exports: [VirtualScrollerComponent] });
1514
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: VirtualScrollerModule, providers: [
1515
+ {
1516
+ provide: 'virtual-scroller-default-options',
1517
+ useFactory: VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY
1518
+ }
1519
+ ], imports: [CommonModule] });
191
1520
  }
192
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: TemplateRenderer, decorators: [{
193
- type: Component,
1521
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: VirtualScrollerModule, decorators: [{
1522
+ type: NgModule,
194
1523
  args: [{
195
- standalone: false,
196
- selector: 'c-templateRenderer',
197
- template: ``
1524
+ exports: [VirtualScrollerComponent],
1525
+ declarations: [VirtualScrollerComponent],
1526
+ imports: [CommonModule],
1527
+ providers: [
1528
+ {
1529
+ provide: 'virtual-scroller-default-options',
1530
+ useFactory: VIRTUAL_SCROLLER_DEFAULT_OPTIONS_FACTORY
1531
+ }
1532
+ ]
198
1533
  }]
199
- }], ctorParameters: () => [{ type: i0.ViewContainerRef }], propDecorators: { data: [{
200
- type: Input
201
- }], item: [{
202
- type: Input
203
- }] } });
1534
+ }] });
204
1535
 
205
1536
  const DROPDOWN_CONTROL_VALUE_ACCESSOR = {
206
1537
  provide: NG_VALUE_ACCESSOR,
@@ -216,26 +1547,59 @@ const noop = () => {
216
1547
  };
217
1548
  class AngularMultiSelect {
218
1549
  _elementRef;
1550
+ cdr;
1551
+ filterPipe;
219
1552
  data;
220
1553
  settings;
1554
+ loading;
221
1555
  onSelect = new EventEmitter();
222
1556
  onDeSelect = new EventEmitter();
223
1557
  onSelectAll = new EventEmitter();
224
1558
  onDeSelectAll = new EventEmitter();
225
1559
  onOpen = new EventEmitter();
226
1560
  onClose = new EventEmitter();
1561
+ onScrollToEnd = new EventEmitter();
1562
+ onFilterSelectAll = new EventEmitter();
1563
+ onFilterDeSelectAll = new EventEmitter();
1564
+ onAddFilterNewItem = new EventEmitter();
1565
+ onGroupSelect = new EventEmitter();
1566
+ onGroupDeSelect = new EventEmitter();
227
1567
  itemTempl;
228
1568
  badgeTempl;
1569
+ searchTempl;
229
1570
  searchInput;
1571
+ selectedListElem;
1572
+ dropdownListElem;
1573
+ stacklineDropdown;
1574
+ onEscapeDown(event) {
1575
+ if (this.settings.escapeToClose) {
1576
+ this.closeDropdown();
1577
+ }
1578
+ }
1579
+ onScroll(event) {
1580
+ if (this.isActive && this.settings.tagToBody) {
1581
+ this.closeDropdown();
1582
+ /* const elem = this.stacklineDropdown.nativeElement;
1583
+ if(this.settings.autoPosition){
1584
+ this.dropDownTop = elem.getBoundingClientRect().y + elem.clientHeight + 1;
1585
+ }
1586
+ this.dropDownLeft = elem.getBoundingClientRect().x; */
1587
+ }
1588
+ }
1589
+ virtualdata = [];
1590
+ searchTerm$ = new Subject();
230
1591
  selectedItems;
231
1592
  isActive = false;
232
1593
  isSelectAll = false;
1594
+ isFilterSelectAll = false;
1595
+ isInfiniteFilterSelectAll = false;
233
1596
  groupedData;
234
1597
  filter;
235
1598
  chunkArray;
236
1599
  scrollTop;
237
1600
  chunkIndex = [];
238
1601
  cachedItems = [];
1602
+ groupCachedItems = [];
239
1603
  totalRows;
240
1604
  itemHeight = 41.6;
241
1605
  screenItemsLen;
@@ -245,13 +1609,28 @@ class AngularMultiSelect {
245
1609
  maxBuffer;
246
1610
  lastScrolled;
247
1611
  lastRepaintY;
1612
+ selectedListHeight;
1613
+ filterLength = 0;
1614
+ infiniteFilterLength = 0;
1615
+ viewPortItems;
1616
+ item;
1617
+ dropdownListYOffset = 0;
1618
+ subscription;
1619
+ dropDownWidth = 0;
1620
+ dropDownTop = null;
1621
+ dropDownBottom = null;
1622
+ dropDownLeft = 0;
1623
+ id = Math.random().toString(36).substring(2);
248
1624
  defaultSettings = {
249
1625
  singleSelection: false,
250
1626
  text: 'Select',
251
1627
  enableCheckAll: true,
252
1628
  selectAllText: 'Select All',
253
1629
  unSelectAllText: 'UnSelect All',
1630
+ filterSelectAllText: 'Select all filtered results',
1631
+ filterUnSelectAllText: 'UnSelect all filtered results',
254
1632
  enableSearchFilter: false,
1633
+ searchBy: [],
255
1634
  maxHeight: 300,
256
1635
  badgeShowLimit: 999999999999,
257
1636
  classes: '',
@@ -262,63 +1641,95 @@ class AngularMultiSelect {
262
1641
  searchAutofocus: true,
263
1642
  lazyLoading: false,
264
1643
  labelKey: 'itemName',
1644
+ primaryKey: 'id',
265
1645
  theme: 'classic',
266
1646
  skin: 'classic',
267
- clearAll: true
1647
+ position: 'bottom',
1648
+ autoPosition: true,
1649
+ enableFilterSelectAll: true,
1650
+ selectGroup: false,
1651
+ addNewItemOnFilter: false,
1652
+ addNewButtonText: "Add",
1653
+ escapeToClose: true,
1654
+ clearAll: true,
1655
+ tagToBody: false
268
1656
  };
1657
+ randomSize = true;
269
1658
  parseError;
270
- constructor(_elementRef) {
1659
+ filteredList = [];
1660
+ virtualScroollInit = false;
1661
+ virtualScroller;
1662
+ isDisabledItemPresent = false;
1663
+ constructor(_elementRef, cdr, filterPipe) {
271
1664
  this._elementRef = _elementRef;
1665
+ this.cdr = cdr;
1666
+ this.filterPipe = filterPipe;
1667
+ this.searchTerm$.asObservable().pipe(debounceTime(1000), distinctUntilChanged(), tap(term => term)).subscribe(val => {
1668
+ this.filterInfiniteList(val);
1669
+ });
1670
+ }
1671
+ ngOnInit() {
1672
+ this.settings = Object.assign(this.defaultSettings, this.settings);
1673
+ this.cachedItems = this.cloneArray(this.data);
1674
+ if (this.settings.position == 'top') {
1675
+ setTimeout(() => {
1676
+ this.selectedListHeight = { val: 0 };
1677
+ this.selectedListHeight.val = this.selectedListElem.nativeElement.clientHeight;
1678
+ });
1679
+ }
1680
+ setTimeout(() => {
1681
+ this.calculateDropdownDirection();
1682
+ });
1683
+ this.virtualScroollInit = false;
272
1684
  }
273
1685
  getThemeName() {
274
- let rawTheme = 'classic';
1686
+ var rawTheme = 'classic';
275
1687
  if (this.settings) {
276
1688
  rawTheme = this.settings.skin || this.settings.theme || 'classic';
277
1689
  }
278
- let theme = String(rawTheme).toLowerCase().replace(/[^a-z0-9_-]+/g, '-');
1690
+ var theme = String(rawTheme).toLowerCase().replace(/[^a-z0-9_-]+/g, '-');
279
1691
  theme = theme.replace(/^-+|-+$/g, '');
280
1692
  return theme || 'classic';
281
1693
  }
282
1694
  getDropdownClasses() {
283
- let theme = this.getThemeName();
284
- let className = 'theme-' + theme;
1695
+ var theme = this.getThemeName();
1696
+ var classes = 'theme-' + theme;
285
1697
  if (theme !== 'classic' && theme !== 'material' && theme !== 'dark' && theme !== 'custom') {
286
- className += ' theme-custom';
1698
+ classes += ' theme-custom';
287
1699
  }
288
1700
  if (this.isActive) {
289
- className += ' is-open';
1701
+ classes += ' is-open';
290
1702
  }
291
1703
  if (this.settings && this.settings.disabled) {
292
- className += ' is-disabled';
1704
+ classes += ' is-disabled';
293
1705
  }
294
- return className;
295
- }
296
- ngOnInit() {
297
- this.settings = Object.assign(this.defaultSettings, this.settings);
298
- if (this.settings.groupBy) {
299
- this.groupedData = this.transformData(this.data, this.settings.groupBy);
1706
+ if (this.loading) {
1707
+ classes += ' is-loading';
300
1708
  }
301
- this.totalRows = (this.data && this.data.length);
302
- this.cachedItems = this.data;
303
- this.screenItemsLen = Math.ceil(this.settings.maxHeight / this.itemHeight);
304
- this.cachedItemsLen = this.screenItemsLen * 3;
305
- this.totalHeight = this.itemHeight * this.totalRows;
306
- this.maxBuffer = this.screenItemsLen * this.itemHeight;
307
- this.lastScrolled = 0;
308
- this.renderChunk(0, this.cachedItemsLen / 2);
1709
+ return classes;
1710
+ }
1711
+ onKeyUp(evt) {
1712
+ this.searchTerm$.next(evt.target.value);
309
1713
  }
310
1714
  ngOnChanges(changes) {
311
- if (changes.data && !changes.data.isFirstChange()) {
1715
+ if (changes.data && !changes.data.firstChange) {
312
1716
  if (this.settings.groupBy) {
313
1717
  this.groupedData = this.transformData(this.data, this.settings.groupBy);
314
1718
  if (this.data.length == 0) {
315
1719
  this.selectedItems = [];
316
1720
  }
1721
+ this.groupCachedItems = this.cloneArray(this.groupedData);
317
1722
  }
1723
+ this.cachedItems = this.cloneArray(this.data);
318
1724
  }
319
- if (changes.settings && !changes.settings.isFirstChange()) {
1725
+ if (changes.settings && !changes.settings.firstChange) {
320
1726
  this.settings = Object.assign(this.defaultSettings, this.settings);
321
1727
  }
1728
+ if (changes.loading) {
1729
+ }
1730
+ if (this.settings.lazyLoading && this.virtualScroollInit && changes.data) {
1731
+ this.virtualdata = changes.data.currentValue;
1732
+ }
322
1733
  }
323
1734
  ngDoCheck() {
324
1735
  if (this.selectedItems) {
@@ -329,12 +1740,22 @@ class AngularMultiSelect {
329
1740
  }
330
1741
  ngAfterViewInit() {
331
1742
  if (this.settings.lazyLoading) {
332
- this._elementRef.nativeElement.getElementsByClassName("lazyContainer")[0].addEventListener('scroll', this.onScroll.bind(this));
1743
+ // this._elementRef.nativeElement.getElementsByClassName("lazyContainer")[0].addEventListener('scroll', this.onScroll.bind(this));
1744
+ }
1745
+ }
1746
+ ngAfterViewChecked() {
1747
+ if (this.selectedListElem.nativeElement.clientHeight && this.settings.position == 'top' && this.selectedListHeight) {
1748
+ this.selectedListHeight.val = this.selectedListElem.nativeElement.clientHeight;
1749
+ this.cdr.detectChanges();
333
1750
  }
1751
+ //this.calculateDropdownDirection();
334
1752
  }
335
1753
  onItemClick(item, index, evt) {
1754
+ if (item.disabled) {
1755
+ return;
1756
+ }
336
1757
  if (this.settings.disabled) {
337
- return false;
1758
+ return;
338
1759
  }
339
1760
  let found = this.isSelected(item);
340
1761
  let limit = this.selectedItems.length < this.settings.limitSelection ? true : false;
@@ -360,6 +1781,9 @@ class AngularMultiSelect {
360
1781
  if (this.data.length == this.selectedItems.length) {
361
1782
  this.isSelectAll = true;
362
1783
  }
1784
+ if (this.settings.groupBy) {
1785
+ this.updateGroupInfo(item);
1786
+ }
363
1787
  }
364
1788
  validate(c) {
365
1789
  return null;
@@ -367,31 +1791,42 @@ class AngularMultiSelect {
367
1791
  onTouchedCallback = noop;
368
1792
  onChangeCallback = noop;
369
1793
  writeValue(value) {
370
- if (value !== undefined && value !== null) {
1794
+ if (value !== undefined && value !== null && value !== '') {
371
1795
  if (this.settings.singleSelection) {
372
- try {
373
- if (value.length > 1) {
374
- this.selectedItems = [value[0]];
375
- throw new MyException(404, { "msg": "Single Selection Mode, Selected Items cannot have more than one item." });
1796
+ if (this.settings.groupBy) {
1797
+ this.groupedData = this.transformData(this.data, this.settings.groupBy);
1798
+ this.groupCachedItems = this.cloneArray(this.groupedData);
1799
+ this.selectedItems = [value[0]];
1800
+ }
1801
+ else {
1802
+ try {
1803
+ if (value.length > 1) {
1804
+ this.selectedItems = [value[0]];
1805
+ throw new MyException(404, { "msg": "Single Selection Mode, Selected Items cannot have more than one item." });
1806
+ }
1807
+ else {
1808
+ this.selectedItems = value;
1809
+ }
376
1810
  }
377
- else {
378
- this.selectedItems = value;
1811
+ catch (e) {
1812
+ console.error(e.body.msg);
379
1813
  }
380
1814
  }
381
- catch (e) {
382
- console.error(e.body.msg);
383
- }
384
1815
  }
385
1816
  else {
386
1817
  if (this.settings.limitSelection) {
387
- this.selectedItems = value.splice(0, this.settings.limitSelection);
1818
+ this.selectedItems = value.slice(0, this.settings.limitSelection);
388
1819
  }
389
1820
  else {
390
1821
  this.selectedItems = value;
391
1822
  }
392
- if (this.selectedItems.length === this.data.length && this.data.length > 0) {
1823
+ if (this.selectedItems != null && this.selectedItems.length === this.data.length && this.data.length > 0) {
393
1824
  this.isSelectAll = true;
394
1825
  }
1826
+ if (this.settings.groupBy) {
1827
+ this.groupedData = this.transformData(this.data, this.settings.groupBy);
1828
+ this.groupCachedItems = this.cloneArray(this.groupedData);
1829
+ }
395
1830
  }
396
1831
  }
397
1832
  else {
@@ -407,91 +1842,332 @@ class AngularMultiSelect {
407
1842
  this.onTouchedCallback = fn;
408
1843
  }
409
1844
  trackByFn(index, item) {
410
- return item.id;
1845
+ return item[this.settings.primaryKey];
411
1846
  }
412
1847
  isSelected(clickedItem) {
1848
+ if (clickedItem.disabled) {
1849
+ return false;
1850
+ }
413
1851
  let found = false;
414
1852
  this.selectedItems && this.selectedItems.forEach(item => {
415
- if (clickedItem.id === item.id) {
1853
+ if (clickedItem[this.settings.primaryKey] === item[this.settings.primaryKey]) {
416
1854
  found = true;
417
1855
  }
418
1856
  });
419
1857
  return found;
420
1858
  }
421
1859
  addSelected(item) {
1860
+ if (item.disabled) {
1861
+ return;
1862
+ }
422
1863
  if (this.settings.singleSelection) {
423
1864
  this.selectedItems = [];
424
1865
  this.selectedItems.push(item);
425
1866
  this.closeDropdown();
426
1867
  }
427
1868
  else
428
- this.selectedItems.push(item);
1869
+ this.selectedItems = [...this.selectedItems, item];
429
1870
  this.onChangeCallback(this.selectedItems);
430
1871
  this.onTouchedCallback(this.selectedItems);
431
1872
  }
432
1873
  removeSelected(clickedItem) {
433
1874
  this.selectedItems && this.selectedItems.forEach(item => {
434
- if (clickedItem.id === item.id) {
1875
+ if (clickedItem[this.settings.primaryKey] === item[this.settings.primaryKey]) {
435
1876
  this.selectedItems.splice(this.selectedItems.indexOf(item), 1);
436
1877
  }
437
1878
  });
438
1879
  this.onChangeCallback(this.selectedItems);
439
1880
  this.onTouchedCallback(this.selectedItems);
440
1881
  }
441
- clearSelection(e) {
442
- this.selectedItems = [];
443
- this.isSelectAll = false;
444
- this.onChangeCallback(this.selectedItems);
445
- this.onTouchedCallback(this.selectedItems);
446
- this.onDeSelectAll.emit(this.selectedItems);
447
- }
448
1882
  toggleDropdown(evt) {
449
1883
  if (this.settings.disabled) {
450
- return false;
1884
+ return;
451
1885
  }
452
1886
  this.isActive = !this.isActive;
453
1887
  if (this.isActive) {
454
- if (this.settings.searchAutofocus && this.settings.enableSearchFilter) {
455
- setTimeout(() => {
456
- this.searchInput.nativeElement.focus();
457
- }, 0);
458
- }
459
- this.onOpen.emit(true);
1888
+ this.openDropdown();
460
1889
  }
461
1890
  else {
462
- this.onClose.emit(false);
1891
+ this.closeDropdown();
1892
+ }
1893
+ if (this.settings.lazyLoading) {
1894
+ this.virtualdata = this.data;
1895
+ this.virtualScroollInit = true;
463
1896
  }
464
1897
  evt.preventDefault();
465
1898
  }
1899
+ openDropdown() {
1900
+ if (this.settings.disabled) {
1901
+ return;
1902
+ }
1903
+ this.isActive = true;
1904
+ this.calculateDropdownDirection();
1905
+ if (this.settings.searchAutofocus && this.searchInput && this.settings.enableSearchFilter && !this.searchTempl) {
1906
+ setTimeout(() => {
1907
+ this.searchInput.nativeElement.focus();
1908
+ }, 0);
1909
+ }
1910
+ this.onOpen.emit(true);
1911
+ }
466
1912
  closeDropdown() {
1913
+ if (this.searchInput && this.settings.lazyLoading) {
1914
+ this.searchInput.nativeElement.value = "";
1915
+ }
467
1916
  if (this.searchInput) {
468
1917
  this.searchInput.nativeElement.value = "";
469
- this.data = [];
470
- this.data = this.cachedItems;
471
- this.totalHeight = this.itemHeight * this.data.length;
472
- this.totalRows = this.data.length;
473
- this.updateView(this.scrollTop);
474
1918
  }
475
1919
  this.filter = "";
476
1920
  this.isActive = false;
1921
+ this.searchTerm$.next('');
477
1922
  this.onClose.emit(false);
478
1923
  }
479
- toggleSelectAll() {
1924
+ closeDropdownOnClickOut() {
1925
+ if (this.isActive) {
1926
+ if (this.searchInput && this.settings.lazyLoading) {
1927
+ this.searchInput.nativeElement.value = "";
1928
+ }
1929
+ if (this.searchInput) {
1930
+ this.searchInput.nativeElement.value = "";
1931
+ }
1932
+ this.filter = "";
1933
+ this.isActive = false;
1934
+ this.clearSearch();
1935
+ this.searchTerm$.next('');
1936
+ this.onClose.emit(false);
1937
+ }
1938
+ }
1939
+ toggleSelectAll(event) {
480
1940
  if (!this.isSelectAll) {
481
1941
  this.selectedItems = [];
482
- this.selectedItems = this.data.slice();
1942
+ if (this.settings.groupBy) {
1943
+ this.groupedData.forEach((obj) => {
1944
+ obj.selected = !obj.disabled;
1945
+ });
1946
+ this.groupCachedItems.forEach((obj) => {
1947
+ obj.selected = !obj.disabled;
1948
+ });
1949
+ }
1950
+ // this.selectedItems = this.data.slice();
1951
+ this.selectedItems = this.data.filter((individualData) => !individualData.disabled);
483
1952
  this.isSelectAll = true;
484
1953
  this.onChangeCallback(this.selectedItems);
485
1954
  this.onTouchedCallback(this.selectedItems);
486
1955
  this.onSelectAll.emit(this.selectedItems);
487
1956
  }
488
1957
  else {
1958
+ if (this.settings.groupBy) {
1959
+ this.groupedData.forEach((obj) => {
1960
+ obj.selected = false;
1961
+ });
1962
+ this.groupCachedItems.forEach((obj) => {
1963
+ obj.selected = false;
1964
+ });
1965
+ }
489
1966
  this.selectedItems = [];
490
1967
  this.isSelectAll = false;
491
1968
  this.onChangeCallback(this.selectedItems);
492
1969
  this.onTouchedCallback(this.selectedItems);
493
1970
  this.onDeSelectAll.emit(this.selectedItems);
494
1971
  }
1972
+ setTimeout(() => {
1973
+ this.calculateDropdownDirection();
1974
+ });
1975
+ event.stopPropagation();
1976
+ }
1977
+ filterGroupedList() {
1978
+ if (this.filter == "" || this.filter == null) {
1979
+ this.clearSearch();
1980
+ return;
1981
+ }
1982
+ this.groupedData = this.cloneArray(this.groupCachedItems);
1983
+ this.groupedData = this.groupedData.filter(obj => {
1984
+ let arr = [];
1985
+ if (obj[this.settings.labelKey].toLowerCase().indexOf(this.filter.toLowerCase()) > -1) {
1986
+ arr = obj.list;
1987
+ }
1988
+ else {
1989
+ arr = obj.list.filter(t => {
1990
+ return t[this.settings.labelKey].toLowerCase().indexOf(this.filter.toLowerCase()) > -1;
1991
+ });
1992
+ }
1993
+ obj.list = arr;
1994
+ if (obj[this.settings.labelKey].toLowerCase().indexOf(this.filter.toLowerCase()) > -1) {
1995
+ return arr;
1996
+ }
1997
+ else {
1998
+ return arr.some(cat => {
1999
+ return cat[this.settings.labelKey].toLowerCase().indexOf(this.filter.toLowerCase()) > -1;
2000
+ });
2001
+ }
2002
+ });
2003
+ }
2004
+ toggleFilterSelectAll() {
2005
+ if (!this.isFilterSelectAll) {
2006
+ let added = [];
2007
+ if (this.settings.groupBy) {
2008
+ this.groupedData.forEach((item) => {
2009
+ item.sele;
2010
+ if (item.list) {
2011
+ item.list.forEach((el) => {
2012
+ if (!this.isSelected(el)) {
2013
+ this.addSelected(el);
2014
+ added.push(el);
2015
+ }
2016
+ });
2017
+ }
2018
+ this.updateGroupInfo(item);
2019
+ });
2020
+ this.filteredList.forEach((el) => {
2021
+ if (!this.isSelected(el) && !el.hasOwnProperty('grpTitle')) {
2022
+ this.addSelected(el);
2023
+ added.push(el);
2024
+ }
2025
+ });
2026
+ }
2027
+ else {
2028
+ this.filteredList.forEach((item) => {
2029
+ if (!this.isSelected(item)) {
2030
+ this.addSelected(item);
2031
+ added.push(item);
2032
+ }
2033
+ });
2034
+ }
2035
+ this.isFilterSelectAll = true;
2036
+ this.onFilterSelectAll.emit(added);
2037
+ }
2038
+ else {
2039
+ let removed = [];
2040
+ if (this.settings.groupBy) {
2041
+ this.groupedData.forEach((item) => {
2042
+ if (item.list) {
2043
+ item.list.forEach((el) => {
2044
+ if (this.isSelected(el)) {
2045
+ this.removeSelected(el);
2046
+ removed.push(el);
2047
+ }
2048
+ });
2049
+ }
2050
+ this.updateGroupInfo(item);
2051
+ });
2052
+ this.filteredList.forEach((el) => {
2053
+ if (this.isSelected(el)) {
2054
+ this.removeSelected(el);
2055
+ removed.push(el);
2056
+ }
2057
+ });
2058
+ }
2059
+ else {
2060
+ this.filteredList.forEach((item) => {
2061
+ if (this.isSelected(item)) {
2062
+ this.removeSelected(item);
2063
+ removed.push(item);
2064
+ }
2065
+ });
2066
+ }
2067
+ this.isFilterSelectAll = false;
2068
+ this.onFilterDeSelectAll.emit(removed);
2069
+ }
2070
+ }
2071
+ toggleInfiniteFilterSelectAll() {
2072
+ if (!this.isInfiniteFilterSelectAll) {
2073
+ this.virtualdata.forEach((item) => {
2074
+ if (!this.isSelected(item)) {
2075
+ this.addSelected(item);
2076
+ }
2077
+ });
2078
+ this.isInfiniteFilterSelectAll = true;
2079
+ }
2080
+ else {
2081
+ this.virtualdata.forEach((item) => {
2082
+ if (this.isSelected(item)) {
2083
+ this.removeSelected(item);
2084
+ }
2085
+ });
2086
+ this.isInfiniteFilterSelectAll = false;
2087
+ }
2088
+ }
2089
+ clearSearch() {
2090
+ if (this.settings.groupBy) {
2091
+ this.groupedData = [];
2092
+ this.groupedData = this.cloneArray(this.groupCachedItems);
2093
+ }
2094
+ this.filter = "";
2095
+ this.isFilterSelectAll = false;
2096
+ this.searchTerm$.next('');
2097
+ this.data = this.cachedItems;
2098
+ }
2099
+ onFilterChange(data) {
2100
+ if (this.filter && this.filter == "" || data.length == 0) {
2101
+ this.isFilterSelectAll = false;
2102
+ this.data = this.cachedItems.slice();
2103
+ }
2104
+ let cnt = 0;
2105
+ data.forEach((item) => {
2106
+ if (!item.hasOwnProperty('grpTitle') && this.isSelected(item)) {
2107
+ cnt++;
2108
+ }
2109
+ });
2110
+ if (cnt > 0 && this.filterLength == cnt) {
2111
+ this.isFilterSelectAll = true;
2112
+ }
2113
+ else if (cnt > 0 && this.filterLength != cnt) {
2114
+ this.isFilterSelectAll = false;
2115
+ }
2116
+ this.data = data;
2117
+ }
2118
+ cloneArray(arr) {
2119
+ let i, copy;
2120
+ if (Array.isArray(arr)) {
2121
+ return JSON.parse(JSON.stringify(arr));
2122
+ }
2123
+ else if (typeof arr === 'object') {
2124
+ throw 'Cannot clone array containing an object!';
2125
+ }
2126
+ else {
2127
+ return arr;
2128
+ }
2129
+ }
2130
+ updateGroupInfo(item) {
2131
+ if (item.disabled) {
2132
+ return;
2133
+ }
2134
+ let key = this.settings.groupBy;
2135
+ this.groupedData.forEach((obj) => {
2136
+ let cnt = 0;
2137
+ if (obj.grpTitle && (item[key] == obj[key])) {
2138
+ if (obj.list) {
2139
+ obj.list.forEach((el) => {
2140
+ if (this.isSelected(el)) {
2141
+ cnt++;
2142
+ }
2143
+ });
2144
+ }
2145
+ }
2146
+ if (obj.list && (cnt === obj.list.length) && (item[key] == obj[key])) {
2147
+ obj.selected = true;
2148
+ }
2149
+ else if (obj.list && (cnt != obj.list.length) && (item[key] == obj[key])) {
2150
+ obj.selected = false;
2151
+ }
2152
+ });
2153
+ this.groupCachedItems.forEach((obj) => {
2154
+ let cnt = 0;
2155
+ if (obj.grpTitle && (item[key] == obj[key])) {
2156
+ if (obj.list) {
2157
+ obj.list.forEach((el) => {
2158
+ if (this.isSelected(el)) {
2159
+ cnt++;
2160
+ }
2161
+ });
2162
+ }
2163
+ }
2164
+ if (obj.list && (cnt === obj.list.length) && (item[key] == obj[key])) {
2165
+ obj.selected = true;
2166
+ }
2167
+ else if (obj.list && (cnt != obj.list.length) && (item[key] == obj[key])) {
2168
+ obj.selected = false;
2169
+ }
2170
+ });
495
2171
  }
496
2172
  transformData(arr, field) {
497
2173
  const groupedObj = arr.reduce((prev, cur) => {
@@ -504,71 +2180,249 @@ class AngularMultiSelect {
504
2180
  return prev;
505
2181
  }, {});
506
2182
  const tempArr = [];
507
- Object.keys(groupedObj).map(function (x) {
508
- tempArr.push({ key: x, value: groupedObj[x] });
2183
+ Object.keys(groupedObj).map((x) => {
2184
+ let obj = {};
2185
+ let disabledChildrens = [];
2186
+ obj["grpTitle"] = true;
2187
+ obj[this.settings.labelKey] = x;
2188
+ obj[this.settings.groupBy] = x;
2189
+ obj['selected'] = false;
2190
+ obj['list'] = [];
2191
+ let cnt = 0;
2192
+ groupedObj[x].forEach((item) => {
2193
+ item['list'] = [];
2194
+ if (item.disabled) {
2195
+ this.isDisabledItemPresent = true;
2196
+ disabledChildrens.push(item);
2197
+ }
2198
+ obj.list.push(item);
2199
+ if (this.isSelected(item)) {
2200
+ cnt++;
2201
+ }
2202
+ });
2203
+ if (cnt == obj.list.length) {
2204
+ obj.selected = true;
2205
+ }
2206
+ else {
2207
+ obj.selected = false;
2208
+ }
2209
+ // Check if current group item's all childrens are disabled or not
2210
+ obj['disabled'] = disabledChildrens.length === groupedObj[x].length;
2211
+ tempArr.push(obj);
2212
+ // obj.list.forEach((item: any) => {
2213
+ // tempArr.push(item);
2214
+ // });
509
2215
  });
510
2216
  return tempArr;
511
2217
  }
512
- renderChunk(fromPos, howMany) {
513
- this.chunkArray = [];
514
- this.chunkIndex = [];
515
- var finalItem = fromPos + howMany;
516
- if (finalItem > this.totalRows)
517
- finalItem = this.totalRows;
518
- for (var i = fromPos; i < finalItem; i++) {
519
- this.chunkIndex.push((i * this.itemHeight) + 'px');
520
- this.chunkArray.push(this.data[i]);
521
- }
522
- }
523
- onScroll(e) {
524
- this.scrollTop = e.target.scrollTop;
525
- this.updateView(this.scrollTop);
526
- }
527
- updateView(scrollTop) {
528
- var scrollPos = scrollTop ? scrollTop : 0;
529
- var first = (scrollPos / this.itemHeight) - this.screenItemsLen;
530
- var firstTemp = "" + first;
531
- first = parseInt(firstTemp) < 0 ? 0 : parseInt(firstTemp);
532
- this.renderChunk(first, this.cachedItemsLen);
533
- this.lastRepaintY = scrollPos;
534
- }
535
2218
  filterInfiniteList(evt) {
536
- var filteredElems = [];
537
- this.data = this.cachedItems.slice();
538
- if (evt.target.value.toString() != '') {
539
- this.data.filter(function (el) {
540
- for (var prop in el) {
541
- if (el[prop].toString().toLowerCase().indexOf(evt.target.value.toString().toLowerCase()) >= 0) {
542
- filteredElems.push(el);
543
- break;
2219
+ let filteredElems = [];
2220
+ if (this.settings.groupBy) {
2221
+ this.groupedData = this.groupCachedItems.slice();
2222
+ }
2223
+ else {
2224
+ this.data = this.cachedItems.slice();
2225
+ this.virtualdata = this.cachedItems.slice();
2226
+ }
2227
+ if ((evt != null || evt != '') && !this.settings.groupBy) {
2228
+ if (this.settings.searchBy.length > 0) {
2229
+ for (let t = 0; t < this.settings.searchBy.length; t++) {
2230
+ this.virtualdata.filter((el) => {
2231
+ if (el[this.settings.searchBy[t].toString()].toString().toLowerCase().indexOf(evt.toString().toLowerCase()) >= 0) {
2232
+ filteredElems.push(el);
2233
+ }
2234
+ });
2235
+ }
2236
+ }
2237
+ else {
2238
+ this.virtualdata.filter(function (el) {
2239
+ for (let prop in el) {
2240
+ if (el[prop].toString().toLowerCase().indexOf(evt.toString().toLowerCase()) >= 0) {
2241
+ filteredElems.push(el);
2242
+ break;
2243
+ }
544
2244
  }
2245
+ });
2246
+ }
2247
+ this.virtualdata = [];
2248
+ this.virtualdata = filteredElems;
2249
+ this.infiniteFilterLength = this.virtualdata.length;
2250
+ }
2251
+ if (evt.toString() != '' && this.settings.groupBy) {
2252
+ this.groupedData.filter(function (el) {
2253
+ if (el.hasOwnProperty('grpTitle')) {
2254
+ filteredElems.push(el);
2255
+ }
2256
+ else {
2257
+ for (let prop in el) {
2258
+ if (el[prop].toString().toLowerCase().indexOf(evt.toString().toLowerCase()) >= 0) {
2259
+ filteredElems.push(el);
2260
+ break;
2261
+ }
2262
+ }
2263
+ }
2264
+ });
2265
+ this.groupedData = [];
2266
+ this.groupedData = filteredElems;
2267
+ this.infiniteFilterLength = this.groupedData.length;
2268
+ }
2269
+ else if (evt.toString() == '' && this.cachedItems.length > 0) {
2270
+ this.virtualdata = [];
2271
+ this.virtualdata = this.cachedItems;
2272
+ this.infiniteFilterLength = 0;
2273
+ }
2274
+ if (this.virtualScroller) {
2275
+ this.virtualScroller.refresh();
2276
+ }
2277
+ }
2278
+ resetInfiniteSearch() {
2279
+ this.filter = "";
2280
+ this.isInfiniteFilterSelectAll = false;
2281
+ this.virtualdata = [];
2282
+ this.virtualdata = this.cachedItems;
2283
+ this.groupedData = this.groupCachedItems;
2284
+ this.searchTerm$.next('');
2285
+ this.infiniteFilterLength = 0;
2286
+ }
2287
+ onScrollEnd(e) {
2288
+ if (e.endIndex === this.data.length - 1 || e.startIndex === 0) {
2289
+ }
2290
+ this.onScrollToEnd.emit(e);
2291
+ }
2292
+ ngOnDestroy() {
2293
+ if (this.subscription) {
2294
+ this.subscription.unsubscribe();
2295
+ }
2296
+ }
2297
+ selectGroup(item) {
2298
+ if (item.disabled) {
2299
+ return;
2300
+ }
2301
+ if (item.selected) {
2302
+ item.selected = false;
2303
+ item.list.forEach((obj) => {
2304
+ this.removeSelected(obj);
2305
+ });
2306
+ this.onGroupDeSelect.emit(item);
2307
+ this.updateGroupInfo(item);
2308
+ }
2309
+ else {
2310
+ item.selected = true;
2311
+ item.list.forEach((obj) => {
2312
+ if (!this.isSelected(obj)) {
2313
+ this.addSelected(obj);
2314
+ }
2315
+ });
2316
+ this.onGroupSelect.emit(item);
2317
+ this.updateGroupInfo(item);
2318
+ }
2319
+ }
2320
+ addFilterNewItem() {
2321
+ this.onAddFilterNewItem.emit(this.filter);
2322
+ this.filterPipe.transform(this.data, this.filter, this.settings.searchBy);
2323
+ }
2324
+ calculateDropdownDirection() {
2325
+ let shouldOpenTowardsTop = this.settings.position == 'top';
2326
+ const elem = this.stacklineDropdown.nativeElement;
2327
+ const dropdownWidth = elem.clientWidth;
2328
+ this.dropDownWidth = dropdownWidth;
2329
+ this.dropDownLeft = this.settings.tagToBody ? elem.getBoundingClientRect().x : 0;
2330
+ if (this.settings.position == 'top' && !this.settings.autoPosition) {
2331
+ this.openTowardsTop(true);
2332
+ }
2333
+ else if (this.settings.position == 'bottom' && !this.settings.autoPosition) {
2334
+ this.openTowardsTop(false);
2335
+ }
2336
+ if (this.settings.autoPosition) {
2337
+ const dropdownHeight = this.defaultSettings.maxHeight;
2338
+ const viewportHeight = document.documentElement.clientHeight;
2339
+ const selectedListBounds = this.selectedListElem.nativeElement.getBoundingClientRect();
2340
+ const spaceOnTop = selectedListBounds.top;
2341
+ const spaceOnBottom = viewportHeight - selectedListBounds.top;
2342
+ if (spaceOnBottom < spaceOnTop && dropdownHeight < spaceOnTop) {
2343
+ this.openTowardsTop(true);
2344
+ }
2345
+ else {
2346
+ this.openTowardsTop(false);
2347
+ }
2348
+ // Keep preference if there is not enough space on either the top or bottom
2349
+ /* if (spaceOnTop || spaceOnBottom) {
2350
+ if (shouldOpenTowardsTop) {
2351
+ shouldOpenTowardsTop = spaceOnTop;
2352
+ } else {
2353
+ shouldOpenTowardsTop = !spaceOnBottom;
2354
+ }
2355
+ } */
2356
+ }
2357
+ }
2358
+ openTowardsTop(value) {
2359
+ const elem = this.stacklineDropdown.nativeElement;
2360
+ if (value && this.selectedListElem.nativeElement.clientHeight) {
2361
+ this.dropdownListYOffset = 15 - this.selectedListElem.nativeElement.clientHeight;
2362
+ if (this.settings.tagToBody) {
2363
+ this.dropDownTop = (elem.getBoundingClientRect().y - this.selectedListElem.nativeElement.clientHeight * 2 - 15 - this.defaultSettings.maxHeight) + 'px';
2364
+ this.dropDownBottom = null;
2365
+ }
2366
+ else {
2367
+ this.dropDownTop = null;
2368
+ this.dropDownBottom = (this.selectedListElem.nativeElement.clientHeight + 15) + 'px';
2369
+ }
2370
+ this.settings.position = 'top';
2371
+ }
2372
+ else {
2373
+ if (this.settings.tagToBody) {
2374
+ this.dropDownTop = (elem.getBoundingClientRect().y + elem.clientHeight + 1) + 'px';
2375
+ this.dropDownBottom = null;
2376
+ }
2377
+ else {
2378
+ this.dropDownTop = null;
2379
+ this.dropDownBottom = null;
2380
+ }
2381
+ this.dropdownListYOffset = 0;
2382
+ this.settings.position = 'bottom';
2383
+ }
2384
+ }
2385
+ clearSelection(e) {
2386
+ if (this.settings.groupBy) {
2387
+ this.groupCachedItems.forEach((obj) => {
2388
+ obj.selected = false;
2389
+ });
2390
+ }
2391
+ this.clearSearch();
2392
+ this.selectedItems = [];
2393
+ this.isSelectAll = false;
2394
+ this.onChangeCallback(this.selectedItems);
2395
+ this.onTouchedCallback(this.selectedItems);
2396
+ this.onDeSelectAll.emit(this.selectedItems);
2397
+ }
2398
+ filteritems(evt) {
2399
+ this.filteredList = this.filterPipe.transform(this.cachedItems, evt.target.value, this.settings.searchBy);
2400
+ if (this.filteredList) {
2401
+ let len = 0;
2402
+ this.filteredList.forEach((obj, i) => {
2403
+ if (obj.disabled) {
2404
+ this.isDisabledItemPresent = true;
2405
+ }
2406
+ if (!obj.hasOwnProperty('grpTitle')) {
2407
+ len++;
545
2408
  }
546
2409
  });
547
- //this.cachedItems = this.data;
548
- this.totalHeight = this.itemHeight * filteredElems.length;
549
- this.totalRows = filteredElems.length;
550
- this.data = [];
551
- this.data = filteredElems;
552
- this.updateView(this.scrollTop);
553
- }
554
- else if (evt.target.value.toString() == '' && this.cachedItems.length > 0) {
555
- this.data = [];
556
- this.data = this.cachedItems;
557
- this.totalHeight = this.itemHeight * this.data.length;
558
- this.totalRows = this.data.length;
559
- this.updateView(this.scrollTop);
560
- }
561
- }
562
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AngularMultiSelect, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
563
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.14", type: AngularMultiSelect, isStandalone: false, selector: "angular-multiselect, angular2-multiselect", inputs: { data: "data", settings: "settings" }, outputs: { onSelect: "onSelect", onDeSelect: "onDeSelect", onSelectAll: "onSelectAll", onDeSelectAll: "onDeSelectAll", onOpen: "onOpen", onClose: "onClose" }, host: { properties: { "class": "defaultSettings.classes" } }, providers: [DROPDOWN_CONTROL_VALUE_ACCESSOR, DROPDOWN_CONTROL_VALIDATION], queries: [{ propertyName: "itemTempl", first: true, predicate: Item, descendants: true }, { propertyName: "badgeTempl", first: true, predicate: Badge, descendants: true }], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"stackline-dropdown\" [ngClass]=\"getDropdownClasses()\" (clickOutside)=\"closeDropdown()\">\n <div class=\"selected-list\">\n <div class=\"c-btn\" (click)=\"toggleDropdown($event)\" [ngClass]=\"{'disabled': settings.disabled}\">\n <span *ngIf=\"selectedItems?.length == 0\">{{settings.text}}</span>\n <span *ngIf=\"settings.singleSelection\">\n <span *ngFor=\"let item of selectedItems;trackBy: trackByFn;\">\n {{item[settings.labelKey]}}\n </span>\n </span>\n <div class=\"c-list\" *ngIf=\"selectedItems?.length > 0 && !settings.singleSelection\">\n <div class=\"c-token\" *ngFor=\"let item of selectedItems;trackBy: trackByFn;let k = index\" [hidden]=\"k > settings.badgeShowLimit-1\">\n <span *ngIf=\"!badgeTempl\" class=\"c-label\">{{item[settings.labelKey]}}</span>\n <span *ngIf=\"badgeTempl\" class=\"c-label\">\n <c-templateRenderer [data]=\"badgeTempl\" [item]=\"item\"></c-templateRenderer>\n </span>\n <span class=\"fa fa-remove\" (click)=\"onItemClick(item,k,$event)\"></span>\n </div>\n </div> \n <span class=\"countplaceholder\" *ngIf=\"selectedItems?.length > settings.badgeShowLimit\">+{{selectedItems?.length - settings.badgeShowLimit }}</span>\n <span class=\"fa fa-remove clear-all\" *ngIf=\"settings.clearAll && selectedItems?.length > 0 && !settings.disabled\" (click)=\"clearSelection($event);$event.stopPropagation()\"></span>\n <span class=\"fa\" [ngClass]=\"{'fa-angle-down': !isActive,'fa-angle-up':isActive}\"></span>\n </div> \n </div>\n <div class=\"dropdown-list\" [hidden]=\"!isActive\">\n <div class=\"arrow-up arrow-2\"></div>\n <div class=\"arrow-up\"></div>\n <div class=\"list-area\">\n <div class=\"pure-checkbox select-all\" *ngIf=\"settings.enableCheckAll && !settings.singleSelection && !settings.limitSelection\" (click)=\"toggleSelectAll()\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelectAll\" [disabled]=\"settings.limitSelection == selectedItems?.length\"/>\n <label>\n <span [hidden]=\"isSelectAll\">{{settings.selectAllText}}</span>\n <span [hidden]=\"!isSelectAll\">{{settings.unSelectAllText}}</span>\n </label>\n </div> \n <div class=\"list-filter\" *ngIf=\"settings.enableSearchFilter && !settings.lazyLoading\">\n <span class=\"fa fa-search\"></span>\n <input #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\" [(ngModel)]=\"filter\">\n </div> \n <div class=\"list-filter\" *ngIf=\"settings.enableSearchFilter && settings.lazyLoading\">\n <span class=\"fa fa-search\"></span>\n <input #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\" (keyup)=\"filterInfiniteList($event)\">\n </div>\n <ul *ngIf=\"!settings.groupBy\" [style.maxHeight] = \"settings.maxHeight+'px'\" class=\"lazyContainer\" >\n <span *ngIf=\"itemTempl\">\n <li *ngFor=\"let item of data | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </span>\n <span *ngIf=\"!itemTempl && !settings.lazyLoading\" >\n <li *ngFor=\"let item of data | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </span>\n <span *ngIf=\"!itemTempl && settings.lazyLoading\" >\n <div [ngStyle]=\"{'height':totalHeight+'px'}\" style=\"position: relative;\">\n\n \n <li *ngFor=\"let item of chunkArray | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" style=\"position: absolute;width: 100%;\" class=\"pure-checkbox\" [styleProp]=\"chunkIndex[i]\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </div>\n </span>\n </ul>\n <div *ngIf=\"settings.groupBy\" [style.maxHeight] = \"settings.maxHeight+'px'\" style=\"overflow: auto;\">\n <ul *ngFor=\"let obj of groupedData ; let i = index;\" class=\"list-grp\">\n <h4 *ngIf=\"(obj.value | listFilter:filter ).length > 0\">{{obj.key}}</h4>\n <span *ngIf=\"itemTempl\" >\n <li *ngFor=\"let item of obj.value | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </span>\n <span *ngIf=\"!itemTempl\" >\n <li *ngFor=\"let item of obj.value | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </span>\n </ul>\n </div>\n <h5 class=\"list-message\" *ngIf=\"data?.length == 0\">{{settings.noDataLabel}}</h5>\n </div>\n </div>\n</div>\n", isInline: true, styles: [".stackline-dropdown{position:relative}.c-btn{display:inline-block;background:#fff;border:1px solid #ccc;border-radius:3px;font-size:14px;color:#333}.c-btn.disabled{background:#ccc}.c-btn:focus{outline:none}.selected-list .c-list{display:flex;flex:1 1 auto;align-items:center;flex-wrap:wrap;min-width:0;float:none;padding:0;margin:0;width:auto}.selected-list .c-list .c-token{list-style:none;padding:0 5px;background:#0079fe;color:#fff;border-radius:2px;margin-right:4px;margin-top:2px;float:left}.selected-list .c-list .c-token .c-label{display:block;float:left}.selected-list .c-list .c-token .fa-remove{margin-left:1px;font-size:12px}.selected-list .fa-angle-down,.selected-list .fa-angle-up{font-size:15pt;position:absolute;right:10px;top:50%;transform:translateY(-50%)}.selected-list .countplaceholder{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;align-self:center;margin:0 0 0 6px;line-height:1}.selected-list .c-btn{box-sizing:border-box;width:100%;box-shadow:0 1px 5px #959595;padding: 10px 68px 10px 10px;cursor:pointer;display:flex;align-items:center;flex-wrap:nowrap;position:relative}.dropdown-list{position:absolute;padding-top:14px;width:100%;z-index:9999}.dropdown-list ul{padding:0;list-style:none;overflow:auto;margin:0}.dropdown-list ul li{padding:10px;cursor:pointer;text-align:left}.dropdown-list ul li:first-child{padding-top:10px}.dropdown-list ul li:last-child{padding-bottom:10px}.dropdown-list ul li:hover{background:#f5f5f5}.dropdown-list ::-webkit-scrollbar{width:8px}.dropdown-list ::-webkit-scrollbar-thumb{background:#ccc;border-radius:5px}.dropdown-list ::-webkit-scrollbar-track{background:#f2f2f2}.arrow-up{width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-bottom:15px solid #fff;margin-left:15px;position:absolute;top:0}.arrow-2{border-bottom:15px solid #ccc;top:-1px}.list-area{border:1px solid #ccc;border-radius:3px;background:#fff;margin:0;box-shadow:0 1px 5px #959595}.select-all{padding:10px;border-bottom:1px solid #ccc;text-align:left}.list-filter{border-bottom:1px solid #ccc;position:relative}.list-filter input{border:0px;width:100%;height:35px;padding:0 0 0 35px}.list-filter input:focus{outline:none}.list-filter .fa{position:absolute;top:10px;left:13px;color:#888}.pure-checkbox input[type=checkbox]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pure-checkbox input[type=checkbox]:focus+label:before,.pure-checkbox input[type=checkbox]:hover+label:before{border-color:#0079fe;background-color:#f2f2f2}.pure-checkbox input[type=checkbox]:active+label:before{transition-duration:0s}.pure-checkbox input[type=checkbox]+label{position:relative;padding-left:2em;vertical-align:middle;-webkit-user-select:none;user-select:none;cursor:pointer;margin:0;color:#000;font-weight:300}.pure-checkbox input[type=checkbox]+label:before{box-sizing:content-box;content:\"\";color:#0079fe;position:absolute;top:50%;left:0;width:14px;height:14px;margin-top:-9px;border:2px solid #0079FE;text-align:center;transition:all .4s ease}.pure-checkbox input[type=checkbox]+label:after{box-sizing:content-box;content:\"\";background-color:#0079fe;position:absolute;top:50%;left:4px;width:10px;height:10px;margin-top:-5px;transform:scale(0);transform-origin:50%;transition:transform .2s ease-out}.pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#ccc}.pure-checkbox input[type=checkbox]:disabled:focus+label:before .pure-checkbox input[type=checkbox]:disabled:hover+label:before{background-color:inherit}.pure-checkbox input[type=checkbox]:disabled:checked+label:before{background-color:#ccc}.pure-checkbox input[type=checkbox]+label:after{background-color:transparent;top:50%;left:4px;width:8px;height:3px;margin-top:-4px;border-style:solid;border-color:#fff;border-width:0 0 3px 3px;border-image:none;transform:rotate(-45deg) scale(0)}.pure-checkbox input[type=checkbox]:checked+label:after{content:\"\";transform:rotate(-45deg) scale(1);transition:transform .2s ease-out}.pure-checkbox input[type=radio]:checked+label:before{background-color:#fff}.pure-checkbox input[type=radio]:checked+label:after{transform:scale(1)}.pure-checkbox input[type=radio]+label:before{border-radius:50%}.pure-checkbox input[type=checkbox]:checked+label:before{background:#0079fe}.pure-checkbox input[type=checkbox]:checked+label:after{transform:rotate(-45deg) scale(1)}.list-message{text-align:center}.list-grp{padding:0 15px!important}.list-grp h4{text-transform:capitalize;margin:15px 0 0;font-size:14px;font-weight:700}.list-grp>li{padding-left:15px!important}.stackline-dropdown.theme-material,.stackline-dropdown.theme-dark,.stackline-dropdown.theme-custom{--ms-primary: #3f51b5;--ms-primary-soft: rgba(63, 81, 181, .12);--ms-surface: #ffffff;--ms-surface-soft: #f5f7fb;--ms-surface-muted: #e8eaf6;--ms-outline: #c5cae9;--ms-outline-strong: #7986cb;--ms-on-surface: #212121;--ms-on-surface-muted: #5f6368;--ms-chip-bg: #e8eaf6;--ms-chip-text: #303f9f;--ms-chip-remove: #303f9f;--ms-divider: rgba(125, 119, 134, .16);--ms-section-bg: rgba(247, 242, 250, .76);--ms-selected-text: var(--ms-primary);--ms-shadow: 0 1px 2px rgba(33, 33, 33, .16), 0 12px 32px rgba(63, 81, 181, .12);--ms-shadow-soft: 0 1px 2px rgba(33, 33, 33, .12), 0 4px 12px rgba(33, 33, 33, .08);display:block;width:100%;color:var(--ms-on-surface);font:inherit}.stackline-dropdown.theme-dark{--ms-primary: #8ab4f8;--ms-primary-soft: rgba(138, 180, 248, .18);--ms-surface: #151a23;--ms-surface-soft: #202736;--ms-surface-muted: #111722;--ms-outline: #384456;--ms-outline-strong: #8ab4f8;--ms-on-surface: #edf2f7;--ms-on-surface-muted: #aab6c5;--ms-chip-bg: #263247;--ms-chip-text: #d7e6ff;--ms-chip-remove: #d7e6ff;--ms-divider: rgba(170, 182, 197, .18);--ms-section-bg: #101620;--ms-selected-text: #d7e6ff;--ms-shadow: 0 20px 50px rgba(0, 0, 0, .42);--ms-shadow-soft: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 24px rgba(0, 0, 0, .28)}.stackline-dropdown.theme-custom{--ms-primary: var(--stackline-ms-primary, #0f766e);--ms-primary-soft: var(--stackline-ms-primary-soft, rgba(15, 118, 110, .14));--ms-surface: var(--stackline-ms-surface, #ffffff);--ms-surface-soft: var(--stackline-ms-surface-soft, #ecfdf5);--ms-surface-muted: var(--stackline-ms-surface-muted, #d1fae5);--ms-outline: var(--stackline-ms-outline, #99f6e4);--ms-outline-strong: var(--stackline-ms-outline-strong, #0f766e);--ms-on-surface: var(--stackline-ms-on-surface, #102a2a);--ms-on-surface-muted: var(--stackline-ms-on-surface-muted, #47615f);--ms-chip-bg: var(--stackline-ms-chip-bg, #ccfbf1);--ms-chip-text: var(--stackline-ms-chip-text, #115e59);--ms-chip-remove: var(--stackline-ms-chip-remove, #115e59);--ms-divider: var(--stackline-ms-divider, rgba(15, 118, 110, .16));--ms-section-bg: var(--stackline-ms-section-bg, #f0fdfa);--ms-selected-text: var(--stackline-ms-selected-text, var(--ms-primary));--ms-shadow: var(--stackline-ms-shadow, 0 18px 42px rgba(15, 118, 110, .15));--ms-shadow-soft: var(--stackline-ms-shadow-soft, 0 1px 2px rgba(15, 118, 110, .16), 0 8px 18px rgba(15, 118, 110, .09))}.stackline-dropdown.theme-material .selected-list,.stackline-dropdown.theme-dark .selected-list,.stackline-dropdown.theme-custom .selected-list{width:100%}.stackline-dropdown.theme-material .selected-list .c-btn,.stackline-dropdown.theme-dark .selected-list .c-btn,.stackline-dropdown.theme-custom .selected-list .c-btn{position:relative;display:flex;align-items:center;flex-wrap:nowrap;gap:8px;width:100%;min-height:56px;padding: 11px 84px 11px 16px;border-radius:18px;border:1px solid var(--ms-outline);background:var(--ms-surface);box-shadow:var(--ms-shadow-soft);color:var(--ms-on-surface);cursor:pointer;font-size:inherit;line-height:1.45;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease,transform .16s ease}.stackline-dropdown.theme-material .selected-list .c-btn:hover,.stackline-dropdown.theme-dark .selected-list .c-btn:hover,.stackline-dropdown.theme-custom .selected-list .c-btn:hover{border-color:var(--ms-outline-strong)}.stackline-dropdown.theme-material .selected-list .c-btn.disabled,.stackline-dropdown.theme-dark .selected-list .c-btn.disabled,.stackline-dropdown.theme-custom .selected-list .c-btn.disabled{background:var(--ms-surface);cursor:not-allowed;opacity:.72}.stackline-dropdown.theme-material .selected-list .c-list,.stackline-dropdown.theme-dark .selected-list .c-list,.stackline-dropdown.theme-custom .selected-list .c-list{display:flex;flex:1 1 auto;flex-wrap:wrap;gap:8px;width:auto;min-width:0;margin:0;padding:0;float:none}.stackline-dropdown.theme-material .selected-list .c-list .c-token,.stackline-dropdown.theme-dark .selected-list .c-list .c-token,.stackline-dropdown.theme-custom .selected-list .c-list .c-token{position:relative;display:inline-block;vertical-align:middle;min-height:32px;max-width:100%;padding:6px 30px 6px 12px;background:var(--ms-chip-bg);color:var(--ms-chip-text);border-radius:999px;box-shadow:inset 0 0 0 1px #6750a414;line-height:1.35;white-space:normal;overflow-wrap:anywhere;margin:0;float:none}.stackline-dropdown.theme-material .selected-list .c-list .c-token .c-label,.stackline-dropdown.theme-dark .selected-list .c-list .c-token .c-label,.stackline-dropdown.theme-custom .selected-list .c-list .c-token .c-label{display:inline-flex;align-items:center;float:none;min-width:0;max-width:100%;line-height:1.3;font-weight:500;white-space:normal;overflow-wrap:anywhere}.stackline-dropdown.theme-material .selected-list .c-list .c-token .fa-remove,.stackline-dropdown.theme-dark .selected-list .c-list .c-token .fa-remove,.stackline-dropdown.theme-custom .selected-list .c-list .c-token .fa-remove{position:absolute;right:10px;top:50%;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:0;transform:translateY(-50%);color:var(--ms-chip-remove);cursor:pointer}.stackline-dropdown.theme-material .selected-list .countplaceholder,.stackline-dropdown.theme-dark .selected-list .countplaceholder,.stackline-dropdown.theme-custom .selected-list .countplaceholder{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;align-self:center;margin:0;line-height:1;color:var(--ms-on-surface-muted);font-size:.8rem;font-weight:600}.stackline-dropdown.theme-material .selected-list .fa-angle-down,.stackline-dropdown.theme-dark .selected-list .fa-angle-down,.stackline-dropdown.theme-custom .selected-list .fa-angle-down,.stackline-dropdown.theme-material .selected-list .fa-angle-up,.stackline-dropdown.theme-dark .selected-list .fa-angle-up,.stackline-dropdown.theme-custom .selected-list .fa-angle-up{position:absolute;top:50%;right:16px;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;transform:translateY(-50%);color:var(--ms-on-surface-muted);font-size:15pt;pointer-events:none}.stackline-dropdown.theme-material .dropdown-list,.stackline-dropdown.theme-dark .dropdown-list,.stackline-dropdown.theme-custom .dropdown-list{position:absolute;width:100%;padding-top:8px;z-index:99999}.stackline-dropdown.theme-material .arrow-up,.stackline-dropdown.theme-dark .arrow-up,.stackline-dropdown.theme-custom .arrow-up,.stackline-dropdown.theme-material .arrow-down,.stackline-dropdown.theme-dark .arrow-down,.stackline-dropdown.theme-custom .arrow-down,.stackline-dropdown.theme-material .arrow-2,.stackline-dropdown.theme-dark .arrow-2,.stackline-dropdown.theme-custom .arrow-2{display:none}.stackline-dropdown.theme-material .list-area,.stackline-dropdown.theme-dark .list-area,.stackline-dropdown.theme-custom .list-area{overflow:hidden;border-radius:22px;background:var(--ms-surface);border:1px solid var(--ms-outline);box-shadow:var(--ms-shadow);margin:0}.stackline-dropdown.theme-material .select-all,.stackline-dropdown.theme-dark .select-all,.stackline-dropdown.theme-custom .select-all{padding:10px 14px;border-bottom:1px solid var(--ms-divider);background:var(--ms-section-bg);text-align:left}.stackline-dropdown.theme-material .list-filter,.stackline-dropdown.theme-dark .list-filter,.stackline-dropdown.theme-custom .list-filter{position:relative;display:flex;align-items:center;min-height:52px;padding-left:48px;padding-right:44px;border-bottom:1px solid var(--ms-divider);background:var(--ms-surface)}.stackline-dropdown.theme-material .list-filter input,.stackline-dropdown.theme-dark .list-filter input,.stackline-dropdown.theme-custom .list-filter input{width:100%;height:100%;border:0;background:transparent;color:var(--ms-on-surface);font:inherit;padding:0}.stackline-dropdown.theme-material .list-filter input::placeholder,.stackline-dropdown.theme-dark .list-filter input::placeholder,.stackline-dropdown.theme-custom .list-filter input::placeholder{color:var(--ms-on-surface-muted)}.stackline-dropdown.theme-material .list-filter input:focus,.stackline-dropdown.theme-dark .list-filter input:focus,.stackline-dropdown.theme-custom .list-filter input:focus{outline:none}.stackline-dropdown.theme-material .list-filter .fa,.stackline-dropdown.theme-dark .list-filter .fa,.stackline-dropdown.theme-custom .list-filter .fa{position:absolute;top:50%;left:16px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;transform:translateY(-50%);color:var(--ms-on-surface-muted)}.stackline-dropdown.theme-material .dropdown-list ul,.stackline-dropdown.theme-dark .dropdown-list ul,.stackline-dropdown.theme-custom .dropdown-list ul{list-style:none;margin:0;padding:8px;overflow:auto}.stackline-dropdown.theme-material .dropdown-list ul li,.stackline-dropdown.theme-dark .dropdown-list ul li,.stackline-dropdown.theme-custom .dropdown-list ul li{align-items:center;min-height:0;margin:4px;padding:12px 14px;border-radius:14px;cursor:pointer;text-align:left;line-height:1.35;transition:background-color .16s ease,color .16s ease}.stackline-dropdown.theme-material .dropdown-list ul li:first-child,.stackline-dropdown.theme-dark .dropdown-list ul li:first-child,.stackline-dropdown.theme-custom .dropdown-list ul li:first-child{padding-top:12px}.stackline-dropdown.theme-material .dropdown-list ul li:last-child,.stackline-dropdown.theme-dark .dropdown-list ul li:last-child,.stackline-dropdown.theme-custom .dropdown-list ul li:last-child{padding-bottom:12px}.stackline-dropdown.theme-material .dropdown-list ul li:hover,.stackline-dropdown.theme-dark .dropdown-list ul li:hover,.stackline-dropdown.theme-custom .dropdown-list ul li:hover{background:var(--ms-surface-soft)}.stackline-dropdown.theme-material .pure-checkbox,.stackline-dropdown.theme-dark .pure-checkbox,.stackline-dropdown.theme-custom .pure-checkbox{position:relative}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]+label,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]+label,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]+label{position:relative;display:block;width:100%;margin:0;padding-left:32px;color:inherit;cursor:pointer;font-weight:500;-webkit-user-select:none;user-select:none}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]+label:before,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]+label:before,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]+label:before{box-sizing:content-box;content:\"\";position:absolute;top:50%;left:0;width:16px;height:16px;margin-top:-10px;border:2px solid var(--ms-outline-strong);border-radius:5px;background:var(--ms-surface);transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]+label:after,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]+label:after,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]+label:after{box-sizing:content-box;content:\"\";position:absolute;top:50%;left:5px;width:8px;height:3px;margin-top:-4px;border-style:solid;border-color:#fff;border-width:0 0 3px 3px;border-image:none;background:transparent;transform:rotate(-45deg) scale(0);transform-origin:50%;transition:transform .16s ease}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:focus+label:before,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:focus+label:before,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:focus+label:before,.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:hover+label:before,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:hover+label:before,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:hover+label:before{border-color:var(--ms-primary);background:var(--ms-surface-soft)}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:checked+label:before,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:checked+label:before,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:checked+label:before{border-color:var(--ms-primary);background:var(--ms-primary)}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:checked+label:after,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:checked+label:after,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:checked+label:after{transform:rotate(-45deg) scale(1)}.stackline-dropdown.theme-material .list-message,.stackline-dropdown.theme-dark .list-message,.stackline-dropdown.theme-custom .list-message{margin:0;padding:20px 14px;color:var(--ms-on-surface-muted);text-align:center}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i1.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i1.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => i2.DefaultValueAccessor), selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i0.forwardRef(() => i2.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i2.NgModel), selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i0.forwardRef(() => ClickOutsideDirective), selector: "[clickOutside]", outputs: ["clickOutside"] }, { kind: "directive", type: i0.forwardRef(() => styleDirective), selector: "[styleProp]", inputs: ["styleProp"] }, { kind: "component", type: i0.forwardRef(() => TemplateRenderer), selector: "c-templateRenderer", inputs: ["data", "item"] }, { kind: "pipe", type: i0.forwardRef(() => ListFilterPipe), name: "listFilter" }] });
2410
+ this.filterLength = len;
2411
+ }
2412
+ this.onFilterChange(this.filteredList);
2413
+ }
2414
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: AngularMultiSelect, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: ListFilterPipe }], target: i0.ɵɵFactoryTarget.Component });
2415
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "21.2.7", type: AngularMultiSelect, isStandalone: false, selector: "angular-multiselect, angular2-multiselect", inputs: { data: "data", settings: "settings", loading: "loading" }, outputs: { onSelect: "onSelect", onDeSelect: "onDeSelect", onSelectAll: "onSelectAll", onDeSelectAll: "onDeSelectAll", onOpen: "onOpen", onClose: "onClose", onScrollToEnd: "onScrollToEnd", onFilterSelectAll: "onFilterSelectAll", onFilterDeSelectAll: "onFilterDeSelectAll", onAddFilterNewItem: "onAddFilterNewItem", onGroupSelect: "onGroupSelect", onGroupDeSelect: "onGroupDeSelect" }, host: { listeners: { "document:keyup.escape": "onEscapeDown($event)", "window:scroll": "onScroll($event)" }, properties: { "class": "defaultSettings.classes" } }, providers: [DROPDOWN_CONTROL_VALUE_ACCESSOR, DROPDOWN_CONTROL_VALIDATION], queries: [{ propertyName: "itemTempl", first: true, predicate: Item, descendants: true }, { propertyName: "badgeTempl", first: true, predicate: Badge, descendants: true }, { propertyName: "searchTempl", first: true, predicate: Search, descendants: true }], viewQueries: [{ propertyName: "searchInput", first: true, predicate: ["searchInput"], descendants: true }, { propertyName: "selectedListElem", first: true, predicate: ["selectedList"], descendants: true }, { propertyName: "dropdownListElem", first: true, predicate: ["dropdownList"], descendants: true }, { propertyName: "stacklineDropdown", first: true, predicate: ["stacklineDropdown"], descendants: true }, { propertyName: "virtualScroller", first: true, predicate: VirtualScrollerComponent, descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"stackline-dropdown\" [ngClass]=\"getDropdownClasses()\" (clickOutside)=\"closeDropdownOnClickOut()\" #stacklineDropdown>\n <div class=\"selected-list\" #selectedList>\n <div class=\"c-btn\"\n (click)=\"toggleDropdown($event)\"\n [ngClass]=\"{'disabled': settings.disabled, 'is-active': isActive, 'has-selection': selectedItems?.length > 0, 'single-select-mode': settings.singleSelection}\"\n [attr.tabindex]=\"0\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isActive\"\n [attr.aria-disabled]=\"settings.disabled\">\n\n <span class=\"c-placeholder\" *ngIf=\"selectedItems?.length == 0\">{{settings.text}}</span>\n <span class=\"c-single-value\" *ngIf=\"settings.singleSelection && !badgeTempl\">\n <span *ngFor=\"let item of selectedItems;trackBy: trackByFn.bind(this);let k = index\">\n {{item[settings.labelKey]}}\n </span>\n </span>\n <span class=\"c-list c-chip-list\" *ngIf=\"selectedItems?.length > 0 && settings.singleSelection && badgeTempl \">\n <div class=\"c-token\" *ngFor=\"let item of selectedItems;trackBy: trackByFn.bind(this);let k = index\">\n <span *ngIf=\"!badgeTempl\" class=\"c-label\">{{item[settings.labelKey]}}</span>\n\n <span *ngIf=\"badgeTempl\" class=\"c-label\">\n <c-templateRenderer [data]=\"badgeTempl\" [item]=\"item\"></c-templateRenderer>\n </span>\n <span class=\"c-remove\" (click)=\"onItemClick(item,k,$event);$event.stopPropagation()\">\n <c-icon [name]=\"'remove'\"></c-icon>\n </span>\n </div>\n </span>\n <div class=\"c-list c-chip-list\" *ngIf=\"selectedItems?.length > 0 && !settings.singleSelection\">\n <div class=\"c-token\" *ngFor=\"let item of selectedItems;trackBy: trackByFn.bind(this);let k = index\" [hidden]=\"k > settings.badgeShowLimit-1\">\n <span *ngIf=\"!badgeTempl\" class=\"c-label\">{{item[settings.labelKey]}}</span>\n <span *ngIf=\"badgeTempl\" class=\"c-label\">\n <c-templateRenderer [data]=\"badgeTempl\" [item]=\"item\"></c-templateRenderer>\n </span>\n <span class=\"c-remove\" (click)=\"onItemClick(item,k,$event);$event.stopPropagation()\">\n <c-icon [name]=\"'remove'\"></c-icon>\n </span>\n </div>\n </div>\n <span class=\"countplaceholder\" *ngIf=\"selectedItems?.length > settings.badgeShowLimit\">+{{selectedItems?.length - settings.badgeShowLimit }}</span>\n <span class=\"c-remove clear-all\" *ngIf=\"settings.clearAll && selectedItems?.length > 0 && !settings.disabled\" (click)=\"clearSelection($event);$event.stopPropagation()\">\n <c-icon [name]=\"'remove'\"></c-icon>\n </span>\n <span *ngIf=\"!isActive\" class=\"c-angle-down\">\n <c-icon [name]=\"'angle-down'\"></c-icon>\n </span>\n <span *ngIf=\"isActive\" class=\"c-angle-up\">\n <c-icon [name]=\"'angle-up'\"></c-icon>\n\n </span>\n </div>\n </div>\n <div #dropdownList class=\"dropdown-list animated fadeIn\"\n [ngClass]=\"{'tagToBody': settings.tagToBody}\"\n [style.width.px]=\"dropDownWidth\" \n [style.top]=\"dropDownTop\" \n [style.bottom]=\"dropDownBottom\"\n [style.left.px]=\"dropDownLeft\" \n role=\"presentation\"\n [attr.aria-hidden]=\"!isActive\"\n [hidden]=\"!isActive\">\n <div [ngClass]=\"{'arrow-up': settings.position == 'bottom', 'arrow-down': settings.position == 'top'}\" class=\"arrow-2\"></div>\n <div [ngClass]=\"{'arrow-up': settings.position == 'bottom', 'arrow-down': settings.position == 'top'}\"></div>\n <div class=\"list-area\" [ngClass]=\"{'single-select-mode': settings.singleSelection }\">\n <div class=\"pure-checkbox select-all\" *ngIf=\"settings.enableCheckAll && !settings.singleSelection && !settings.limitSelection && data?.length > 0 && !isDisabledItemPresent\"\n >\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelectAll\" [disabled]=\"settings.limitSelection == selectedItems?.length\"\n [id]=\"id\" (change)=\"toggleSelectAll($event)\"/>\n <label [for]=\"id\">\n <span [hidden]=\"isSelectAll\">{{settings.selectAllText}}</span>\n <span [hidden]=\"!isSelectAll\">{{settings.unSelectAllText}}</span>\n </label>\n </div>\n <img class=\"loading-icon\" *ngIf=\"loading\" src=\"assets/img/loading.gif\" />\n <div class=\"list-filter\" *ngIf=\"settings.enableSearchFilter\">\n <span class=\"c-search\" id=\"searchIcon\">\n <c-icon [name]=\"'search'\"></c-icon>\n </span>\n <span *ngIf=\"!settings.lazyLoading\" [hidden]=\"filter == undefined || filter?.length == 0\" class=\"c-clear\" (click)=\"clearSearch()\">\n <c-icon [name]=\"'clear'\"></c-icon>\n </span>\n <span *ngIf=\"settings.lazyLoading\" [hidden]=\"filter == undefined || filter?.length == 0\" class=\"c-clear\" (click)=\"resetInfiniteSearch()\">\n <c-icon [name]=\"'clear'\"></c-icon>\n </span>\n\n <input class=\"c-input\" *ngIf=\"settings.groupBy && !settings.lazyLoading && !searchTempl\" #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\"\n [(ngModel)]=\"filter\" (keyup)=\"filterGroupedList()\" aria-labelledby=\"searchIcon\">\n <input class=\"c-input\" *ngIf=\"!settings.groupBy && !settings.lazyLoading && !searchTempl\" #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\"\n [(ngModel)]=\"filter\" (keyup)=\"filteritems($event)\" aria-labelledby=\"searchIcon\">\n <input class=\"c-input\" *ngIf=\"settings.lazyLoading && !searchTempl\" #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\"\n [(ngModel)]=\"filter\" (keyup)=\"onKeyUp($event)\" aria-labelledby=\"searchIcon\">\n <!-- <input class=\"c-input\" *ngIf=\"!settings.lazyLoading && !searchTempl && settings.groupBy\" #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\"\n [(ngModel)]=\"filter\" (keyup)=\"filterGroupList($event)\">-->\n <c-templateRenderer *ngIf=\"searchTempl\" [data]=\"searchTempl\" [item]=\"item\"></c-templateRenderer>\n </div>\n <div class=\"filter-select-all\" *ngIf=\"!settings.lazyLoading && settings.enableFilterSelectAll && !isDisabledItemPresent\">\n <div class=\"pure-checkbox select-all\" *ngIf=\"!settings.groupBy && filter?.length > 0 && filterLength > 0 && !settings.singleSelection\" (click)=\"toggleFilterSelectAll()\">\n <input type=\"checkbox\" [checked]=\"isFilterSelectAll\" [disabled]=\"settings.limitSelection == selectedItems?.length\" aria-labelledby=\"optionName\"\n aria-label=\"option\"/>\n <label>\n <span [hidden]=\"isFilterSelectAll\">{{settings.filterSelectAllText}}</span>\n <span [hidden]=\"!isFilterSelectAll\">{{settings.filterUnSelectAllText}}</span>\n </label>\n </div>\n <div class=\"pure-checkbox select-all\" *ngIf=\"settings.groupBy && filter?.length > 0 && groupedData?.length > 0 && !settings.singleSelection\" (click)=\"toggleFilterSelectAll()\">\n <input type=\"checkbox\" [checked]=\"isFilterSelectAll && filter?.length > 0\" [disabled]=\"settings.limitSelection == selectedItems?.length\"\n aria-labelledby=\"option\"/>\n <label>\n <span [hidden]=\"isFilterSelectAll\">{{settings.filterSelectAllText}}</span>\n <span [hidden]=\"!isFilterSelectAll\">{{settings.filterUnSelectAllText}}</span>\n </label>\n </div>\n </div>\n <div class=\"filter-select-all\" *ngIf=\"settings.lazyLoading && settings.enableFilterSelectAll && !isDisabledItemPresent && !settings.singleSelection\">\n <div class=\"pure-checkbox select-all\" *ngIf=\"filter?.length > 0 && infiniteFilterLength > 0\" (click)=\"toggleInfiniteFilterSelectAll()\">\n <input type=\"checkbox\" [checked]=\"isInfiniteFilterSelectAll\" [disabled]=\"settings.limitSelection == selectedItems?.length\"\n aria-labelledby=\"option\"/>\n <label>\n <span [hidden]=\"isInfiniteFilterSelectAll\">{{settings.filterSelectAllText}}</span>\n <span [hidden]=\"!isInfiniteFilterSelectAll\">{{settings.filterUnSelectAllText}}</span>\n </label>\n </div>\n </div>\n <div class=\"filter-select-all\" *ngIf=\"filter?.length\">\n <div class=\"btn-container\" *ngIf=\"settings.addNewItemOnFilter\">\n <button class=\"c-btn btn-iceblue\" (click)=\"addFilterNewItem()\">{{settings.addNewButtonText}}</button>\n </div>\n </div>\n\n <div *ngIf=\"!settings.groupBy && !settings.lazyLoading && itemTempl == undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul class=\"lazyContainer\">\n <li *ngFor=\"let item of data; let i = index;\" (click)=\"onItemClick(item,i,$event)\"\n class=\"pure-checkbox\" [ngClass]=\"{'selected-item': isSelected(item) == true }\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n aria-labelledby=\"option\"/>\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </ul>\n </div>\n <!-- lazy loading -->\n <div *ngIf=\"!settings.groupBy && settings.lazyLoading && itemTempl == undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul virtualScroller #scroll [enableUnequalChildrenSizes]=\"randomSize\" [items]=\"virtualdata\" (vsStart)=\"onScrollEnd($event)\"\n (vsEnd)=\"onScrollEnd($event)\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\" class=\"lazyContainer\">\n <li *ngFor=\"let item of scroll.viewPortItems; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\"\n [ngClass]=\"{'selected-item': isSelected(item) == true }\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </ul>\n </div>\n <!-- custom template -->\n <div *ngIf=\"!settings.groupBy && !settings.lazyLoading && itemTempl != undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul class=\"lazyContainer\">\n <li *ngFor=\"let item of data; let i = index;\" (click)=\"onItemClick(item,i,$event)\"\n class=\"pure-checkbox\" [ngClass]=\"{'selected-item': isSelected(item) == true }\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </ul>\n </div>\n <!-- lazy loading and custom template -->\n <div *ngIf=\"!settings.groupBy && settings.lazyLoading && itemTempl != undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul virtualScroller #scroll2 [enableUnequalChildrenSizes]=\"randomSize\" [items]=\"virtualdata\" (vsStart)=\"onScrollEnd($event)\"\n (vsEnd)=\"onScrollEnd($event)\" class=\"lazyContainer\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\">\n <li *ngFor=\"let item of scroll2.viewPortItems; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\"\n [ngClass]=\"{'selected-item': isSelected(item) == true }\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </ul>\n </div>\n <!-- lazy loading, group By and custom template -->\n <div *ngIf=\"settings.groupBy && settings.lazyLoading && itemTempl != undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul virtualScroller #scroll3 [enableUnequalChildrenSizes]=\"randomSize\" [items]=\"virtualdata\" (vsStart)=\"onScrollEnd($event)\"\n (vsEnd)=\"onScrollEnd($event)\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\" class=\"lazyContainer\">\n <span *ngFor=\"let item of scroll3.viewPortItems; let i = index;\">\n <li (click)=\"onItemClick(item,i,$event)\" *ngIf=\"!item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !settings.singleSelection\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n <li *ngIf=\"item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </span>\n </ul>\n </div>\n <!-- group By and custom template -->\n <div *ngIf=\"settings.groupBy && !settings.lazyLoading && itemTempl != undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul class=\"lazyContainer\">\n <span *ngFor=\"let item of groupedData; let i = index;\">\n <li (click)=\"selectGroup(item)\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !settings.singleSelection\" type=\"checkbox\" [checked]=\"item.selected\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n <ul class=\"lazyContainer\">\n <span *ngFor=\"let val of item.list ; let j = index;\">\n <li (click)=\"onItemClick(val,j,$event); $event.stopPropagation()\" [ngClass]=\"{'grp-title': val.grpTitle,'grp-item': !val.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(val)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(val)) || val.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"val\"></c-templateRenderer>\n </li>\n </span>\n </ul>\n\n </li>\n </span>\n </ul>\n </div>\n <!-- lazy loading, group By -->\n <div *ngIf=\"settings.groupBy && settings.lazyLoading && itemTempl == undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <virtual-scroller [items]=\"groupedData\" (vsUpdate)=\"viewPortItems = $event\" (vsEnd)=\"onScrollEnd($event)\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\">\n <ul virtualScroller #scroll4 [enableUnequalChildrenSizes]=\"randomSize\" [items]=\"virtualdata\" (vsStart)=\"onScrollEnd($event)\"\n (vsEnd)=\"onScrollEnd($event)\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\" class=\"lazyContainer\">\n <span *ngFor=\"let item of scroll4.viewPortItems; let i = index;\">\n <li *ngIf=\"item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection, 'selected-item': isSelected(item) == true }\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !item.grpTitle && !settings.singleSelection\" type=\"checkbox\" [checked]=\"isSelected(item)\"\n [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n <li (click)=\"onItemClick(item,i,$event)\" *ngIf=\"!item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection, 'selected-item': isSelected(item) == true }\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !item.grpTitle\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </span>\n </ul>\n </virtual-scroller>\n </div>\n <!-- group By -->\n <div *ngIf=\"settings.groupBy && !settings.lazyLoading && itemTempl == undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul class=\"lazyContainer\">\n <span *ngFor=\"let item of groupedData ; let i = index;\">\n <li (click)=\"selectGroup(item)\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !settings.singleSelection\" type=\"checkbox\" [checked]=\"item.selected\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n <ul class=\"lazyContainer\">\n <span *ngFor=\"let val of item.list ; let j = index;\">\n <li (click)=\"onItemClick(val,j,$event); $event.stopPropagation()\" [ngClass]=\"{'selected-item': isSelected(val) == true,'grp-title': val.grpTitle,'grp-item': !val.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(val)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(val)) || val.disabled\"\n />\n <label>{{val[settings.labelKey]}}</label>\n </li>\n </span>\n </ul>\n </li>\n </span>\n <!-- <span *ngFor=\"let item of groupedData ; let i = index;\">\n <li (click)=\"onItemClick(item,i,$event)\" *ngIf=\"!item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle}\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !item.grpTitle\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n <li *ngIf=\"item.grpTitle && !settings.selectGroup\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle}\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && settings.selectGroup\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n <li (click)=\"selectGroup(item)\" *ngIf=\"item.grpTitle && settings.selectGroup\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle}\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && settings.selectGroup\" type=\"checkbox\" [checked]=\"item.selected\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </span> -->\n </ul>\n </div>\n <h5 class=\"list-message\" *ngIf=\"data?.length == 0\">{{settings.noDataLabel}}</h5>\n </div>\n </div>\n</div>\n", styles: ["virtual-scroll{display:block;width:100%}.stackline-dropdown{--ms-primary: #3f51b5;--ms-primary-soft: rgba(63, 81, 181, .12);--ms-surface: #ffffff;--ms-surface-soft: #f5f7fb;--ms-surface-muted: #e8eaf6;--ms-outline: #c5cae9;--ms-outline-strong: #7986cb;--ms-on-surface: #212121;--ms-on-surface-muted: #5f6368;--ms-chip-bg: #e8eaf6;--ms-chip-text: #303f9f;--ms-chip-remove: #303f9f;--ms-shadow: 0 1px 2px rgba(33, 33, 33, .16), 0 12px 32px rgba(63, 81, 181, .12);--ms-shadow-soft: 0 1px 2px rgba(33, 33, 33, .12), 0 4px 12px rgba(33, 33, 33, .08);position:relative;display:block;width:100%;color:var(--ms-on-surface);font:inherit}.selected-list{width:100%}.c-btn{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:8px;width:100%;min-height:56px;padding:11px 54px 11px 16px;border-radius:18px;border:1px solid var(--ms-outline);background:var(--ms-surface);box-shadow:var(--ms-shadow-soft);cursor:pointer;line-height:1.45;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease,transform .16s ease}.c-btn:hover{border-color:var(--ms-outline-strong)}.c-btn.is-active{border-color:var(--ms-primary);box-shadow:0 0 0 3px #6750a424,var(--ms-shadow-soft)}.c-btn.disabled{cursor:not-allowed;opacity:.72}.c-placeholder,.c-single-value{color:var(--ms-on-surface-muted);font-size:.95rem}.c-btn.has-selection .c-single-value,.c-btn.has-selection .c-placeholder{color:var(--ms-on-surface);font-weight:500}.c-list{display:flex;flex:1 1 auto;flex-wrap:wrap;gap:8px;margin:0;padding:0;min-width:0}.c-chip-list{padding-right:8px}.c-token{position:relative;display:inline-block;vertical-align:middle;min-height:32px;max-width:100%;padding:6px 30px 6px 12px;border-radius:999px;background:var(--ms-chip-bg);color:var(--ms-chip-text);box-shadow:inset 0 0 0 1px #6750a414;line-height:1.35;white-space:normal;overflow-wrap:anywhere}.c-token .c-label{display:inline-flex;align-items:center;min-width:0;max-width:100%;line-height:1.3;font-weight:500;white-space:normal;overflow-wrap:anywhere}.c-remove{position:absolute;right:10px;top:50%;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;transform:translateY(-50%);color:var(--ms-chip-remove)}.c-remove svg,.c-angle-down svg,.c-angle-up svg{fill:currentColor}.clear-all{position:absolute;top:50%;right:42px;width:20px;height:20px;transform:translateY(-50%);color:var(--ms-on-surface-muted)}.countplaceholder{position:absolute;top:50%;right:76px;transform:translateY(-50%);color:var(--ms-on-surface-muted);font-size:.8rem;font-weight:600}.c-angle-down,.c-angle-up{position:absolute;top:50%;right:16px;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;transform:translateY(-50%);color:var(--ms-on-surface-muted);pointer-events:none}.dropdown-list{position:absolute;width:100%;padding-top:8px;z-index:99999}.dropdown-list.tagToBody{position:fixed}.arrow-up,.arrow-down,.arrow-2{display:none}.list-area{overflow:hidden;border-radius:22px;background:var(--ms-surface);border:1px solid var(--ms-outline);box-shadow:var(--ms-shadow)}.select-all,.filter-select-all{padding:10px 14px;border-bottom:1px solid rgba(125,119,134,.16);background:#f7f2fac2}.list-filter{position:relative;display:flex;align-items:center;min-height:52px;padding-left:48px;padding-right:44px;border-bottom:1px solid rgba(125,119,134,.16);background:var(--ms-surface)}.list-filter .c-input,.list-filter input{width:100%;height:100%;border:0;background:transparent;color:var(--ms-on-surface);font:inherit}.list-filter .c-input::placeholder,.list-filter input::placeholder{color:var(--ms-on-surface-muted)}.list-filter .c-input:focus,.list-filter input:focus{outline:none}.list-filter .c-search,.list-filter .c-clear{position:absolute;top:50%;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;transform:translateY(-50%);color:var(--ms-on-surface-muted)}.list-filter .c-search{left:16px}.list-filter .c-clear{right:16px;cursor:pointer}.btn-container{padding:10px 14px 14px;text-align:center}.btn-iceblue{width:100%;min-height:40px;border-radius:999px;border:1px solid transparent;background:var(--ms-primary);color:#fff;font-weight:600}.dropdown-list ul{list-style:none;margin:0;padding:8px;overflow:auto}.dropdown-list ul li{align-items:center;min-height:0;margin:4px;padding:12px 14px;border-radius:14px;cursor:pointer;text-align:left;line-height:1.35;transition:background-color .16s ease,color .16s ease}.dropdown-list ul li:hover{background:var(--ms-surface-soft)}.selected-item{background:var(--ms-primary-soft)!important;color:var(--ms-primary)}.selected-item:hover{background:#6750a42e!important}.grp-item{padding-left:42px!important}.grp-title{margin-top:6px;padding-top:10px!important;padding-bottom:8px!important;background:transparent!important;color:var(--ms-on-surface-muted);cursor:default!important}.grp-title label{margin-bottom:0!important;font-size:.74rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.grp-title:hover{background:transparent!important}.pure-checkbox{position:relative}.pure-checkbox input[type=checkbox]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pure-checkbox input[type=checkbox]+label{position:relative;display:block;width:100%;margin:0;padding-left:32px;color:inherit;cursor:pointer;font-weight:500;-webkit-user-select:none;user-select:none}.pure-checkbox input[type=checkbox]+label:before{box-sizing:content-box;content:\"\";position:absolute;top:50%;left:0;width:18px;height:18px;margin-top:-10px;border:2px solid var(--ms-outline-strong);border-radius:6px;background:var(--ms-surface);transition:all .18s ease}.pure-checkbox input[type=checkbox]+label:after{box-sizing:content-box;content:\"\";position:absolute;top:50%;left:5px;width:7px;height:3px;margin-top:-3px;border-style:solid;border-width:0 0 2px 2px;border-color:#fff;transform:rotate(-45deg) scale(0);transform-origin:50%;transition:transform .16s ease-out}.pure-checkbox input[type=checkbox]:focus+label:before,.pure-checkbox input[type=checkbox]:hover+label:before{border-color:var(--ms-primary);box-shadow:0 0 0 4px #3f51b51f}.pure-checkbox input[type=checkbox]:checked+label:before{border-color:var(--ms-primary);background:var(--ms-primary)}.pure-checkbox input[type=checkbox]:checked+label:after{transform:rotate(-45deg) scale(1)}.pure-checkbox input[type=checkbox]:disabled+label{color:#b1acb8;cursor:not-allowed}.pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#d5d0db;background:#f2edf7;box-shadow:none}.single-select-mode .pure-checkbox input[type=checkbox]+label:before,.single-select-mode .pure-checkbox input[type=checkbox]+label:after{opacity:0}.single-select-mode .pure-checkbox input[type=checkbox]+label{padding-left:0}.list-message,.nodata-label{margin:0;padding:22px 16px 24px;color:var(--ms-on-surface-muted);text-align:center;font-size:.95rem;font-weight:500}.list-grp{padding:0 15px!important}.list-grp h4{margin:16px 0 6px;color:var(--ms-on-surface);font-size:.76rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.list-grp>li{padding-left:15px!important}.loading-icon{position:absolute;top:18px;right:16px;width:18px;z-index:2}.dropdown-list ::-webkit-scrollbar{width:10px}.dropdown-list ::-webkit-scrollbar-thumb{background:#7d778657;border-radius:999px;border:2px solid transparent;background-clip:padding-box}.dropdown-list ::-webkit-scrollbar-track{background:transparent}.stackline-dropdown.theme-dark{--ms-primary: #8ab4f8;--ms-primary-soft: rgba(138, 180, 248, .18);--ms-surface: #151a23;--ms-surface-soft: #202736;--ms-surface-muted: #111722;--ms-outline: #384456;--ms-outline-strong: #8ab4f8;--ms-on-surface: #edf2f7;--ms-on-surface-muted: #aab6c5;--ms-chip-bg: #263247;--ms-chip-text: #d7e6ff;--ms-chip-remove: #d7e6ff;--ms-shadow: 0 20px 50px rgba(0, 0, 0, .42);--ms-shadow-soft: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 24px rgba(0, 0, 0, .28)}.stackline-dropdown.theme-custom{--ms-primary: var(--stackline-ms-primary, #0f766e);--ms-primary-soft: var(--stackline-ms-primary-soft, rgba(15, 118, 110, .14));--ms-surface: var(--stackline-ms-surface, #ffffff);--ms-surface-soft: var(--stackline-ms-surface-soft, #ecfdf5);--ms-surface-muted: var(--stackline-ms-surface-muted, #d1fae5);--ms-outline: var(--stackline-ms-outline, #99f6e4);--ms-outline-strong: var(--stackline-ms-outline-strong, #0f766e);--ms-on-surface: var(--stackline-ms-on-surface, #102a2a);--ms-on-surface-muted: var(--stackline-ms-on-surface-muted, #47615f);--ms-chip-bg: var(--stackline-ms-chip-bg, #ccfbf1);--ms-chip-text: var(--stackline-ms-chip-text, #115e59);--ms-chip-remove: var(--stackline-ms-chip-remove, #115e59);--ms-shadow: var(--stackline-ms-shadow, 0 18px 42px rgba(15, 118, 110, .15));--ms-shadow-soft: var(--stackline-ms-shadow-soft, 0 1px 2px rgba(15, 118, 110, .16), 0 8px 18px rgba(15, 118, 110, .09))}.stackline-dropdown.theme-classic{--ms-primary: #0079fe;--ms-primary-soft: #e9f4ff;--ms-surface: #ffffff;--ms-surface-soft: #f5f5f5;--ms-outline: #cccccc;--ms-outline-strong: #0079fe;--ms-on-surface: #333333;--ms-on-surface-muted: #333333;--ms-chip-bg: #0079fe;--ms-chip-text: #ffffff;--ms-chip-remove: #ffffff;--ms-shadow: 0 1px 5px #959595;--ms-shadow-soft: 0 1px 5px #959595;color:#333}.stackline-dropdown.theme-classic .selected-list{width:100%}.stackline-dropdown.theme-classic .c-btn{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-height:42px;padding:10px 68px 10px 10px;border:1px solid #cccccc;border-radius:3px;background:#fff;box-shadow:0 1px 5px #959595;color:#333;font-size:14px;line-height:1.35}.stackline-dropdown.theme-classic .c-btn.is-active,.stackline-dropdown.theme-classic .c-btn:hover{border-color:#ccc;box-shadow:0 1px 5px #959595}.stackline-dropdown.theme-classic .c-btn.disabled{background:#ccc;opacity:1}.stackline-dropdown.theme-classic .c-placeholder,.stackline-dropdown.theme-classic .c-single-value{color:#333;font-size:14px}.stackline-dropdown.theme-classic .c-list{display:flex;flex:1 1 auto;align-items:center;flex-wrap:wrap;gap:4px;width:auto;min-width:0;margin:0;padding:0}.stackline-dropdown.theme-classic .c-chip-list{padding-right:0}.stackline-dropdown.theme-classic .c-token{display:inline-block;min-height:0;margin:2px 0 0;padding:2px 24px 2px 6px;border-radius:2px;background:#0079fe;box-shadow:none;color:#fff;line-height:1.4}.stackline-dropdown.theme-classic .c-token .c-label{display:inline;color:#fff;font-size:14px;font-weight:400;line-height:1.4}.stackline-dropdown.theme-classic .c-remove{right:5px;width:14px;height:14px;color:#fff}.stackline-dropdown.theme-classic .clear-all{right:42px;width:18px;height:18px;color:#333}.stackline-dropdown.theme-classic .countplaceholder{right:76px;color:#333;font-size:14px;font-weight:400}.stackline-dropdown.theme-classic .c-angle-down,.stackline-dropdown.theme-classic .c-angle-up{right:10px;width:20px;height:20px;color:#333}.stackline-dropdown.theme-classic .dropdown-list{padding-top:14px;z-index:9999}.stackline-dropdown.theme-classic .arrow-up{display:block;position:absolute;top:0;width:0;height:0;margin-left:15px;border-right:13px solid transparent;border-bottom:15px solid #ffffff;border-left:13px solid transparent}.stackline-dropdown.theme-classic .arrow-2{top:-1px;border-bottom-color:#ccc}.stackline-dropdown.theme-classic .arrow-down{display:block;position:absolute;bottom:0;width:0;height:0;margin-left:15px;border-right:13px solid transparent;border-top:15px solid #ffffff;border-left:13px solid transparent}.stackline-dropdown.theme-classic .arrow-down.arrow-2{border-top-color:#ccc}.stackline-dropdown.theme-classic .list-area{overflow:hidden;margin:0;border:1px solid #cccccc;border-radius:3px;background:#fff;box-shadow:0 1px 5px #959595}.stackline-dropdown.theme-classic .select-all,.stackline-dropdown.theme-classic .filter-select-all{padding:10px;border-bottom:1px solid #cccccc;background:#fff}.stackline-dropdown.theme-classic .list-filter{display:block;min-height:35px;padding:0;border-bottom:1px solid #cccccc;background:#fff}.stackline-dropdown.theme-classic .list-filter .c-input,.stackline-dropdown.theme-classic .list-filter input{height:35px;padding:0 35px;color:#333}.stackline-dropdown.theme-classic .list-filter .c-search{left:13px}.stackline-dropdown.theme-classic .list-filter .c-clear{right:13px}.stackline-dropdown.theme-classic .btn-container{padding:10px}.stackline-dropdown.theme-classic .btn-iceblue{min-height:35px;border-radius:3px;background:#0079fe}.stackline-dropdown.theme-classic .dropdown-list ul{margin:0;padding:0}.stackline-dropdown.theme-classic .dropdown-list ul li{min-height:0;margin:0;padding:10px;border-radius:0;color:#333;line-height:1.35}.stackline-dropdown.theme-classic .dropdown-list ul li:hover{background:#f5f5f5}.stackline-dropdown.theme-classic .selected-item,.stackline-dropdown.theme-classic .selected-item:hover{background:#e9f4ff!important;color:#333}.stackline-dropdown.theme-classic .grp-item{padding-left:30px!important}.stackline-dropdown.theme-classic .grp-title{color:#000}.stackline-dropdown.theme-classic .grp-title label,.stackline-dropdown.theme-classic .list-grp h4{font-size:14px;font-weight:700;letter-spacing:0;text-transform:capitalize}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]+label{padding-left:2em;color:#000;font-weight:300}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]+label:before{width:14px;height:14px;margin-top:-9px;border:2px solid #0079fe;border-radius:0;background:#fff}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]+label:after{top:50%;left:4px;width:8px;height:3px;margin-top:-4px;border-width:0 0 3px 3px;border-color:#fff;background:transparent}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]:focus+label:before,.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]:hover+label:before{border-color:#0079fe;background-color:#f2f2f2;box-shadow:none}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]:checked+label:before{border-color:#0079fe;background:#0079fe}.stackline-dropdown.theme-classic .single-select-mode .pure-checkbox input[type=checkbox]+label{padding-left:0}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(() => i2.NgClass), selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgForOf), selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgIf), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i0.forwardRef(() => i2.NgStyle), selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i0.forwardRef(() => i3.DefaultValueAccessor), selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i0.forwardRef(() => i3.NgControlStatus), selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i0.forwardRef(() => i3.NgModel), selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: i0.forwardRef(() => VirtualScrollerComponent), selector: "virtual-scroller,[virtualScroller]", inputs: ["executeRefreshOutsideAngularZone", "enableUnequalChildrenSizes", "useMarginInsteadOfTranslate", "modifyOverflowStyleOfParentScroll", "stripedTable", "scrollbarWidth", "scrollbarHeight", "childWidth", "childHeight", "ssrChildWidth", "ssrChildHeight", "ssrViewportWidth", "ssrViewportHeight", "bufferAmount", "scrollAnimationTime", "resizeBypassRefreshThreshold", "scrollThrottlingTime", "scrollDebounceTime", "checkResizeInterval", "items", "compareItems", "horizontal", "parentScroll"], outputs: ["vsUpdate", "vsChange", "vsStart", "vsEnd"], exportAs: ["virtualScroller"] }, { kind: "directive", type: i0.forwardRef(() => ClickOutsideDirective), selector: "[clickOutside]", outputs: ["clickOutside"] }, { kind: "component", type: i0.forwardRef(() => TemplateRenderer), selector: "c-templateRenderer", inputs: ["data", "item"] }, { kind: "component", type: i0.forwardRef(() => CIcon), selector: "c-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None });
564
2416
  }
565
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AngularMultiSelect, decorators: [{
2417
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: AngularMultiSelect, decorators: [{
566
2418
  type: Component,
567
- args: [{ standalone: false, selector: 'angular-multiselect, angular2-multiselect', template: "<div class=\"stackline-dropdown\" [ngClass]=\"getDropdownClasses()\" (clickOutside)=\"closeDropdown()\">\n <div class=\"selected-list\">\n <div class=\"c-btn\" (click)=\"toggleDropdown($event)\" [ngClass]=\"{'disabled': settings.disabled}\">\n <span *ngIf=\"selectedItems?.length == 0\">{{settings.text}}</span>\n <span *ngIf=\"settings.singleSelection\">\n <span *ngFor=\"let item of selectedItems;trackBy: trackByFn;\">\n {{item[settings.labelKey]}}\n </span>\n </span>\n <div class=\"c-list\" *ngIf=\"selectedItems?.length > 0 && !settings.singleSelection\">\n <div class=\"c-token\" *ngFor=\"let item of selectedItems;trackBy: trackByFn;let k = index\" [hidden]=\"k > settings.badgeShowLimit-1\">\n <span *ngIf=\"!badgeTempl\" class=\"c-label\">{{item[settings.labelKey]}}</span>\n <span *ngIf=\"badgeTempl\" class=\"c-label\">\n <c-templateRenderer [data]=\"badgeTempl\" [item]=\"item\"></c-templateRenderer>\n </span>\n <span class=\"fa fa-remove\" (click)=\"onItemClick(item,k,$event)\"></span>\n </div>\n </div> \n <span class=\"countplaceholder\" *ngIf=\"selectedItems?.length > settings.badgeShowLimit\">+{{selectedItems?.length - settings.badgeShowLimit }}</span>\n <span class=\"fa fa-remove clear-all\" *ngIf=\"settings.clearAll && selectedItems?.length > 0 && !settings.disabled\" (click)=\"clearSelection($event);$event.stopPropagation()\"></span>\n <span class=\"fa\" [ngClass]=\"{'fa-angle-down': !isActive,'fa-angle-up':isActive}\"></span>\n </div> \n </div>\n <div class=\"dropdown-list\" [hidden]=\"!isActive\">\n <div class=\"arrow-up arrow-2\"></div>\n <div class=\"arrow-up\"></div>\n <div class=\"list-area\">\n <div class=\"pure-checkbox select-all\" *ngIf=\"settings.enableCheckAll && !settings.singleSelection && !settings.limitSelection\" (click)=\"toggleSelectAll()\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelectAll\" [disabled]=\"settings.limitSelection == selectedItems?.length\"/>\n <label>\n <span [hidden]=\"isSelectAll\">{{settings.selectAllText}}</span>\n <span [hidden]=\"!isSelectAll\">{{settings.unSelectAllText}}</span>\n </label>\n </div> \n <div class=\"list-filter\" *ngIf=\"settings.enableSearchFilter && !settings.lazyLoading\">\n <span class=\"fa fa-search\"></span>\n <input #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\" [(ngModel)]=\"filter\">\n </div> \n <div class=\"list-filter\" *ngIf=\"settings.enableSearchFilter && settings.lazyLoading\">\n <span class=\"fa fa-search\"></span>\n <input #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\" (keyup)=\"filterInfiniteList($event)\">\n </div>\n <ul *ngIf=\"!settings.groupBy\" [style.maxHeight] = \"settings.maxHeight+'px'\" class=\"lazyContainer\" >\n <span *ngIf=\"itemTempl\">\n <li *ngFor=\"let item of data | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </span>\n <span *ngIf=\"!itemTempl && !settings.lazyLoading\" >\n <li *ngFor=\"let item of data | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </span>\n <span *ngIf=\"!itemTempl && settings.lazyLoading\" >\n <div [ngStyle]=\"{'height':totalHeight+'px'}\" style=\"position: relative;\">\n\n \n <li *ngFor=\"let item of chunkArray | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" style=\"position: absolute;width: 100%;\" class=\"pure-checkbox\" [styleProp]=\"chunkIndex[i]\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </div>\n </span>\n </ul>\n <div *ngIf=\"settings.groupBy\" [style.maxHeight] = \"settings.maxHeight+'px'\" style=\"overflow: auto;\">\n <ul *ngFor=\"let obj of groupedData ; let i = index;\" class=\"list-grp\">\n <h4 *ngIf=\"(obj.value | listFilter:filter ).length > 0\">{{obj.key}}</h4>\n <span *ngIf=\"itemTempl\" >\n <li *ngFor=\"let item of obj.value | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </span>\n <span *ngIf=\"!itemTempl\" >\n <li *ngFor=\"let item of obj.value | listFilter:filter; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"/>\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </span>\n </ul>\n </div>\n <h5 class=\"list-message\" *ngIf=\"data?.length == 0\">{{settings.noDataLabel}}</h5>\n </div>\n </div>\n</div>\n", host: { '[class]': 'defaultSettings.classes' }, providers: [DROPDOWN_CONTROL_VALUE_ACCESSOR, DROPDOWN_CONTROL_VALIDATION], styles: [".stackline-dropdown{position:relative}.c-btn{display:inline-block;background:#fff;border:1px solid #ccc;border-radius:3px;font-size:14px;color:#333}.c-btn.disabled{background:#ccc}.c-btn:focus{outline:none}.selected-list .c-list{display:flex;flex:1 1 auto;align-items:center;flex-wrap:wrap;min-width:0;float:none;padding:0;margin:0;width:auto}.selected-list .c-list .c-token{list-style:none;padding:0 5px;background:#0079fe;color:#fff;border-radius:2px;margin-right:4px;margin-top:2px;float:left}.selected-list .c-list .c-token .c-label{display:block;float:left}.selected-list .c-list .c-token .fa-remove{margin-left:1px;font-size:12px}.selected-list .fa-angle-down,.selected-list .fa-angle-up{font-size:15pt;position:absolute;right:10px;top:50%;transform:translateY(-50%)}.selected-list .countplaceholder{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;align-self:center;margin:0 0 0 6px;line-height:1}.selected-list .c-btn{box-sizing:border-box;width:100%;box-shadow:0 1px 5px #959595;padding: 10px 68px 10px 10px;cursor:pointer;display:flex;align-items:center;flex-wrap:nowrap;position:relative}.dropdown-list{position:absolute;padding-top:14px;width:100%;z-index:9999}.dropdown-list ul{padding:0;list-style:none;overflow:auto;margin:0}.dropdown-list ul li{padding:10px;cursor:pointer;text-align:left}.dropdown-list ul li:first-child{padding-top:10px}.dropdown-list ul li:last-child{padding-bottom:10px}.dropdown-list ul li:hover{background:#f5f5f5}.dropdown-list ::-webkit-scrollbar{width:8px}.dropdown-list ::-webkit-scrollbar-thumb{background:#ccc;border-radius:5px}.dropdown-list ::-webkit-scrollbar-track{background:#f2f2f2}.arrow-up{width:0;height:0;border-left:13px solid transparent;border-right:13px solid transparent;border-bottom:15px solid #fff;margin-left:15px;position:absolute;top:0}.arrow-2{border-bottom:15px solid #ccc;top:-1px}.list-area{border:1px solid #ccc;border-radius:3px;background:#fff;margin:0;box-shadow:0 1px 5px #959595}.select-all{padding:10px;border-bottom:1px solid #ccc;text-align:left}.list-filter{border-bottom:1px solid #ccc;position:relative}.list-filter input{border:0px;width:100%;height:35px;padding:0 0 0 35px}.list-filter input:focus{outline:none}.list-filter .fa{position:absolute;top:10px;left:13px;color:#888}.pure-checkbox input[type=checkbox]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pure-checkbox input[type=checkbox]:focus+label:before,.pure-checkbox input[type=checkbox]:hover+label:before{border-color:#0079fe;background-color:#f2f2f2}.pure-checkbox input[type=checkbox]:active+label:before{transition-duration:0s}.pure-checkbox input[type=checkbox]+label{position:relative;padding-left:2em;vertical-align:middle;-webkit-user-select:none;user-select:none;cursor:pointer;margin:0;color:#000;font-weight:300}.pure-checkbox input[type=checkbox]+label:before{box-sizing:content-box;content:\"\";color:#0079fe;position:absolute;top:50%;left:0;width:14px;height:14px;margin-top:-9px;border:2px solid #0079FE;text-align:center;transition:all .4s ease}.pure-checkbox input[type=checkbox]+label:after{box-sizing:content-box;content:\"\";background-color:#0079fe;position:absolute;top:50%;left:4px;width:10px;height:10px;margin-top:-5px;transform:scale(0);transform-origin:50%;transition:transform .2s ease-out}.pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#ccc}.pure-checkbox input[type=checkbox]:disabled:focus+label:before .pure-checkbox input[type=checkbox]:disabled:hover+label:before{background-color:inherit}.pure-checkbox input[type=checkbox]:disabled:checked+label:before{background-color:#ccc}.pure-checkbox input[type=checkbox]+label:after{background-color:transparent;top:50%;left:4px;width:8px;height:3px;margin-top:-4px;border-style:solid;border-color:#fff;border-width:0 0 3px 3px;border-image:none;transform:rotate(-45deg) scale(0)}.pure-checkbox input[type=checkbox]:checked+label:after{content:\"\";transform:rotate(-45deg) scale(1);transition:transform .2s ease-out}.pure-checkbox input[type=radio]:checked+label:before{background-color:#fff}.pure-checkbox input[type=radio]:checked+label:after{transform:scale(1)}.pure-checkbox input[type=radio]+label:before{border-radius:50%}.pure-checkbox input[type=checkbox]:checked+label:before{background:#0079fe}.pure-checkbox input[type=checkbox]:checked+label:after{transform:rotate(-45deg) scale(1)}.list-message{text-align:center}.list-grp{padding:0 15px!important}.list-grp h4{text-transform:capitalize;margin:15px 0 0;font-size:14px;font-weight:700}.list-grp>li{padding-left:15px!important}.stackline-dropdown.theme-material,.stackline-dropdown.theme-dark,.stackline-dropdown.theme-custom{--ms-primary: #3f51b5;--ms-primary-soft: rgba(63, 81, 181, .12);--ms-surface: #ffffff;--ms-surface-soft: #f5f7fb;--ms-surface-muted: #e8eaf6;--ms-outline: #c5cae9;--ms-outline-strong: #7986cb;--ms-on-surface: #212121;--ms-on-surface-muted: #5f6368;--ms-chip-bg: #e8eaf6;--ms-chip-text: #303f9f;--ms-chip-remove: #303f9f;--ms-divider: rgba(125, 119, 134, .16);--ms-section-bg: rgba(247, 242, 250, .76);--ms-selected-text: var(--ms-primary);--ms-shadow: 0 1px 2px rgba(33, 33, 33, .16), 0 12px 32px rgba(63, 81, 181, .12);--ms-shadow-soft: 0 1px 2px rgba(33, 33, 33, .12), 0 4px 12px rgba(33, 33, 33, .08);display:block;width:100%;color:var(--ms-on-surface);font:inherit}.stackline-dropdown.theme-dark{--ms-primary: #8ab4f8;--ms-primary-soft: rgba(138, 180, 248, .18);--ms-surface: #151a23;--ms-surface-soft: #202736;--ms-surface-muted: #111722;--ms-outline: #384456;--ms-outline-strong: #8ab4f8;--ms-on-surface: #edf2f7;--ms-on-surface-muted: #aab6c5;--ms-chip-bg: #263247;--ms-chip-text: #d7e6ff;--ms-chip-remove: #d7e6ff;--ms-divider: rgba(170, 182, 197, .18);--ms-section-bg: #101620;--ms-selected-text: #d7e6ff;--ms-shadow: 0 20px 50px rgba(0, 0, 0, .42);--ms-shadow-soft: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 24px rgba(0, 0, 0, .28)}.stackline-dropdown.theme-custom{--ms-primary: var(--stackline-ms-primary, #0f766e);--ms-primary-soft: var(--stackline-ms-primary-soft, rgba(15, 118, 110, .14));--ms-surface: var(--stackline-ms-surface, #ffffff);--ms-surface-soft: var(--stackline-ms-surface-soft, #ecfdf5);--ms-surface-muted: var(--stackline-ms-surface-muted, #d1fae5);--ms-outline: var(--stackline-ms-outline, #99f6e4);--ms-outline-strong: var(--stackline-ms-outline-strong, #0f766e);--ms-on-surface: var(--stackline-ms-on-surface, #102a2a);--ms-on-surface-muted: var(--stackline-ms-on-surface-muted, #47615f);--ms-chip-bg: var(--stackline-ms-chip-bg, #ccfbf1);--ms-chip-text: var(--stackline-ms-chip-text, #115e59);--ms-chip-remove: var(--stackline-ms-chip-remove, #115e59);--ms-divider: var(--stackline-ms-divider, rgba(15, 118, 110, .16));--ms-section-bg: var(--stackline-ms-section-bg, #f0fdfa);--ms-selected-text: var(--stackline-ms-selected-text, var(--ms-primary));--ms-shadow: var(--stackline-ms-shadow, 0 18px 42px rgba(15, 118, 110, .15));--ms-shadow-soft: var(--stackline-ms-shadow-soft, 0 1px 2px rgba(15, 118, 110, .16), 0 8px 18px rgba(15, 118, 110, .09))}.stackline-dropdown.theme-material .selected-list,.stackline-dropdown.theme-dark .selected-list,.stackline-dropdown.theme-custom .selected-list{width:100%}.stackline-dropdown.theme-material .selected-list .c-btn,.stackline-dropdown.theme-dark .selected-list .c-btn,.stackline-dropdown.theme-custom .selected-list .c-btn{position:relative;display:flex;align-items:center;flex-wrap:nowrap;gap:8px;width:100%;min-height:56px;padding: 11px 84px 11px 16px;border-radius:18px;border:1px solid var(--ms-outline);background:var(--ms-surface);box-shadow:var(--ms-shadow-soft);color:var(--ms-on-surface);cursor:pointer;font-size:inherit;line-height:1.45;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease,transform .16s ease}.stackline-dropdown.theme-material .selected-list .c-btn:hover,.stackline-dropdown.theme-dark .selected-list .c-btn:hover,.stackline-dropdown.theme-custom .selected-list .c-btn:hover{border-color:var(--ms-outline-strong)}.stackline-dropdown.theme-material .selected-list .c-btn.disabled,.stackline-dropdown.theme-dark .selected-list .c-btn.disabled,.stackline-dropdown.theme-custom .selected-list .c-btn.disabled{background:var(--ms-surface);cursor:not-allowed;opacity:.72}.stackline-dropdown.theme-material .selected-list .c-list,.stackline-dropdown.theme-dark .selected-list .c-list,.stackline-dropdown.theme-custom .selected-list .c-list{display:flex;flex:1 1 auto;flex-wrap:wrap;gap:8px;width:auto;min-width:0;margin:0;padding:0;float:none}.stackline-dropdown.theme-material .selected-list .c-list .c-token,.stackline-dropdown.theme-dark .selected-list .c-list .c-token,.stackline-dropdown.theme-custom .selected-list .c-list .c-token{position:relative;display:inline-block;vertical-align:middle;min-height:32px;max-width:100%;padding:6px 30px 6px 12px;background:var(--ms-chip-bg);color:var(--ms-chip-text);border-radius:999px;box-shadow:inset 0 0 0 1px #6750a414;line-height:1.35;white-space:normal;overflow-wrap:anywhere;margin:0;float:none}.stackline-dropdown.theme-material .selected-list .c-list .c-token .c-label,.stackline-dropdown.theme-dark .selected-list .c-list .c-token .c-label,.stackline-dropdown.theme-custom .selected-list .c-list .c-token .c-label{display:inline-flex;align-items:center;float:none;min-width:0;max-width:100%;line-height:1.3;font-weight:500;white-space:normal;overflow-wrap:anywhere}.stackline-dropdown.theme-material .selected-list .c-list .c-token .fa-remove,.stackline-dropdown.theme-dark .selected-list .c-list .c-token .fa-remove,.stackline-dropdown.theme-custom .selected-list .c-list .c-token .fa-remove{position:absolute;right:10px;top:50%;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;margin-left:0;transform:translateY(-50%);color:var(--ms-chip-remove);cursor:pointer}.stackline-dropdown.theme-material .selected-list .countplaceholder,.stackline-dropdown.theme-dark .selected-list .countplaceholder,.stackline-dropdown.theme-custom .selected-list .countplaceholder{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;align-self:center;margin:0;line-height:1;color:var(--ms-on-surface-muted);font-size:.8rem;font-weight:600}.stackline-dropdown.theme-material .selected-list .fa-angle-down,.stackline-dropdown.theme-dark .selected-list .fa-angle-down,.stackline-dropdown.theme-custom .selected-list .fa-angle-down,.stackline-dropdown.theme-material .selected-list .fa-angle-up,.stackline-dropdown.theme-dark .selected-list .fa-angle-up,.stackline-dropdown.theme-custom .selected-list .fa-angle-up{position:absolute;top:50%;right:16px;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;transform:translateY(-50%);color:var(--ms-on-surface-muted);font-size:15pt;pointer-events:none}.stackline-dropdown.theme-material .dropdown-list,.stackline-dropdown.theme-dark .dropdown-list,.stackline-dropdown.theme-custom .dropdown-list{position:absolute;width:100%;padding-top:8px;z-index:99999}.stackline-dropdown.theme-material .arrow-up,.stackline-dropdown.theme-dark .arrow-up,.stackline-dropdown.theme-custom .arrow-up,.stackline-dropdown.theme-material .arrow-down,.stackline-dropdown.theme-dark .arrow-down,.stackline-dropdown.theme-custom .arrow-down,.stackline-dropdown.theme-material .arrow-2,.stackline-dropdown.theme-dark .arrow-2,.stackline-dropdown.theme-custom .arrow-2{display:none}.stackline-dropdown.theme-material .list-area,.stackline-dropdown.theme-dark .list-area,.stackline-dropdown.theme-custom .list-area{overflow:hidden;border-radius:22px;background:var(--ms-surface);border:1px solid var(--ms-outline);box-shadow:var(--ms-shadow);margin:0}.stackline-dropdown.theme-material .select-all,.stackline-dropdown.theme-dark .select-all,.stackline-dropdown.theme-custom .select-all{padding:10px 14px;border-bottom:1px solid var(--ms-divider);background:var(--ms-section-bg);text-align:left}.stackline-dropdown.theme-material .list-filter,.stackline-dropdown.theme-dark .list-filter,.stackline-dropdown.theme-custom .list-filter{position:relative;display:flex;align-items:center;min-height:52px;padding-left:48px;padding-right:44px;border-bottom:1px solid var(--ms-divider);background:var(--ms-surface)}.stackline-dropdown.theme-material .list-filter input,.stackline-dropdown.theme-dark .list-filter input,.stackline-dropdown.theme-custom .list-filter input{width:100%;height:100%;border:0;background:transparent;color:var(--ms-on-surface);font:inherit;padding:0}.stackline-dropdown.theme-material .list-filter input::placeholder,.stackline-dropdown.theme-dark .list-filter input::placeholder,.stackline-dropdown.theme-custom .list-filter input::placeholder{color:var(--ms-on-surface-muted)}.stackline-dropdown.theme-material .list-filter input:focus,.stackline-dropdown.theme-dark .list-filter input:focus,.stackline-dropdown.theme-custom .list-filter input:focus{outline:none}.stackline-dropdown.theme-material .list-filter .fa,.stackline-dropdown.theme-dark .list-filter .fa,.stackline-dropdown.theme-custom .list-filter .fa{position:absolute;top:50%;left:16px;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;transform:translateY(-50%);color:var(--ms-on-surface-muted)}.stackline-dropdown.theme-material .dropdown-list ul,.stackline-dropdown.theme-dark .dropdown-list ul,.stackline-dropdown.theme-custom .dropdown-list ul{list-style:none;margin:0;padding:8px;overflow:auto}.stackline-dropdown.theme-material .dropdown-list ul li,.stackline-dropdown.theme-dark .dropdown-list ul li,.stackline-dropdown.theme-custom .dropdown-list ul li{align-items:center;min-height:0;margin:4px;padding:12px 14px;border-radius:14px;cursor:pointer;text-align:left;line-height:1.35;transition:background-color .16s ease,color .16s ease}.stackline-dropdown.theme-material .dropdown-list ul li:first-child,.stackline-dropdown.theme-dark .dropdown-list ul li:first-child,.stackline-dropdown.theme-custom .dropdown-list ul li:first-child{padding-top:12px}.stackline-dropdown.theme-material .dropdown-list ul li:last-child,.stackline-dropdown.theme-dark .dropdown-list ul li:last-child,.stackline-dropdown.theme-custom .dropdown-list ul li:last-child{padding-bottom:12px}.stackline-dropdown.theme-material .dropdown-list ul li:hover,.stackline-dropdown.theme-dark .dropdown-list ul li:hover,.stackline-dropdown.theme-custom .dropdown-list ul li:hover{background:var(--ms-surface-soft)}.stackline-dropdown.theme-material .pure-checkbox,.stackline-dropdown.theme-dark .pure-checkbox,.stackline-dropdown.theme-custom .pure-checkbox{position:relative}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]+label,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]+label,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]+label{position:relative;display:block;width:100%;margin:0;padding-left:32px;color:inherit;cursor:pointer;font-weight:500;-webkit-user-select:none;user-select:none}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]+label:before,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]+label:before,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]+label:before{box-sizing:content-box;content:\"\";position:absolute;top:50%;left:0;width:16px;height:16px;margin-top:-10px;border:2px solid var(--ms-outline-strong);border-radius:5px;background:var(--ms-surface);transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]+label:after,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]+label:after,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]+label:after{box-sizing:content-box;content:\"\";position:absolute;top:50%;left:5px;width:8px;height:3px;margin-top:-4px;border-style:solid;border-color:#fff;border-width:0 0 3px 3px;border-image:none;background:transparent;transform:rotate(-45deg) scale(0);transform-origin:50%;transition:transform .16s ease}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:focus+label:before,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:focus+label:before,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:focus+label:before,.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:hover+label:before,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:hover+label:before,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:hover+label:before{border-color:var(--ms-primary);background:var(--ms-surface-soft)}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:checked+label:before,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:checked+label:before,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:checked+label:before{border-color:var(--ms-primary);background:var(--ms-primary)}.stackline-dropdown.theme-material .pure-checkbox input[type=checkbox]:checked+label:after,.stackline-dropdown.theme-dark .pure-checkbox input[type=checkbox]:checked+label:after,.stackline-dropdown.theme-custom .pure-checkbox input[type=checkbox]:checked+label:after{transform:rotate(-45deg) scale(1)}.stackline-dropdown.theme-material .list-message,.stackline-dropdown.theme-dark .list-message,.stackline-dropdown.theme-custom .list-message{margin:0;padding:20px 14px;color:var(--ms-on-surface-muted);text-align:center}\n"] }]
568
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { data: [{
2419
+ args: [{ selector: 'angular-multiselect, angular2-multiselect', host: { '[class]': 'defaultSettings.classes' }, providers: [DROPDOWN_CONTROL_VALUE_ACCESSOR, DROPDOWN_CONTROL_VALIDATION], encapsulation: ViewEncapsulation.None, standalone: false, template: "<div class=\"stackline-dropdown\" [ngClass]=\"getDropdownClasses()\" (clickOutside)=\"closeDropdownOnClickOut()\" #stacklineDropdown>\n <div class=\"selected-list\" #selectedList>\n <div class=\"c-btn\"\n (click)=\"toggleDropdown($event)\"\n [ngClass]=\"{'disabled': settings.disabled, 'is-active': isActive, 'has-selection': selectedItems?.length > 0, 'single-select-mode': settings.singleSelection}\"\n [attr.tabindex]=\"0\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isActive\"\n [attr.aria-disabled]=\"settings.disabled\">\n\n <span class=\"c-placeholder\" *ngIf=\"selectedItems?.length == 0\">{{settings.text}}</span>\n <span class=\"c-single-value\" *ngIf=\"settings.singleSelection && !badgeTempl\">\n <span *ngFor=\"let item of selectedItems;trackBy: trackByFn.bind(this);let k = index\">\n {{item[settings.labelKey]}}\n </span>\n </span>\n <span class=\"c-list c-chip-list\" *ngIf=\"selectedItems?.length > 0 && settings.singleSelection && badgeTempl \">\n <div class=\"c-token\" *ngFor=\"let item of selectedItems;trackBy: trackByFn.bind(this);let k = index\">\n <span *ngIf=\"!badgeTempl\" class=\"c-label\">{{item[settings.labelKey]}}</span>\n\n <span *ngIf=\"badgeTempl\" class=\"c-label\">\n <c-templateRenderer [data]=\"badgeTempl\" [item]=\"item\"></c-templateRenderer>\n </span>\n <span class=\"c-remove\" (click)=\"onItemClick(item,k,$event);$event.stopPropagation()\">\n <c-icon [name]=\"'remove'\"></c-icon>\n </span>\n </div>\n </span>\n <div class=\"c-list c-chip-list\" *ngIf=\"selectedItems?.length > 0 && !settings.singleSelection\">\n <div class=\"c-token\" *ngFor=\"let item of selectedItems;trackBy: trackByFn.bind(this);let k = index\" [hidden]=\"k > settings.badgeShowLimit-1\">\n <span *ngIf=\"!badgeTempl\" class=\"c-label\">{{item[settings.labelKey]}}</span>\n <span *ngIf=\"badgeTempl\" class=\"c-label\">\n <c-templateRenderer [data]=\"badgeTempl\" [item]=\"item\"></c-templateRenderer>\n </span>\n <span class=\"c-remove\" (click)=\"onItemClick(item,k,$event);$event.stopPropagation()\">\n <c-icon [name]=\"'remove'\"></c-icon>\n </span>\n </div>\n </div>\n <span class=\"countplaceholder\" *ngIf=\"selectedItems?.length > settings.badgeShowLimit\">+{{selectedItems?.length - settings.badgeShowLimit }}</span>\n <span class=\"c-remove clear-all\" *ngIf=\"settings.clearAll && selectedItems?.length > 0 && !settings.disabled\" (click)=\"clearSelection($event);$event.stopPropagation()\">\n <c-icon [name]=\"'remove'\"></c-icon>\n </span>\n <span *ngIf=\"!isActive\" class=\"c-angle-down\">\n <c-icon [name]=\"'angle-down'\"></c-icon>\n </span>\n <span *ngIf=\"isActive\" class=\"c-angle-up\">\n <c-icon [name]=\"'angle-up'\"></c-icon>\n\n </span>\n </div>\n </div>\n <div #dropdownList class=\"dropdown-list animated fadeIn\"\n [ngClass]=\"{'tagToBody': settings.tagToBody}\"\n [style.width.px]=\"dropDownWidth\" \n [style.top]=\"dropDownTop\" \n [style.bottom]=\"dropDownBottom\"\n [style.left.px]=\"dropDownLeft\" \n role=\"presentation\"\n [attr.aria-hidden]=\"!isActive\"\n [hidden]=\"!isActive\">\n <div [ngClass]=\"{'arrow-up': settings.position == 'bottom', 'arrow-down': settings.position == 'top'}\" class=\"arrow-2\"></div>\n <div [ngClass]=\"{'arrow-up': settings.position == 'bottom', 'arrow-down': settings.position == 'top'}\"></div>\n <div class=\"list-area\" [ngClass]=\"{'single-select-mode': settings.singleSelection }\">\n <div class=\"pure-checkbox select-all\" *ngIf=\"settings.enableCheckAll && !settings.singleSelection && !settings.limitSelection && data?.length > 0 && !isDisabledItemPresent\"\n >\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelectAll\" [disabled]=\"settings.limitSelection == selectedItems?.length\"\n [id]=\"id\" (change)=\"toggleSelectAll($event)\"/>\n <label [for]=\"id\">\n <span [hidden]=\"isSelectAll\">{{settings.selectAllText}}</span>\n <span [hidden]=\"!isSelectAll\">{{settings.unSelectAllText}}</span>\n </label>\n </div>\n <img class=\"loading-icon\" *ngIf=\"loading\" src=\"assets/img/loading.gif\" />\n <div class=\"list-filter\" *ngIf=\"settings.enableSearchFilter\">\n <span class=\"c-search\" id=\"searchIcon\">\n <c-icon [name]=\"'search'\"></c-icon>\n </span>\n <span *ngIf=\"!settings.lazyLoading\" [hidden]=\"filter == undefined || filter?.length == 0\" class=\"c-clear\" (click)=\"clearSearch()\">\n <c-icon [name]=\"'clear'\"></c-icon>\n </span>\n <span *ngIf=\"settings.lazyLoading\" [hidden]=\"filter == undefined || filter?.length == 0\" class=\"c-clear\" (click)=\"resetInfiniteSearch()\">\n <c-icon [name]=\"'clear'\"></c-icon>\n </span>\n\n <input class=\"c-input\" *ngIf=\"settings.groupBy && !settings.lazyLoading && !searchTempl\" #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\"\n [(ngModel)]=\"filter\" (keyup)=\"filterGroupedList()\" aria-labelledby=\"searchIcon\">\n <input class=\"c-input\" *ngIf=\"!settings.groupBy && !settings.lazyLoading && !searchTempl\" #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\"\n [(ngModel)]=\"filter\" (keyup)=\"filteritems($event)\" aria-labelledby=\"searchIcon\">\n <input class=\"c-input\" *ngIf=\"settings.lazyLoading && !searchTempl\" #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\"\n [(ngModel)]=\"filter\" (keyup)=\"onKeyUp($event)\" aria-labelledby=\"searchIcon\">\n <!-- <input class=\"c-input\" *ngIf=\"!settings.lazyLoading && !searchTempl && settings.groupBy\" #searchInput type=\"text\" [placeholder]=\"settings.searchPlaceholderText\"\n [(ngModel)]=\"filter\" (keyup)=\"filterGroupList($event)\">-->\n <c-templateRenderer *ngIf=\"searchTempl\" [data]=\"searchTempl\" [item]=\"item\"></c-templateRenderer>\n </div>\n <div class=\"filter-select-all\" *ngIf=\"!settings.lazyLoading && settings.enableFilterSelectAll && !isDisabledItemPresent\">\n <div class=\"pure-checkbox select-all\" *ngIf=\"!settings.groupBy && filter?.length > 0 && filterLength > 0 && !settings.singleSelection\" (click)=\"toggleFilterSelectAll()\">\n <input type=\"checkbox\" [checked]=\"isFilterSelectAll\" [disabled]=\"settings.limitSelection == selectedItems?.length\" aria-labelledby=\"optionName\"\n aria-label=\"option\"/>\n <label>\n <span [hidden]=\"isFilterSelectAll\">{{settings.filterSelectAllText}}</span>\n <span [hidden]=\"!isFilterSelectAll\">{{settings.filterUnSelectAllText}}</span>\n </label>\n </div>\n <div class=\"pure-checkbox select-all\" *ngIf=\"settings.groupBy && filter?.length > 0 && groupedData?.length > 0 && !settings.singleSelection\" (click)=\"toggleFilterSelectAll()\">\n <input type=\"checkbox\" [checked]=\"isFilterSelectAll && filter?.length > 0\" [disabled]=\"settings.limitSelection == selectedItems?.length\"\n aria-labelledby=\"option\"/>\n <label>\n <span [hidden]=\"isFilterSelectAll\">{{settings.filterSelectAllText}}</span>\n <span [hidden]=\"!isFilterSelectAll\">{{settings.filterUnSelectAllText}}</span>\n </label>\n </div>\n </div>\n <div class=\"filter-select-all\" *ngIf=\"settings.lazyLoading && settings.enableFilterSelectAll && !isDisabledItemPresent && !settings.singleSelection\">\n <div class=\"pure-checkbox select-all\" *ngIf=\"filter?.length > 0 && infiniteFilterLength > 0\" (click)=\"toggleInfiniteFilterSelectAll()\">\n <input type=\"checkbox\" [checked]=\"isInfiniteFilterSelectAll\" [disabled]=\"settings.limitSelection == selectedItems?.length\"\n aria-labelledby=\"option\"/>\n <label>\n <span [hidden]=\"isInfiniteFilterSelectAll\">{{settings.filterSelectAllText}}</span>\n <span [hidden]=\"!isInfiniteFilterSelectAll\">{{settings.filterUnSelectAllText}}</span>\n </label>\n </div>\n </div>\n <div class=\"filter-select-all\" *ngIf=\"filter?.length\">\n <div class=\"btn-container\" *ngIf=\"settings.addNewItemOnFilter\">\n <button class=\"c-btn btn-iceblue\" (click)=\"addFilterNewItem()\">{{settings.addNewButtonText}}</button>\n </div>\n </div>\n\n <div *ngIf=\"!settings.groupBy && !settings.lazyLoading && itemTempl == undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul class=\"lazyContainer\">\n <li *ngFor=\"let item of data; let i = index;\" (click)=\"onItemClick(item,i,$event)\"\n class=\"pure-checkbox\" [ngClass]=\"{'selected-item': isSelected(item) == true }\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n aria-labelledby=\"option\"/>\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </ul>\n </div>\n <!-- lazy loading -->\n <div *ngIf=\"!settings.groupBy && settings.lazyLoading && itemTempl == undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul virtualScroller #scroll [enableUnequalChildrenSizes]=\"randomSize\" [items]=\"virtualdata\" (vsStart)=\"onScrollEnd($event)\"\n (vsEnd)=\"onScrollEnd($event)\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\" class=\"lazyContainer\">\n <li *ngFor=\"let item of scroll.viewPortItems; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\"\n [ngClass]=\"{'selected-item': isSelected(item) == true }\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </ul>\n </div>\n <!-- custom template -->\n <div *ngIf=\"!settings.groupBy && !settings.lazyLoading && itemTempl != undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul class=\"lazyContainer\">\n <li *ngFor=\"let item of data; let i = index;\" (click)=\"onItemClick(item,i,$event)\"\n class=\"pure-checkbox\" [ngClass]=\"{'selected-item': isSelected(item) == true }\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </ul>\n </div>\n <!-- lazy loading and custom template -->\n <div *ngIf=\"!settings.groupBy && settings.lazyLoading && itemTempl != undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul virtualScroller #scroll2 [enableUnequalChildrenSizes]=\"randomSize\" [items]=\"virtualdata\" (vsStart)=\"onScrollEnd($event)\"\n (vsEnd)=\"onScrollEnd($event)\" class=\"lazyContainer\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\">\n <li *ngFor=\"let item of scroll2.viewPortItems; let i = index;\" (click)=\"onItemClick(item,i,$event)\" class=\"pure-checkbox\"\n [ngClass]=\"{'selected-item': isSelected(item) == true }\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </ul>\n </div>\n <!-- lazy loading, group By and custom template -->\n <div *ngIf=\"settings.groupBy && settings.lazyLoading && itemTempl != undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul virtualScroller #scroll3 [enableUnequalChildrenSizes]=\"randomSize\" [items]=\"virtualdata\" (vsStart)=\"onScrollEnd($event)\"\n (vsEnd)=\"onScrollEnd($event)\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\" class=\"lazyContainer\">\n <span *ngFor=\"let item of scroll3.viewPortItems; let i = index;\">\n <li (click)=\"onItemClick(item,i,$event)\" *ngIf=\"!item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !settings.singleSelection\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n <li *ngIf=\"item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"item\"></c-templateRenderer>\n </li>\n </span>\n </ul>\n </div>\n <!-- group By and custom template -->\n <div *ngIf=\"settings.groupBy && !settings.lazyLoading && itemTempl != undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul class=\"lazyContainer\">\n <span *ngFor=\"let item of groupedData; let i = index;\">\n <li (click)=\"selectGroup(item)\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !settings.singleSelection\" type=\"checkbox\" [checked]=\"item.selected\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n <ul class=\"lazyContainer\">\n <span *ngFor=\"let val of item.list ; let j = index;\">\n <li (click)=\"onItemClick(val,j,$event); $event.stopPropagation()\" [ngClass]=\"{'grp-title': val.grpTitle,'grp-item': !val.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(val)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(val)) || val.disabled\"\n />\n <label></label>\n <c-templateRenderer [data]=\"itemTempl\" [item]=\"val\"></c-templateRenderer>\n </li>\n </span>\n </ul>\n\n </li>\n </span>\n </ul>\n </div>\n <!-- lazy loading, group By -->\n <div *ngIf=\"settings.groupBy && settings.lazyLoading && itemTempl == undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <virtual-scroller [items]=\"groupedData\" (vsUpdate)=\"viewPortItems = $event\" (vsEnd)=\"onScrollEnd($event)\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\">\n <ul virtualScroller #scroll4 [enableUnequalChildrenSizes]=\"randomSize\" [items]=\"virtualdata\" (vsStart)=\"onScrollEnd($event)\"\n (vsEnd)=\"onScrollEnd($event)\" [ngStyle]=\"{'height': settings.maxHeight+'px'}\" class=\"lazyContainer\">\n <span *ngFor=\"let item of scroll4.viewPortItems; let i = index;\">\n <li *ngIf=\"item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection, 'selected-item': isSelected(item) == true }\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !item.grpTitle && !settings.singleSelection\" type=\"checkbox\" [checked]=\"isSelected(item)\"\n [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n <li (click)=\"onItemClick(item,i,$event)\" *ngIf=\"!item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection, 'selected-item': isSelected(item) == true }\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !item.grpTitle\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </span>\n </ul>\n </virtual-scroller>\n </div>\n <!-- group By -->\n <div *ngIf=\"settings.groupBy && !settings.lazyLoading && itemTempl == undefined\" [style.maxHeight]=\"settings.maxHeight+'px'\"\n style=\"overflow: auto;\">\n <ul class=\"lazyContainer\">\n <span *ngFor=\"let item of groupedData ; let i = index;\">\n <li (click)=\"selectGroup(item)\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !settings.singleSelection\" type=\"checkbox\" [checked]=\"item.selected\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(item)) || item.disabled\"\n />\n <label>{{item[settings.labelKey]}}</label>\n <ul class=\"lazyContainer\">\n <span *ngFor=\"let val of item.list ; let j = index;\">\n <li (click)=\"onItemClick(val,j,$event); $event.stopPropagation()\" [ngClass]=\"{'selected-item': isSelected(val) == true,'grp-title': val.grpTitle,'grp-item': !val.grpTitle && !settings.singleSelection}\"\n class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox\" type=\"checkbox\" [checked]=\"isSelected(val)\" [disabled]=\"(settings.limitSelection == selectedItems?.length && !isSelected(val)) || val.disabled\"\n />\n <label>{{val[settings.labelKey]}}</label>\n </li>\n </span>\n </ul>\n </li>\n </span>\n <!-- <span *ngFor=\"let item of groupedData ; let i = index;\">\n <li (click)=\"onItemClick(item,i,$event)\" *ngIf=\"!item.grpTitle\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle}\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && !item.grpTitle\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n <li *ngIf=\"item.grpTitle && !settings.selectGroup\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle}\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && settings.selectGroup\" type=\"checkbox\" [checked]=\"isSelected(item)\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n <li (click)=\"selectGroup(item)\" *ngIf=\"item.grpTitle && settings.selectGroup\" [ngClass]=\"{'grp-title': item.grpTitle,'grp-item': !item.grpTitle}\" class=\"pure-checkbox\">\n <input *ngIf=\"settings.showCheckbox && settings.selectGroup\" type=\"checkbox\" [checked]=\"item.selected\" [disabled]=\"settings.limitSelection == selectedItems?.length && !isSelected(item)\"\n />\n <label>{{item[settings.labelKey]}}</label>\n </li>\n </span> -->\n </ul>\n </div>\n <h5 class=\"list-message\" *ngIf=\"data?.length == 0\">{{settings.noDataLabel}}</h5>\n </div>\n </div>\n</div>\n", styles: ["virtual-scroll{display:block;width:100%}.stackline-dropdown{--ms-primary: #3f51b5;--ms-primary-soft: rgba(63, 81, 181, .12);--ms-surface: #ffffff;--ms-surface-soft: #f5f7fb;--ms-surface-muted: #e8eaf6;--ms-outline: #c5cae9;--ms-outline-strong: #7986cb;--ms-on-surface: #212121;--ms-on-surface-muted: #5f6368;--ms-chip-bg: #e8eaf6;--ms-chip-text: #303f9f;--ms-chip-remove: #303f9f;--ms-shadow: 0 1px 2px rgba(33, 33, 33, .16), 0 12px 32px rgba(63, 81, 181, .12);--ms-shadow-soft: 0 1px 2px rgba(33, 33, 33, .12), 0 4px 12px rgba(33, 33, 33, .08);position:relative;display:block;width:100%;color:var(--ms-on-surface);font:inherit}.selected-list{width:100%}.c-btn{position:relative;display:flex;align-items:center;flex-wrap:wrap;gap:8px;width:100%;min-height:56px;padding:11px 54px 11px 16px;border-radius:18px;border:1px solid var(--ms-outline);background:var(--ms-surface);box-shadow:var(--ms-shadow-soft);cursor:pointer;line-height:1.45;transition:border-color .16s ease,box-shadow .16s ease,background-color .16s ease,transform .16s ease}.c-btn:hover{border-color:var(--ms-outline-strong)}.c-btn.is-active{border-color:var(--ms-primary);box-shadow:0 0 0 3px #6750a424,var(--ms-shadow-soft)}.c-btn.disabled{cursor:not-allowed;opacity:.72}.c-placeholder,.c-single-value{color:var(--ms-on-surface-muted);font-size:.95rem}.c-btn.has-selection .c-single-value,.c-btn.has-selection .c-placeholder{color:var(--ms-on-surface);font-weight:500}.c-list{display:flex;flex:1 1 auto;flex-wrap:wrap;gap:8px;margin:0;padding:0;min-width:0}.c-chip-list{padding-right:8px}.c-token{position:relative;display:inline-block;vertical-align:middle;min-height:32px;max-width:100%;padding:6px 30px 6px 12px;border-radius:999px;background:var(--ms-chip-bg);color:var(--ms-chip-text);box-shadow:inset 0 0 0 1px #6750a414;line-height:1.35;white-space:normal;overflow-wrap:anywhere}.c-token .c-label{display:inline-flex;align-items:center;min-width:0;max-width:100%;line-height:1.3;font-weight:500;white-space:normal;overflow-wrap:anywhere}.c-remove{position:absolute;right:10px;top:50%;display:inline-flex;align-items:center;justify-content:center;width:16px;height:16px;transform:translateY(-50%);color:var(--ms-chip-remove)}.c-remove svg,.c-angle-down svg,.c-angle-up svg{fill:currentColor}.clear-all{position:absolute;top:50%;right:42px;width:20px;height:20px;transform:translateY(-50%);color:var(--ms-on-surface-muted)}.countplaceholder{position:absolute;top:50%;right:76px;transform:translateY(-50%);color:var(--ms-on-surface-muted);font-size:.8rem;font-weight:600}.c-angle-down,.c-angle-up{position:absolute;top:50%;right:16px;display:inline-flex;align-items:center;justify-content:center;width:20px;height:20px;transform:translateY(-50%);color:var(--ms-on-surface-muted);pointer-events:none}.dropdown-list{position:absolute;width:100%;padding-top:8px;z-index:99999}.dropdown-list.tagToBody{position:fixed}.arrow-up,.arrow-down,.arrow-2{display:none}.list-area{overflow:hidden;border-radius:22px;background:var(--ms-surface);border:1px solid var(--ms-outline);box-shadow:var(--ms-shadow)}.select-all,.filter-select-all{padding:10px 14px;border-bottom:1px solid rgba(125,119,134,.16);background:#f7f2fac2}.list-filter{position:relative;display:flex;align-items:center;min-height:52px;padding-left:48px;padding-right:44px;border-bottom:1px solid rgba(125,119,134,.16);background:var(--ms-surface)}.list-filter .c-input,.list-filter input{width:100%;height:100%;border:0;background:transparent;color:var(--ms-on-surface);font:inherit}.list-filter .c-input::placeholder,.list-filter input::placeholder{color:var(--ms-on-surface-muted)}.list-filter .c-input:focus,.list-filter input:focus{outline:none}.list-filter .c-search,.list-filter .c-clear{position:absolute;top:50%;display:inline-flex;align-items:center;justify-content:center;width:18px;height:18px;transform:translateY(-50%);color:var(--ms-on-surface-muted)}.list-filter .c-search{left:16px}.list-filter .c-clear{right:16px;cursor:pointer}.btn-container{padding:10px 14px 14px;text-align:center}.btn-iceblue{width:100%;min-height:40px;border-radius:999px;border:1px solid transparent;background:var(--ms-primary);color:#fff;font-weight:600}.dropdown-list ul{list-style:none;margin:0;padding:8px;overflow:auto}.dropdown-list ul li{align-items:center;min-height:0;margin:4px;padding:12px 14px;border-radius:14px;cursor:pointer;text-align:left;line-height:1.35;transition:background-color .16s ease,color .16s ease}.dropdown-list ul li:hover{background:var(--ms-surface-soft)}.selected-item{background:var(--ms-primary-soft)!important;color:var(--ms-primary)}.selected-item:hover{background:#6750a42e!important}.grp-item{padding-left:42px!important}.grp-title{margin-top:6px;padding-top:10px!important;padding-bottom:8px!important;background:transparent!important;color:var(--ms-on-surface-muted);cursor:default!important}.grp-title label{margin-bottom:0!important;font-size:.74rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.grp-title:hover{background:transparent!important}.pure-checkbox{position:relative}.pure-checkbox input[type=checkbox]{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.pure-checkbox input[type=checkbox]+label{position:relative;display:block;width:100%;margin:0;padding-left:32px;color:inherit;cursor:pointer;font-weight:500;-webkit-user-select:none;user-select:none}.pure-checkbox input[type=checkbox]+label:before{box-sizing:content-box;content:\"\";position:absolute;top:50%;left:0;width:18px;height:18px;margin-top:-10px;border:2px solid var(--ms-outline-strong);border-radius:6px;background:var(--ms-surface);transition:all .18s ease}.pure-checkbox input[type=checkbox]+label:after{box-sizing:content-box;content:\"\";position:absolute;top:50%;left:5px;width:7px;height:3px;margin-top:-3px;border-style:solid;border-width:0 0 2px 2px;border-color:#fff;transform:rotate(-45deg) scale(0);transform-origin:50%;transition:transform .16s ease-out}.pure-checkbox input[type=checkbox]:focus+label:before,.pure-checkbox input[type=checkbox]:hover+label:before{border-color:var(--ms-primary);box-shadow:0 0 0 4px #3f51b51f}.pure-checkbox input[type=checkbox]:checked+label:before{border-color:var(--ms-primary);background:var(--ms-primary)}.pure-checkbox input[type=checkbox]:checked+label:after{transform:rotate(-45deg) scale(1)}.pure-checkbox input[type=checkbox]:disabled+label{color:#b1acb8;cursor:not-allowed}.pure-checkbox input[type=checkbox]:disabled+label:before{border-color:#d5d0db;background:#f2edf7;box-shadow:none}.single-select-mode .pure-checkbox input[type=checkbox]+label:before,.single-select-mode .pure-checkbox input[type=checkbox]+label:after{opacity:0}.single-select-mode .pure-checkbox input[type=checkbox]+label{padding-left:0}.list-message,.nodata-label{margin:0;padding:22px 16px 24px;color:var(--ms-on-surface-muted);text-align:center;font-size:.95rem;font-weight:500}.list-grp{padding:0 15px!important}.list-grp h4{margin:16px 0 6px;color:var(--ms-on-surface);font-size:.76rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.list-grp>li{padding-left:15px!important}.loading-icon{position:absolute;top:18px;right:16px;width:18px;z-index:2}.dropdown-list ::-webkit-scrollbar{width:10px}.dropdown-list ::-webkit-scrollbar-thumb{background:#7d778657;border-radius:999px;border:2px solid transparent;background-clip:padding-box}.dropdown-list ::-webkit-scrollbar-track{background:transparent}.stackline-dropdown.theme-dark{--ms-primary: #8ab4f8;--ms-primary-soft: rgba(138, 180, 248, .18);--ms-surface: #151a23;--ms-surface-soft: #202736;--ms-surface-muted: #111722;--ms-outline: #384456;--ms-outline-strong: #8ab4f8;--ms-on-surface: #edf2f7;--ms-on-surface-muted: #aab6c5;--ms-chip-bg: #263247;--ms-chip-text: #d7e6ff;--ms-chip-remove: #d7e6ff;--ms-shadow: 0 20px 50px rgba(0, 0, 0, .42);--ms-shadow-soft: 0 1px 2px rgba(0, 0, 0, .45), 0 10px 24px rgba(0, 0, 0, .28)}.stackline-dropdown.theme-custom{--ms-primary: var(--stackline-ms-primary, #0f766e);--ms-primary-soft: var(--stackline-ms-primary-soft, rgba(15, 118, 110, .14));--ms-surface: var(--stackline-ms-surface, #ffffff);--ms-surface-soft: var(--stackline-ms-surface-soft, #ecfdf5);--ms-surface-muted: var(--stackline-ms-surface-muted, #d1fae5);--ms-outline: var(--stackline-ms-outline, #99f6e4);--ms-outline-strong: var(--stackline-ms-outline-strong, #0f766e);--ms-on-surface: var(--stackline-ms-on-surface, #102a2a);--ms-on-surface-muted: var(--stackline-ms-on-surface-muted, #47615f);--ms-chip-bg: var(--stackline-ms-chip-bg, #ccfbf1);--ms-chip-text: var(--stackline-ms-chip-text, #115e59);--ms-chip-remove: var(--stackline-ms-chip-remove, #115e59);--ms-shadow: var(--stackline-ms-shadow, 0 18px 42px rgba(15, 118, 110, .15));--ms-shadow-soft: var(--stackline-ms-shadow-soft, 0 1px 2px rgba(15, 118, 110, .16), 0 8px 18px rgba(15, 118, 110, .09))}.stackline-dropdown.theme-classic{--ms-primary: #0079fe;--ms-primary-soft: #e9f4ff;--ms-surface: #ffffff;--ms-surface-soft: #f5f5f5;--ms-outline: #cccccc;--ms-outline-strong: #0079fe;--ms-on-surface: #333333;--ms-on-surface-muted: #333333;--ms-chip-bg: #0079fe;--ms-chip-text: #ffffff;--ms-chip-remove: #ffffff;--ms-shadow: 0 1px 5px #959595;--ms-shadow-soft: 0 1px 5px #959595;color:#333}.stackline-dropdown.theme-classic .selected-list{width:100%}.stackline-dropdown.theme-classic .c-btn{display:flex;align-items:center;flex-wrap:nowrap;gap:6px;min-height:42px;padding:10px 68px 10px 10px;border:1px solid #cccccc;border-radius:3px;background:#fff;box-shadow:0 1px 5px #959595;color:#333;font-size:14px;line-height:1.35}.stackline-dropdown.theme-classic .c-btn.is-active,.stackline-dropdown.theme-classic .c-btn:hover{border-color:#ccc;box-shadow:0 1px 5px #959595}.stackline-dropdown.theme-classic .c-btn.disabled{background:#ccc;opacity:1}.stackline-dropdown.theme-classic .c-placeholder,.stackline-dropdown.theme-classic .c-single-value{color:#333;font-size:14px}.stackline-dropdown.theme-classic .c-list{display:flex;flex:1 1 auto;align-items:center;flex-wrap:wrap;gap:4px;width:auto;min-width:0;margin:0;padding:0}.stackline-dropdown.theme-classic .c-chip-list{padding-right:0}.stackline-dropdown.theme-classic .c-token{display:inline-block;min-height:0;margin:2px 0 0;padding:2px 24px 2px 6px;border-radius:2px;background:#0079fe;box-shadow:none;color:#fff;line-height:1.4}.stackline-dropdown.theme-classic .c-token .c-label{display:inline;color:#fff;font-size:14px;font-weight:400;line-height:1.4}.stackline-dropdown.theme-classic .c-remove{right:5px;width:14px;height:14px;color:#fff}.stackline-dropdown.theme-classic .clear-all{right:42px;width:18px;height:18px;color:#333}.stackline-dropdown.theme-classic .countplaceholder{right:76px;color:#333;font-size:14px;font-weight:400}.stackline-dropdown.theme-classic .c-angle-down,.stackline-dropdown.theme-classic .c-angle-up{right:10px;width:20px;height:20px;color:#333}.stackline-dropdown.theme-classic .dropdown-list{padding-top:14px;z-index:9999}.stackline-dropdown.theme-classic .arrow-up{display:block;position:absolute;top:0;width:0;height:0;margin-left:15px;border-right:13px solid transparent;border-bottom:15px solid #ffffff;border-left:13px solid transparent}.stackline-dropdown.theme-classic .arrow-2{top:-1px;border-bottom-color:#ccc}.stackline-dropdown.theme-classic .arrow-down{display:block;position:absolute;bottom:0;width:0;height:0;margin-left:15px;border-right:13px solid transparent;border-top:15px solid #ffffff;border-left:13px solid transparent}.stackline-dropdown.theme-classic .arrow-down.arrow-2{border-top-color:#ccc}.stackline-dropdown.theme-classic .list-area{overflow:hidden;margin:0;border:1px solid #cccccc;border-radius:3px;background:#fff;box-shadow:0 1px 5px #959595}.stackline-dropdown.theme-classic .select-all,.stackline-dropdown.theme-classic .filter-select-all{padding:10px;border-bottom:1px solid #cccccc;background:#fff}.stackline-dropdown.theme-classic .list-filter{display:block;min-height:35px;padding:0;border-bottom:1px solid #cccccc;background:#fff}.stackline-dropdown.theme-classic .list-filter .c-input,.stackline-dropdown.theme-classic .list-filter input{height:35px;padding:0 35px;color:#333}.stackline-dropdown.theme-classic .list-filter .c-search{left:13px}.stackline-dropdown.theme-classic .list-filter .c-clear{right:13px}.stackline-dropdown.theme-classic .btn-container{padding:10px}.stackline-dropdown.theme-classic .btn-iceblue{min-height:35px;border-radius:3px;background:#0079fe}.stackline-dropdown.theme-classic .dropdown-list ul{margin:0;padding:0}.stackline-dropdown.theme-classic .dropdown-list ul li{min-height:0;margin:0;padding:10px;border-radius:0;color:#333;line-height:1.35}.stackline-dropdown.theme-classic .dropdown-list ul li:hover{background:#f5f5f5}.stackline-dropdown.theme-classic .selected-item,.stackline-dropdown.theme-classic .selected-item:hover{background:#e9f4ff!important;color:#333}.stackline-dropdown.theme-classic .grp-item{padding-left:30px!important}.stackline-dropdown.theme-classic .grp-title{color:#000}.stackline-dropdown.theme-classic .grp-title label,.stackline-dropdown.theme-classic .list-grp h4{font-size:14px;font-weight:700;letter-spacing:0;text-transform:capitalize}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]+label{padding-left:2em;color:#000;font-weight:300}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]+label:before{width:14px;height:14px;margin-top:-9px;border:2px solid #0079fe;border-radius:0;background:#fff}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]+label:after{top:50%;left:4px;width:8px;height:3px;margin-top:-4px;border-width:0 0 3px 3px;border-color:#fff;background:transparent}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]:focus+label:before,.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]:hover+label:before{border-color:#0079fe;background-color:#f2f2f2;box-shadow:none}.stackline-dropdown.theme-classic .pure-checkbox input[type=checkbox]:checked+label:before{border-color:#0079fe;background:#0079fe}.stackline-dropdown.theme-classic .single-select-mode .pure-checkbox input[type=checkbox]+label{padding-left:0}\n"] }]
2420
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: ListFilterPipe }], propDecorators: { data: [{
569
2421
  type: Input
570
2422
  }], settings: [{
571
2423
  type: Input
2424
+ }], loading: [{
2425
+ type: Input
572
2426
  }], onSelect: [{
573
2427
  type: Output,
574
2428
  args: ['onSelect']
@@ -587,27 +2441,67 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
587
2441
  }], onClose: [{
588
2442
  type: Output,
589
2443
  args: ['onClose']
2444
+ }], onScrollToEnd: [{
2445
+ type: Output,
2446
+ args: ['onScrollToEnd']
2447
+ }], onFilterSelectAll: [{
2448
+ type: Output,
2449
+ args: ['onFilterSelectAll']
2450
+ }], onFilterDeSelectAll: [{
2451
+ type: Output,
2452
+ args: ['onFilterDeSelectAll']
2453
+ }], onAddFilterNewItem: [{
2454
+ type: Output,
2455
+ args: ['onAddFilterNewItem']
2456
+ }], onGroupSelect: [{
2457
+ type: Output,
2458
+ args: ['onGroupSelect']
2459
+ }], onGroupDeSelect: [{
2460
+ type: Output,
2461
+ args: ['onGroupDeSelect']
590
2462
  }], itemTempl: [{
591
2463
  type: ContentChild,
592
2464
  args: [Item, { static: false }]
593
2465
  }], badgeTempl: [{
594
2466
  type: ContentChild,
595
2467
  args: [Badge, { static: false }]
2468
+ }], searchTempl: [{
2469
+ type: ContentChild,
2470
+ args: [Search, { static: false }]
596
2471
  }], searchInput: [{
597
2472
  type: ViewChild,
598
2473
  args: ['searchInput', { static: false }]
2474
+ }], selectedListElem: [{
2475
+ type: ViewChild,
2476
+ args: ['selectedList', { static: false }]
2477
+ }], dropdownListElem: [{
2478
+ type: ViewChild,
2479
+ args: ['dropdownList', { static: false }]
2480
+ }], stacklineDropdown: [{
2481
+ type: ViewChild,
2482
+ args: ['stacklineDropdown', { static: false }]
2483
+ }], onEscapeDown: [{
2484
+ type: HostListener,
2485
+ args: ['document:keyup.escape', ['$event']]
2486
+ }], onScroll: [{
2487
+ type: HostListener,
2488
+ args: ['window:scroll', ['$event']]
2489
+ }], virtualScroller: [{
2490
+ type: ViewChild,
2491
+ args: [VirtualScrollerComponent, { static: false }]
599
2492
  }] } });
600
2493
  class AngularMultiSelectModule {
601
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AngularMultiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
602
- static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.14", ngImport: i0, type: AngularMultiSelectModule, declarations: [AngularMultiSelect, ClickOutsideDirective, ScrollDirective, styleDirective, ListFilterPipe, Item, TemplateRenderer, Badge], imports: [CommonModule, FormsModule], exports: [AngularMultiSelect, ClickOutsideDirective, ScrollDirective, styleDirective, ListFilterPipe, Item, TemplateRenderer, Badge] });
603
- static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AngularMultiSelectModule, imports: [CommonModule, FormsModule] });
2494
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: AngularMultiSelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2495
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.7", ngImport: i0, type: AngularMultiSelectModule, declarations: [AngularMultiSelect, ClickOutsideDirective, ScrollDirective, styleDirective, ListFilterPipe, Item, TemplateRenderer, Badge, Search, setPosition, CIcon], imports: [CommonModule, FormsModule, VirtualScrollerModule], exports: [AngularMultiSelect, ClickOutsideDirective, ScrollDirective, styleDirective, ListFilterPipe, Item, TemplateRenderer, Badge, Search, setPosition, CIcon] });
2496
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: AngularMultiSelectModule, providers: [DataService, ListFilterPipe], imports: [CommonModule, FormsModule, VirtualScrollerModule] });
604
2497
  }
605
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: AngularMultiSelectModule, decorators: [{
2498
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.7", ngImport: i0, type: AngularMultiSelectModule, decorators: [{
606
2499
  type: NgModule,
607
2500
  args: [{
608
- imports: [CommonModule, FormsModule],
609
- declarations: [AngularMultiSelect, ClickOutsideDirective, ScrollDirective, styleDirective, ListFilterPipe, Item, TemplateRenderer, Badge],
610
- exports: [AngularMultiSelect, ClickOutsideDirective, ScrollDirective, styleDirective, ListFilterPipe, Item, TemplateRenderer, Badge]
2501
+ imports: [CommonModule, FormsModule, VirtualScrollerModule],
2502
+ declarations: [AngularMultiSelect, ClickOutsideDirective, ScrollDirective, styleDirective, ListFilterPipe, Item, TemplateRenderer, Badge, Search, setPosition, CIcon],
2503
+ exports: [AngularMultiSelect, ClickOutsideDirective, ScrollDirective, styleDirective, ListFilterPipe, Item, TemplateRenderer, Badge, Search, setPosition, CIcon],
2504
+ providers: [DataService, ListFilterPipe]
611
2505
  }]
612
2506
  }] });
613
2507
 
@@ -615,5 +2509,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
615
2509
  * Generated bundle index. Do not edit.
616
2510
  */
617
2511
 
618
- export { AngularMultiSelect, AngularMultiSelectModule, Badge, ClickOutsideDirective, Item, ListFilterPipe, ListItem, MyException, ScrollDirective, TemplateRenderer, styleDirective };
619
- //# sourceMappingURL=stackline-angular-multiselect-dropdown.mjs.map
2512
+ export { AngularMultiSelect, AngularMultiSelectModule, Badge, CIcon, ClickOutsideDirective, Item, ListFilterPipe, ScrollDirective, Search, TemplateRenderer, setPosition, styleDirective };