@colijnit/corecomponents_v12 12.0.102 → 12.0.104

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/bundles/colijnit-corecomponents_v12.umd.js +1046 -549
  2. package/bundles/colijnit-corecomponents_v12.umd.js.map +1 -1
  3. package/colijnit-corecomponents_v12.d.ts +18 -17
  4. package/colijnit-corecomponents_v12.metadata.json +1 -1
  5. package/esm2015/colijnit-corecomponents_v12.js +19 -18
  6. package/esm2015/lib/components/base/base-input.component.js +37 -30
  7. package/esm2015/lib/components/drop-down-list/drop-down-list.component.js +37 -34
  8. package/esm2015/lib/components/input-checkbox/input-checkbox.component.js +25 -20
  9. package/esm2015/lib/components/input-checkbox-multi-select/input-checkbox-multi-select.component.js +28 -23
  10. package/esm2015/lib/components/input-combo-box/input-combo-box.component.js +38 -34
  11. package/esm2015/lib/components/input-date-picker/input-date-picker.component.js +41 -37
  12. package/esm2015/lib/components/input-date-picker/input-date-picker.module.js +6 -2
  13. package/esm2015/lib/components/input-date-range-picker/input-date-range-picker.component.js +28 -25
  14. package/esm2015/lib/components/input-date-range-picker/input-date-range-picker.module.js +6 -2
  15. package/esm2015/lib/components/input-listbox/input-listbox.component.js +30 -26
  16. package/esm2015/lib/components/input-number-picker/input-number-picker.component.js +45 -40
  17. package/esm2015/lib/components/input-radio-button/input-radio-button.component.js +29 -24
  18. package/esm2015/lib/components/input-search/input-search.component.js +5 -1
  19. package/esm2015/lib/components/input-text/input-text.component.js +50 -44
  20. package/esm2015/lib/components/input-text/input-text.module.js +4 -2
  21. package/esm2015/lib/components/input-textarea/input-textarea.component.js +38 -34
  22. package/esm2015/lib/components/list-of-values/list-of-values-popup.component.js +79 -0
  23. package/esm2015/lib/components/list-of-values/list-of-values.component.js +174 -0
  24. package/esm2015/lib/components/list-of-values/list-of-values.module.js +33 -0
  25. package/esm2015/lib/components/list-of-values-multiselect-search/list-of-values-multiselect-search.component.js +101 -0
  26. package/esm2015/lib/components/list-of-values-multiselect-search/list-of-values-multiselect-search.module.js +25 -0
  27. package/esm2015/lib/components/multi-select-list/multi-select-list.component.js +37 -34
  28. package/esm2015/lib/components/validation-error/validation-error.component.js +8 -5
  29. package/esm2015/lib/components/validation-error/validation-error.module.js +4 -2
  30. package/esm2015/lib/directives/overlay/overlay.directive.js +43 -17
  31. package/esm2015/lib/service/overlay.service.js +51 -0
  32. package/esm2015/public-api.js +7 -2
  33. package/fesm2015/colijnit-corecomponents_v12.js +1207 -690
  34. package/fesm2015/colijnit-corecomponents_v12.js.map +1 -1
  35. package/lib/components/base/base-input.component.d.ts +4 -3
  36. package/lib/components/base-input-date-picker/style/_layout.scss +91 -0
  37. package/lib/components/base-input-date-picker/style/_material-definition.scss +0 -0
  38. package/lib/components/base-input-date-picker/style/_theme.scss +4 -0
  39. package/lib/components/base-input-date-picker/style/material.scss +4 -0
  40. package/lib/components/co-input-date-picker/style/_layout.scss +5 -0
  41. package/lib/components/co-input-date-picker/style/_material-definition.scss +0 -0
  42. package/lib/components/co-input-date-picker/style/_theme.scss +0 -0
  43. package/lib/components/co-input-date-picker/style/material.scss +4 -0
  44. package/lib/components/co-input-date-range-picker/style/_layout.scss +18 -0
  45. package/lib/components/co-input-date-range-picker/style/_material-definition.scss +0 -0
  46. package/lib/components/co-input-date-range-picker/style/_theme.scss +0 -0
  47. package/lib/components/co-input-date-range-picker/style/material.scss +4 -0
  48. package/lib/components/drop-down-list/drop-down-list.component.d.ts +8 -6
  49. package/lib/components/filter-item/style/_material-definition.scss +1 -1
  50. package/lib/components/filter-item/style/_theme.scss +4 -1
  51. package/lib/components/input-checkbox/input-checkbox.component.d.ts +9 -7
  52. package/lib/components/input-checkbox/style/_layout.scss +1 -4
  53. package/lib/components/input-checkbox/style/_theme.scss +2 -1
  54. package/lib/components/input-checkbox-multi-select/input-checkbox-multi-select.component.d.ts +8 -6
  55. package/lib/components/input-combo-box/input-combo-box.component.d.ts +9 -7
  56. package/lib/components/input-date-picker/input-date-picker.component.d.ts +11 -9
  57. package/lib/components/input-date-range-picker/input-date-range-picker.component.d.ts +1 -1
  58. package/lib/components/input-listbox/input-listbox.component.d.ts +9 -7
  59. package/lib/components/input-number-picker/input-number-picker.component.d.ts +12 -10
  60. package/lib/components/input-radio-button/input-radio-button.component.d.ts +7 -5
  61. package/lib/components/input-text/input-text.component.d.ts +9 -7
  62. package/lib/components/input-text/style/_layout.scss +1 -1
  63. package/lib/components/input-textarea/input-textarea.component.d.ts +8 -6
  64. package/lib/components/list-of-values/list-of-values-popup.component.d.ts +22 -0
  65. package/lib/components/list-of-values/list-of-values.component.d.ts +35 -0
  66. package/lib/components/list-of-values/list-of-values.module.d.ts +2 -0
  67. package/lib/components/list-of-values/style/_layout.scss +101 -13
  68. package/lib/components/list-of-values/style/_material-definition.scss +15 -0
  69. package/lib/components/list-of-values-multiselect-search/list-of-values-multiselect-search.component.d.ts +21 -0
  70. package/lib/components/list-of-values-multiselect-search/list-of-values-multiselect-search.module.d.ts +2 -0
  71. package/lib/components/list-of-values-multiselect-search/style/_layout.scss +69 -0
  72. package/lib/components/list-of-values-multiselect-search/style/_material-definition.scss +8 -0
  73. package/lib/components/list-of-values-multiselect-search/style/_theme.scss +0 -0
  74. package/lib/components/list-of-values-multiselect-search/style/material.scss +4 -0
  75. package/lib/components/multi-select-list/multi-select-list.component.d.ts +8 -6
  76. package/lib/components/simple-grid/style/_layout.scss +4 -3
  77. package/lib/components/simple-grid/style/_material-definition.scss +3 -2
  78. package/lib/components/validation-error/style/_layout.scss +40 -30
  79. package/lib/components/validation-error/style/_theme.scss +23 -9
  80. package/lib/components/validation-error/validation-error.component.d.ts +2 -0
  81. package/lib/directives/overlay/overlay.directive.d.ts +5 -3
  82. package/lib/service/overlay.service.d.ts +10 -0
  83. package/lib/style/_variables.scss +9 -7
  84. package/package.json +1 -1
  85. package/public-api.d.ts +6 -1
@@ -4296,7 +4296,7 @@
4296
4296
  ValidationErrorComponent.decorators = [
4297
4297
  { type: i0.Component, args: [{
4298
4298
  selector: "co-validation-error",
4299
- template: "\n <div class=\"validation-error-content\">\n <co-icon [iconData]=\"icons.getIcon(Icons.InformationRoundOpen)\"></co-icon>\n <div class=\"validation-error-message\" [textContent]=\"error\"></div>\n </div>\n ",
4299
+ template: "\n <div class=\"validation-error-wrapper\" [overlay]=\"parentForOverlay\">\n <div class=\"validation-error-content\">\n <co-icon [iconData]=\"icons.getIcon(Icons.InformationRoundOpen)\"></co-icon>\n <div class=\"validation-error-message\" [textContent]=\"error\"></div>\n </div>\n </div>\n ",
4300
4300
  animations: [],
4301
4301
  encapsulation: i0.ViewEncapsulation.None
4302
4302
  },] }
@@ -4306,20 +4306,78 @@
4306
4306
  ]; };
4307
4307
  ValidationErrorComponent.propDecorators = {
4308
4308
  error: [{ type: i0.Input }],
4309
+ parentForOverlay: [{ type: i0.Input }],
4309
4310
  top: [{ type: i0.HostBinding, args: ['style.top.px',] }, { type: i0.Input }],
4310
4311
  left: [{ type: i0.HostBinding, args: ['style.left.px',] }, { type: i0.Input }],
4311
4312
  showClass: [{ type: i0.HostBinding, args: ['class.co-validation-error',] }]
4312
4313
  };
4313
4314
 
4315
+ var OverlayService = /** @class */ (function () {
4316
+ function OverlayService(_componentFactoryResolver, _appRef, _injector) {
4317
+ this._componentFactoryResolver = _componentFactoryResolver;
4318
+ this._appRef = _appRef;
4319
+ this._injector = _injector;
4320
+ }
4321
+ OverlayService.prototype.createComponent = function (compClass, inputs, events) {
4322
+ var _this = this;
4323
+ if (this._componentRef) {
4324
+ this.removeComponent();
4325
+ }
4326
+ this._componentRef = this._componentFactoryResolver
4327
+ .resolveComponentFactory(compClass)
4328
+ .create(this._injector);
4329
+ if (inputs) {
4330
+ for (var property in inputs) {
4331
+ if (inputs.hasOwnProperty(property)) {
4332
+ this._componentRef.instance[property] = inputs[property];
4333
+ }
4334
+ }
4335
+ }
4336
+ if (events) {
4337
+ var _loop_1 = function (event) {
4338
+ if (events.hasOwnProperty(event)) {
4339
+ this_1._componentRef.instance[event].subscribe(function (value) { return events[event](value); });
4340
+ }
4341
+ };
4342
+ var this_1 = this;
4343
+ for (var event in events) {
4344
+ _loop_1(event);
4345
+ }
4346
+ }
4347
+ this._appRef.attachView(this._componentRef.hostView);
4348
+ var domElem = this._componentRef.hostView
4349
+ .rootNodes[0];
4350
+ document.body.appendChild(domElem);
4351
+ this._componentRef.onDestroy(function () {
4352
+ _this._appRef.detachView(_this._componentRef.hostView);
4353
+ });
4354
+ };
4355
+ OverlayService.prototype.removeComponent = function () {
4356
+ if (this._componentRef) {
4357
+ this._componentRef.destroy();
4358
+ }
4359
+ };
4360
+ return OverlayService;
4361
+ }());
4362
+ OverlayService.decorators = [
4363
+ { type: i0.Injectable }
4364
+ ];
4365
+ OverlayService.ctorParameters = function () { return [
4366
+ { type: i0.ComponentFactoryResolver },
4367
+ { type: i0.ApplicationRef },
4368
+ { type: i0.Injector }
4369
+ ]; };
4370
+
4314
4371
  /**
4315
4372
  * Abstract base class for all concrete form input components that contain a native <input> element. Provides common data and functionality, such as
4316
4373
  * adding self as a control to the parent form.
4317
4374
  */
4318
4375
  var BaseInputComponent = /** @class */ (function () {
4319
- function BaseInputComponent(changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
4376
+ function BaseInputComponent(changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) {
4320
4377
  var _this = this;
4321
4378
  this.changeDetector = changeDetector;
4322
4379
  this.componentFactoryResolver = componentFactoryResolver;
4380
+ this.overlayService = overlayService;
4323
4381
  this.formUserChangeListener = formUserChangeListener;
4324
4382
  this.ngZoneWrapper = ngZoneWrapper;
4325
4383
  this.elementRef = elementRef;
@@ -4353,6 +4411,7 @@
4353
4411
  this.canSaveOrCancel = false;
4354
4412
  this.committing = false;
4355
4413
  this.commitFinished = false;
4414
+ this.validationError = "";
4356
4415
  this._markedAsUserTouched = false;
4357
4416
  this._destroyed = false;
4358
4417
  this._hasOnPushCdStrategy = false;
@@ -4630,17 +4689,19 @@
4630
4689
  this.markAsUserTouched();
4631
4690
  }
4632
4691
  };
4633
- BaseInputComponent.prototype.handleDocumentScroll = function () {
4634
- this._positionValidationError();
4635
- };
4636
- BaseInputComponent.prototype.handleWindowResize = function () {
4637
- this._positionValidationError();
4638
- };
4692
+ // @HostListener("document:scroll")
4693
+ // public handleDocumentScroll(): void {
4694
+ // this._positionValidationError();
4695
+ // }
4696
+ // @HostListener("window:resize")
4697
+ // public handleWindowResize(): void {
4698
+ // this._positionValidationError();
4699
+ // }
4639
4700
  BaseInputComponent.prototype.handleKeyDown = function (event) {
4640
4701
  if (this.showSaveCancel && this.canSaveOrCancel) {
4641
4702
  this._handleKeyDown(event);
4642
4703
  }
4643
- this._positionValidationError();
4704
+ // this._positionValidationError();
4644
4705
  };
4645
4706
  Object.defineProperty(BaseInputComponent.prototype, "canChange", {
4646
4707
  get: function () {
@@ -4755,18 +4816,20 @@
4755
4816
  this.keepFocus = false;
4756
4817
  };
4757
4818
  BaseInputComponent.prototype.showValidationError = function (error) {
4758
- if (this.validationErrorContainer) {
4759
- if (this._errorValidationComponent) {
4760
- this._clearErrorComponent();
4761
- }
4762
- var componentFactory = this.componentFactoryResolver.resolveComponentFactory(ValidationErrorComponent);
4763
- this._errorValidationComponent = this.validationErrorContainer.createComponent(componentFactory);
4764
- this._errorValidationComponent.instance.error = error;
4765
- if (this._hasOnPushCdStrategy) {
4766
- this.changeDetector.markForCheck();
4767
- }
4768
- this._positionValidationError();
4769
- }
4819
+ this.validationError = error;
4820
+ this.overlayService.createComponent(ValidationErrorComponent, { parentForOverlay: this.elementRef, error: error });
4821
+ // if (this.validationErrorContainer) {
4822
+ // if (this._errorValidationComponent) {
4823
+ // this._clearErrorComponent();
4824
+ // }
4825
+ // const componentFactory: ComponentFactory<ValidationErrorComponent> = this.componentFactoryResolver.resolveComponentFactory(ValidationErrorComponent);
4826
+ // this._errorValidationComponent = this.validationErrorContainer.createComponent(componentFactory);
4827
+ // this._errorValidationComponent.instance.error = error;
4828
+ // if (this._hasOnPushCdStrategy) {
4829
+ // this.changeDetector.markForCheck();
4830
+ // }
4831
+ // this._positionValidationError();
4832
+ // }
4770
4833
  };
4771
4834
  /**
4772
4835
  * Emits a modelChange event with given value, indicating that the model of this form input
@@ -4943,13 +5006,14 @@
4943
5006
  });
4944
5007
  };
4945
5008
  BaseInputComponent.prototype._clearErrorComponent = function () {
4946
- if (this.validationErrorContainer) {
4947
- this.validationErrorContainer.clear();
4948
- if (this._errorValidationComponent) {
4949
- this._errorValidationComponent.destroy();
4950
- this._errorValidationComponent = undefined;
4951
- }
4952
- }
5009
+ this.overlayService.removeComponent();
5010
+ // if (this.validationErrorContainer) {
5011
+ // this.validationErrorContainer.clear();
5012
+ // if (this._errorValidationComponent) {
5013
+ // this._errorValidationComponent.destroy();
5014
+ // this._errorValidationComponent = undefined;
5015
+ // }
5016
+ // }
4953
5017
  };
4954
5018
  // whether this.ngModel.control has safe access
4955
5019
  BaseInputComponent.prototype._controlExists = function () {
@@ -5126,6 +5190,7 @@
5126
5190
  BaseInputComponent.ctorParameters = function () { return [
5127
5191
  { type: i0.ChangeDetectorRef },
5128
5192
  { type: i0.ComponentFactoryResolver },
5193
+ { type: OverlayService },
5129
5194
  { type: FormInputUserModelChangeListenerService, decorators: [{ type: i0.Optional }] },
5130
5195
  { type: NgZoneWrapperService, decorators: [{ type: i0.Optional }] },
5131
5196
  { type: i0.ElementRef, decorators: [{ type: i0.Optional }] }
@@ -5185,8 +5250,6 @@
5185
5250
  validationDisabled: [{ type: i0.HostBinding, args: ["class.no-validation",] }],
5186
5251
  onClick: [{ type: i0.HostListener, args: ["click", ["$event"],] }],
5187
5252
  onFocusIn: [{ type: i0.HostListener, args: ["focusin",] }],
5188
- handleDocumentScroll: [{ type: i0.HostListener, args: ["document:scroll",] }],
5189
- handleWindowResize: [{ type: i0.HostListener, args: ["window:resize",] }],
5190
5253
  handleKeyDown: [{ type: i0.HostListener, args: ["keydown", ["$event"],] }]
5191
5254
  };
5192
5255
  __decorate([
@@ -5521,10 +5584,11 @@
5521
5584
 
5522
5585
  var DropDownListComponent = /** @class */ (function (_super) {
5523
5586
  __extends(DropDownListComponent, _super);
5524
- function DropDownListComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
5525
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
5587
+ function DropDownListComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
5588
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
5526
5589
  _this.formComponent = formComponent;
5527
5590
  _this.changeDetector = changeDetector;
5591
+ _this.overlayService = overlayService;
5528
5592
  _this.componentFactoryResolver = componentFactoryResolver;
5529
5593
  _this.formUserChangeListener = formUserChangeListener;
5530
5594
  _this.ngZoneWrapper = ngZoneWrapper;
@@ -5545,9 +5609,10 @@
5545
5609
  }(BaseInputComponent));
5546
5610
  DropDownListComponent.decorators = [
5547
5611
  { type: i0.Component, args: [{
5548
- selector: "co-drop-down-list",
5549
- template: "\n <ejs-dropdownlist\n [dataSource]=\"collection\"\n [allowFiltering]=\"allowFiltering\"\n [value]=\"model\"\n [fields]=\"fields\"\n [filterBarPlaceholder]=\"filterBarPlaceholder\"\n [filterType]=\"filterType\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [itemTemplate]=\"itemTemplate\"\n [headerTemplate]=\"headerTemplate\"\n [valueTemplate]=\"valueTemplate\"\n [disabled]=\"disabled\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-dropdownlist>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
5612
+ selector: 'co-drop-down-list',
5613
+ template: "\n <ejs-dropdownlist\n [dataSource]=\"collection\"\n [allowFiltering]=\"allowFiltering\"\n [value]=\"model\"\n [fields]=\"fields\"\n [filterBarPlaceholder]=\"filterBarPlaceholder\"\n [filterType]=\"filterType\"\n [placeholder]=\"placeholder\"\n [readonly]=\"readonly\"\n [itemTemplate]=\"itemTemplate\"\n [headerTemplate]=\"headerTemplate\"\n [valueTemplate]=\"valueTemplate\"\n [disabled]=\"disabled\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-dropdownlist>\n <div class=\"required-indicator\"></div>\n ",
5550
5614
  providers: [
5615
+ OverlayService,
5551
5616
  ej2AngularDropdowns.CheckBoxSelectionService,
5552
5617
  {
5553
5618
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
@@ -5563,6 +5628,7 @@
5563
5628
  DropDownListComponent.ctorParameters = function () { return [
5564
5629
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
5565
5630
  { type: i0.ChangeDetectorRef },
5631
+ { type: OverlayService },
5566
5632
  { type: i0.ComponentFactoryResolver },
5567
5633
  { type: FormInputUserModelChangeListenerService },
5568
5634
  { type: NgZoneWrapperService },
@@ -5578,7 +5644,7 @@
5578
5644
  itemTemplate: [{ type: i0.Input }],
5579
5645
  headerTemplate: [{ type: i0.Input }],
5580
5646
  valueTemplate: [{ type: i0.Input }],
5581
- showClass: [{ type: i0.HostBinding, args: ["class.co-drop-down-list",] }]
5647
+ showClass: [{ type: i0.HostBinding, args: ['class.co-drop-down-list',] }]
5582
5648
  };
5583
5649
 
5584
5650
  var DropDownModule = /** @class */ (function () {
@@ -6300,11 +6366,12 @@
6300
6366
 
6301
6367
  var InputCheckboxComponent = /** @class */ (function (_super) {
6302
6368
  __extends(InputCheckboxComponent, _super);
6303
- function InputCheckboxComponent(formComponent, iconCacheService, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6304
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6369
+ function InputCheckboxComponent(formComponent, iconCacheService, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6370
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6305
6371
  _this.formComponent = formComponent;
6306
6372
  _this.iconCacheService = iconCacheService;
6307
6373
  _this.changeDetector = changeDetector;
6374
+ _this.overlayService = overlayService;
6308
6375
  _this.componentFactoryResolver = componentFactoryResolver;
6309
6376
  _this.formUserChangeListener = formUserChangeListener;
6310
6377
  _this.ngZoneWrapper = ngZoneWrapper;
@@ -6331,15 +6398,17 @@
6331
6398
  }(BaseInputComponent));
6332
6399
  InputCheckboxComponent.decorators = [
6333
6400
  { type: i0.Component, args: [{
6334
- selector: "co-input-checkbox",
6335
- template: "\n <div class=\"checkbox\" (click)=\"handleModelChange($event)\" [class.checked]=\"model\">\n <div class=\"checkmark\" [class.show]=\"model\"></div>\n </div>\n <div class=\"label\" [class.clickable]=\"clickableLabel\" *ngIf=\"label\" [textContent]=\"label\"\n (click)=\"clickableLabel ? handleModelChange($event) : true\"></div>\n ",
6336
- providers: [{
6401
+ selector: 'co-input-checkbox',
6402
+ template: "\n <div class=\"checkbox\" (click)=\"handleModelChange($event)\" [class.checked]=\"model\">\n <div class=\"checkmark\" [class.show]=\"model\"></div>\n </div>\n <div class=\"label\" [class.clickable]=\"clickableLabel\" *ngIf=\"label\" [textContent]=\"label\"\n (click)=\"clickableLabel ? handleModelChange($event) : true\"></div>\n ",
6403
+ providers: [
6404
+ OverlayService, {
6337
6405
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
6338
6406
  useExisting: i0.forwardRef(function () { return InputCheckboxComponent; })
6339
6407
  }, {
6340
6408
  provide: BaseInputComponent,
6341
6409
  useExisting: InputCheckboxComponent
6342
- }],
6410
+ }
6411
+ ],
6343
6412
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
6344
6413
  encapsulation: i0.ViewEncapsulation.None
6345
6414
  },] }
@@ -6348,6 +6417,7 @@
6348
6417
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
6349
6418
  { type: IconCacheService },
6350
6419
  { type: i0.ChangeDetectorRef },
6420
+ { type: OverlayService },
6351
6421
  { type: i0.ComponentFactoryResolver },
6352
6422
  { type: FormInputUserModelChangeListenerService },
6353
6423
  { type: NgZoneWrapperService },
@@ -6357,7 +6427,7 @@
6357
6427
  cssClass: [{ type: i0.Input }],
6358
6428
  clickableLabel: [{ type: i0.Input }],
6359
6429
  modelChange: [{ type: i0.Output }],
6360
- showClass: [{ type: i0.HostBinding, args: ["class.co-input-checkbox",] }]
6430
+ showClass: [{ type: i0.HostBinding, args: ['class.co-input-checkbox',] }]
6361
6431
  };
6362
6432
 
6363
6433
  ej2Base.enableRipple(true);
@@ -6416,10 +6486,11 @@
6416
6486
 
6417
6487
  var InputCheckboxMultiSelectComponent = /** @class */ (function (_super) {
6418
6488
  __extends(InputCheckboxMultiSelectComponent, _super);
6419
- function InputCheckboxMultiSelectComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6420
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6489
+ function InputCheckboxMultiSelectComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6490
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6421
6491
  _this.formComponent = formComponent;
6422
6492
  _this.changeDetector = changeDetector;
6493
+ _this.overlayService = overlayService;
6423
6494
  _this.componentFactoryResolver = componentFactoryResolver;
6424
6495
  _this.formUserChangeListener = formUserChangeListener;
6425
6496
  _this.ngZoneWrapper = ngZoneWrapper;
@@ -6434,15 +6505,17 @@
6434
6505
  }(BaseInputComponent));
6435
6506
  InputCheckboxMultiSelectComponent.decorators = [
6436
6507
  { type: i0.Component, args: [{
6437
- selector: "co-input-checkbox-multi-select",
6438
- template: "\n <ejs-multiselect\n [placeholder]=\"placeholder\"\n [dataSource]=\"source\"\n [fields]=\"fields\"\n mode=\"CheckBox\"\n showDropDownIcon=\"true\"\n [showSelectAll]=\"false\"\n [filterBarPlaceholder]=\"filterPlaceholder\"\n ></ejs-multiselect>\n ",
6439
- providers: [{
6508
+ selector: 'co-input-checkbox-multi-select',
6509
+ template: "\n <ejs-multiselect\n [placeholder]=\"placeholder\"\n [dataSource]=\"source\"\n [fields]=\"fields\"\n mode=\"CheckBox\"\n showDropDownIcon=\"true\"\n [showSelectAll]=\"false\"\n [filterBarPlaceholder]=\"filterPlaceholder\"\n ></ejs-multiselect>\n ",
6510
+ providers: [
6511
+ OverlayService, {
6440
6512
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
6441
6513
  useExisting: i0.forwardRef(function () { return InputCheckboxMultiSelectComponent; })
6442
6514
  }, {
6443
6515
  provide: BaseInputComponent,
6444
6516
  useExisting: InputCheckboxMultiSelectComponent
6445
- }],
6517
+ }
6518
+ ],
6446
6519
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
6447
6520
  encapsulation: i0.ViewEncapsulation.None
6448
6521
  },] }
@@ -6450,6 +6523,7 @@
6450
6523
  InputCheckboxMultiSelectComponent.ctorParameters = function () { return [
6451
6524
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
6452
6525
  { type: i0.ChangeDetectorRef },
6526
+ { type: OverlayService },
6453
6527
  { type: i0.ComponentFactoryResolver },
6454
6528
  { type: FormInputUserModelChangeListenerService },
6455
6529
  { type: NgZoneWrapperService },
@@ -6461,7 +6535,7 @@
6461
6535
  selected: [{ type: i0.Input }],
6462
6536
  placeholder: [{ type: i0.Input }],
6463
6537
  filterPlaceholder: [{ type: i0.Input }],
6464
- showClass: [{ type: i0.HostBinding, args: ["class.co-input-checkbox-multi-select",] }]
6538
+ showClass: [{ type: i0.HostBinding, args: ['class.co-input-checkbox-multi-select',] }]
6465
6539
  };
6466
6540
 
6467
6541
  var InputCheckboxMultiSelectModule = /** @class */ (function () {
@@ -6486,10 +6560,11 @@
6486
6560
 
6487
6561
  var InputComboBoxComponent = /** @class */ (function (_super) {
6488
6562
  __extends(InputComboBoxComponent, _super);
6489
- function InputComboBoxComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6490
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6563
+ function InputComboBoxComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6564
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6491
6565
  _this.formComponent = formComponent;
6492
6566
  _this.changeDetector = changeDetector;
6567
+ _this.overlayService = overlayService;
6493
6568
  _this.componentFactoryResolver = componentFactoryResolver;
6494
6569
  _this.formUserChangeListener = formUserChangeListener;
6495
6570
  _this.ngZoneWrapper = ngZoneWrapper;
@@ -6514,28 +6589,31 @@
6514
6589
  }(BaseInputComponent));
6515
6590
  InputComboBoxComponent.decorators = [
6516
6591
  { type: i0.Component, args: [{
6517
- selector: "co-input-combo-box",
6518
- template: "\n <ejs-combobox #combo [dataSource]=\"collection\"\n [fields]=\"fields\"\n [disabled]=\"readonly\"\n [placeholder]=\"placeholder\"\n [autofill]=\"autofill\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (valueChange)=\"valueChange.emit($event)\"\n (focus)=\"onFocus()\"\n [popupWidth]=\"popupWidth\"\n [popupHeight]=\"popupHeight\"\n [filterType]=\"filterType\"\n [allowFiltering]=\"allowFiltering\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-combobox>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
6519
- providers: [{
6592
+ selector: 'co-input-combo-box',
6593
+ template: "\n <ejs-combobox #combo [dataSource]=\"collection\"\n [fields]=\"fields\"\n [disabled]=\"readonly\"\n [placeholder]=\"placeholder\"\n [autofill]=\"autofill\"\n [ngModel]=\"model\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (valueChange)=\"valueChange.emit($event)\"\n (focus)=\"onFocus()\"\n [popupWidth]=\"popupWidth\"\n [popupHeight]=\"popupHeight\"\n [filterType]=\"filterType\"\n [allowFiltering]=\"allowFiltering\"\n showClearButton=\"true\"\n floatLabelType=\"Auto\"\n >\n </ejs-combobox>\n <div class=\"required-indicator\"></div>\n ",
6594
+ providers: [
6595
+ OverlayService, {
6520
6596
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
6521
6597
  useExisting: i0.forwardRef(function () { return InputComboBoxComponent; })
6522
6598
  }, {
6523
6599
  provide: BaseInputComponent,
6524
6600
  useExisting: InputComboBoxComponent
6525
- }],
6601
+ }
6602
+ ],
6526
6603
  encapsulation: i0.ViewEncapsulation.None
6527
6604
  },] }
6528
6605
  ];
6529
6606
  InputComboBoxComponent.ctorParameters = function () { return [
6530
6607
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
6531
6608
  { type: i0.ChangeDetectorRef },
6609
+ { type: OverlayService },
6532
6610
  { type: i0.ComponentFactoryResolver },
6533
6611
  { type: FormInputUserModelChangeListenerService },
6534
6612
  { type: NgZoneWrapperService },
6535
6613
  { type: i0.ElementRef }
6536
6614
  ]; };
6537
6615
  InputComboBoxComponent.propDecorators = {
6538
- combo: [{ type: i0.ViewChild, args: ["combo",] }],
6616
+ combo: [{ type: i0.ViewChild, args: ['combo',] }],
6539
6617
  autofill: [{ type: i0.Input }],
6540
6618
  allowFiltering: [{ type: i0.Input }],
6541
6619
  filterType: [{ type: i0.Input }],
@@ -6548,7 +6626,7 @@
6548
6626
  popupWidth: [{ type: i0.Input }],
6549
6627
  valueChange: [{ type: i0.Output }],
6550
6628
  isSmall: [{ type: i0.HostBinding, args: ['class.is-small',] }, { type: i0.Input }],
6551
- showClass: [{ type: i0.HostBinding, args: ["class.co-input-combo-box",] }]
6629
+ showClass: [{ type: i0.HostBinding, args: ['class.co-input-combo-box',] }]
6552
6630
  };
6553
6631
 
6554
6632
  var InputComboBoxModule = /** @class */ (function () {
@@ -6573,20 +6651,21 @@
6573
6651
 
6574
6652
  var InputDatePickerComponent = /** @class */ (function (_super) {
6575
6653
  __extends(InputDatePickerComponent, _super);
6576
- function InputDatePickerComponent(formComponent, iconCacheService, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6577
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6654
+ function InputDatePickerComponent(formComponent, iconCacheService, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6655
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6578
6656
  _this.formComponent = formComponent;
6579
6657
  _this.iconCacheService = iconCacheService;
6580
6658
  _this.changeDetector = changeDetector;
6659
+ _this.overlayService = overlayService;
6581
6660
  _this.componentFactoryResolver = componentFactoryResolver;
6582
6661
  _this.formUserChangeListener = formUserChangeListener;
6583
6662
  _this.ngZoneWrapper = ngZoneWrapper;
6584
6663
  _this.elementRef = elementRef;
6585
6664
  _this.icons = exports.CoreComponentsIcon;
6586
- _this.dateFormat = "dd-MM-yyyy";
6665
+ _this.dateFormat = 'dd-MM-yyyy';
6587
6666
  _this.calendarIconName = _this.icons.CalendarEmpty;
6588
- _this.iconHeight = "24px";
6589
- _this.placeholder = "";
6667
+ _this.iconHeight = '24px';
6668
+ _this.placeholder = '';
6590
6669
  _this.blur = new i0.EventEmitter();
6591
6670
  _this.isMinimal = false;
6592
6671
  _super.prototype._markAsOnPush.call(_this);
@@ -6633,14 +6712,16 @@
6633
6712
  }(BaseInputComponent));
6634
6713
  InputDatePickerComponent.decorators = [
6635
6714
  { type: i0.Component, args: [{
6636
- selector: "co-input-date",
6637
- template: "\n <ejs-datepicker #ejsDatePicker\n floatLabelType=\"Auto\"\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></ejs-datepicker>\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
6638
- providers: [{
6715
+ selector: 'co-input-date',
6716
+ template: "\n <ejs-datepicker #ejsDatePicker\n floatLabelType=\"Auto\"\n [format]=\"dateFormat\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></ejs-datepicker>\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n <div class=\"required-indicator\"></div>\n ",
6717
+ providers: [
6718
+ OverlayService, {
6639
6719
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, useExisting: i0.forwardRef(function () { return InputDatePickerComponent; })
6640
6720
  }, {
6641
6721
  provide: BaseInputComponent,
6642
6722
  useExisting: InputDatePickerComponent
6643
- }],
6723
+ }
6724
+ ],
6644
6725
  encapsulation: i0.ViewEncapsulation.None
6645
6726
  },] }
6646
6727
  ];
@@ -6648,20 +6729,21 @@
6648
6729
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
6649
6730
  { type: IconCacheService },
6650
6731
  { type: i0.ChangeDetectorRef },
6732
+ { type: OverlayService },
6651
6733
  { type: i0.ComponentFactoryResolver },
6652
6734
  { type: FormInputUserModelChangeListenerService },
6653
6735
  { type: NgZoneWrapperService },
6654
6736
  { type: i0.ElementRef }
6655
6737
  ]; };
6656
6738
  InputDatePickerComponent.propDecorators = {
6657
- ejsDatePicker: [{ type: i0.ViewChild, args: ["ejsDatePicker",] }],
6739
+ ejsDatePicker: [{ type: i0.ViewChild, args: ['ejsDatePicker',] }],
6658
6740
  dateFormat: [{ type: i0.Input }],
6659
6741
  calendarIconName: [{ type: i0.Input }],
6660
6742
  iconHeight: [{ type: i0.Input }],
6661
6743
  placeholder: [{ type: i0.Input }],
6662
6744
  width: [{ type: i0.Input }],
6663
6745
  blur: [{ type: i0.Output }],
6664
- showClass: [{ type: i0.HostBinding, args: ["class.co-input-date",] }],
6746
+ showClass: [{ type: i0.HostBinding, args: ['class.co-input-date',] }],
6665
6747
  isMinimal: [{ type: i0.HostBinding, args: ['class.is-minimal',] }, { type: i0.Input }]
6666
6748
  };
6667
6749
 
@@ -6774,6 +6856,169 @@
6774
6856
  },] }
6775
6857
  ];
6776
6858
 
6859
+ var OverlayDirective = /** @class */ (function () {
6860
+ function OverlayDirective(elementRef) {
6861
+ var _this = this;
6862
+ this.keepInView = false;
6863
+ this.inheritWidth = false;
6864
+ this.handleScroll = function (event) {
6865
+ _this._checkAndPlaceElement();
6866
+ };
6867
+ this._elementRef = elementRef;
6868
+ }
6869
+ Object.defineProperty(OverlayDirective.prototype, "parent", {
6870
+ set: function (value) {
6871
+ if (value) {
6872
+ this._parent = value instanceof i0.ElementRef ? value : value.elementRef;
6873
+ }
6874
+ else {
6875
+ if (this._parent) {
6876
+ this._resizeObserver.disconnect();
6877
+ }
6878
+ }
6879
+ },
6880
+ enumerable: false,
6881
+ configurable: true
6882
+ });
6883
+ OverlayDirective.prototype.ngOnDestroy = function () {
6884
+ document.removeEventListener("scroll", this.handleScroll, true);
6885
+ this._intersectionObserver.disconnect();
6886
+ this._resizeObserver.disconnect();
6887
+ this._elementRef = undefined;
6888
+ this._parent = undefined;
6889
+ };
6890
+ OverlayDirective.prototype.ngOnInit = function () {
6891
+ var _this = this;
6892
+ if (!this._elementRef || !this._elementRef.nativeElement) {
6893
+ return;
6894
+ }
6895
+ document.addEventListener("scroll", this.handleScroll, true);
6896
+ this._checkAndPlaceElement();
6897
+ this._resizeObserver = new ResizeObserver(function (entries) {
6898
+ _this._checkAndPlaceElement();
6899
+ });
6900
+ this._intersectionObserver = new IntersectionObserver(function (entries) {
6901
+ if (entries && entries.length > 0) {
6902
+ if (entries[0].isIntersecting === false) {
6903
+ _this._elementRef.nativeElement.style.opacity = 0; // hide cause parent is not visible
6904
+ }
6905
+ else {
6906
+ _this._elementRef.nativeElement.style.opacity = 1;
6907
+ }
6908
+ }
6909
+ }, {
6910
+ root: null
6911
+ });
6912
+ this._intersectionObserver.observe(this._parent.nativeElement); // observe parent for visibility
6913
+ this._resizeObserver.observe(document.body);
6914
+ };
6915
+ OverlayDirective.prototype._checkAndPlaceElement = function () {
6916
+ if (this._elementRef && this._elementRef.nativeElement && this._parent && this._parent.nativeElement) {
6917
+ var elementRect = this._elementRef.nativeElement.getBoundingClientRect();
6918
+ var parentRect = this._parent.nativeElement.getBoundingClientRect();
6919
+ this._placeElement(window.innerHeight, window.innerWidth, parentRect, elementRect);
6920
+ }
6921
+ };
6922
+ OverlayDirective.prototype._placeElement = function (bottom, right, parentRect, elementRect) {
6923
+ if (bottom < parentRect.bottom + elementRect.height) { // make sure it fits at the bottom
6924
+ this._elementRef.nativeElement.style.top = (parentRect.top - elementRect.height) + "px";
6925
+ this._elementRef.nativeElement.classList.add('top');
6926
+ }
6927
+ else {
6928
+ this._elementRef.nativeElement.classList.remove('top');
6929
+ this._elementRef.nativeElement.style.top = parentRect.bottom + "px";
6930
+ }
6931
+ if (this.inheritWidth) {
6932
+ this._elementRef.nativeElement.style.width = parentRect.width + "px";
6933
+ }
6934
+ this._elementRef.nativeElement.style.left = parentRect.left + "px";
6935
+ if (this.keepInView) {
6936
+ if (elementRect.right > window.innerWidth) {
6937
+ //see if we can move it to the left
6938
+ if ((window.innerWidth - elementRect.width) > 0) {
6939
+ this._elementRef.nativeElement.style.left = (window.innerWidth - elementRect.width) + "px";
6940
+ }
6941
+ else { //resize so it fits into view
6942
+ this._elementRef.nativeElement.style.width = window.innerWidth + "px";
6943
+ this._elementRef.nativeElement.style.left = 0;
6944
+ }
6945
+ }
6946
+ }
6947
+ };
6948
+ return OverlayDirective;
6949
+ }());
6950
+ OverlayDirective.decorators = [
6951
+ { type: i0.Directive, args: [{
6952
+ selector: "[overlay]"
6953
+ },] }
6954
+ ];
6955
+ OverlayDirective.ctorParameters = function () { return [
6956
+ { type: i0.ElementRef }
6957
+ ]; };
6958
+ OverlayDirective.propDecorators = {
6959
+ parent: [{ type: i0.Input, args: ["overlay",] }],
6960
+ keepInView: [{ type: i0.Input }],
6961
+ inheritWidth: [{ type: i0.Input }]
6962
+ };
6963
+
6964
+ var OverlayParentDirective = /** @class */ (function () {
6965
+ function OverlayParentDirective(elementRef) {
6966
+ this.elementRef = elementRef;
6967
+ }
6968
+ OverlayParentDirective.prototype.ngOnDestroy = function () {
6969
+ this.elementRef = undefined;
6970
+ };
6971
+ return OverlayParentDirective;
6972
+ }());
6973
+ OverlayParentDirective.decorators = [
6974
+ { type: i0.Directive, args: [{
6975
+ selector: '[overlayParent]',
6976
+ exportAs: 'overlayParent'
6977
+ },] }
6978
+ ];
6979
+ OverlayParentDirective.ctorParameters = function () { return [
6980
+ { type: i0.ElementRef }
6981
+ ]; };
6982
+
6983
+ var OverlayModule = /** @class */ (function () {
6984
+ function OverlayModule() {
6985
+ }
6986
+ return OverlayModule;
6987
+ }());
6988
+ OverlayModule.decorators = [
6989
+ { type: i0.NgModule, args: [{
6990
+ declarations: [
6991
+ OverlayDirective,
6992
+ OverlayParentDirective
6993
+ ],
6994
+ exports: [
6995
+ OverlayDirective,
6996
+ OverlayParentDirective
6997
+ ]
6998
+ },] }
6999
+ ];
7000
+
7001
+ var ValidationErrorModule = /** @class */ (function () {
7002
+ function ValidationErrorModule() {
7003
+ }
7004
+ return ValidationErrorModule;
7005
+ }());
7006
+ ValidationErrorModule.decorators = [
7007
+ { type: i0.NgModule, args: [{
7008
+ imports: [
7009
+ common.CommonModule,
7010
+ IconModule,
7011
+ OverlayModule
7012
+ ],
7013
+ declarations: [
7014
+ ValidationErrorComponent
7015
+ ],
7016
+ exports: [
7017
+ ValidationErrorComponent
7018
+ ]
7019
+ },] }
7020
+ ];
7021
+
6777
7022
  var InputDatePickerModule = /** @class */ (function () {
6778
7023
  function InputDatePickerModule() {
6779
7024
  }
@@ -6788,7 +7033,9 @@
6788
7033
  IconModule,
6789
7034
  AppendPipeModule,
6790
7035
  ej2AngularCalendars.DatePickerModule,
6791
- CommitButtonsModule
7036
+ CommitButtonsModule,
7037
+ ValidationErrorModule,
7038
+ OverlayModule
6792
7039
  ],
6793
7040
  schemas: [
6794
7041
  i0.NO_ERRORS_SCHEMA
@@ -6802,8 +7049,8 @@
6802
7049
  __extends(InputDateRangePickerComponent, _super);
6803
7050
  function InputDateRangePickerComponent() {
6804
7051
  var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
6805
- _this.dateFormat = "dd-MM-yyyy";
6806
- _this.placeholder = "";
7052
+ _this.dateFormat = 'dd-MM-yyyy';
7053
+ _this.placeholder = '';
6807
7054
  _this.startDateChange = new i0.EventEmitter();
6808
7055
  _this.endDateChange = new i0.EventEmitter();
6809
7056
  _this.dateRangeChange = new i0.EventEmitter();
@@ -6828,15 +7075,18 @@
6828
7075
  }(BaseInputComponent));
6829
7076
  InputDateRangePickerComponent.decorators = [
6830
7077
  { type: i0.Component, args: [{
6831
- selector: "co-input-date-range",
6832
- template: "\n <ejs-daterangepicker #ejsDateRangePicker\n [format]=\"dateFormat\"\n floatLabelType=\"Auto\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n [(startDate)]=\"startDate\"\n [(endDate)]=\"endDate\"\n [readonly]=\"readonly\"\n (ngModelChange)=\"rangeChange()\"\n (close)=\"close.next($event)\"\n (select)=\"select.next($event)\"\n (cleared)=\"cleared.next($event)\"\n ></ejs-daterangepicker>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
6833
- providers: [{
7078
+ selector: 'co-input-date-range',
7079
+ template: "\n <ejs-daterangepicker #ejsDateRangePicker\n [format]=\"dateFormat\"\n floatLabelType=\"Auto\"\n [placeholder]=\"placeholder\"\n [ngModel]=\"model\"\n [(startDate)]=\"startDate\"\n [(endDate)]=\"endDate\"\n [readonly]=\"readonly\"\n (ngModelChange)=\"rangeChange()\"\n (close)=\"close.next($event)\"\n (select)=\"select.next($event)\"\n (cleared)=\"cleared.next($event)\"\n ></ejs-daterangepicker>\n <div class=\"required-indicator\"></div>\n ",
7080
+ providers: [
7081
+ OverlayService,
7082
+ {
6834
7083
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
6835
7084
  useExisting: i0.forwardRef(function () { return InputDateRangePickerComponent; })
6836
7085
  }, {
6837
7086
  provide: BaseInputComponent,
6838
7087
  useExisting: InputDateRangePickerComponent
6839
- }],
7088
+ }
7089
+ ],
6840
7090
  encapsulation: i0.ViewEncapsulation.None
6841
7091
  },] }
6842
7092
  ];
@@ -6851,7 +7101,7 @@
6851
7101
  close: [{ type: i0.Output }],
6852
7102
  select: [{ type: i0.Output }],
6853
7103
  cleared: [{ type: i0.Output }],
6854
- showClass: [{ type: i0.HostBinding, args: ["class.co-input-date-range-picker",] }]
7104
+ showClass: [{ type: i0.HostBinding, args: ['class.co-input-date-range-picker',] }]
6855
7105
  };
6856
7106
 
6857
7107
  var InputDateRangePickerModule = /** @class */ (function () {
@@ -6864,7 +7114,9 @@
6864
7114
  imports: [
6865
7115
  BaseModule,
6866
7116
  ej2AngularCalendars.DateRangePickerModule,
6867
- forms.FormsModule
7117
+ forms.FormsModule,
7118
+ ValidationErrorModule,
7119
+ OverlayModule
6868
7120
  ],
6869
7121
  declarations: [
6870
7122
  InputDateRangePickerComponent
@@ -6878,10 +7130,11 @@
6878
7130
  ej2AngularDropdowns.ListBoxComponent.Inject(ej2AngularDropdowns.CheckBoxSelection);
6879
7131
  var InputListboxComponent = /** @class */ (function (_super) {
6880
7132
  __extends(InputListboxComponent, _super);
6881
- function InputListboxComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
6882
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
7133
+ function InputListboxComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
7134
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
6883
7135
  _this.formComponent = formComponent;
6884
7136
  _this.changeDetector = changeDetector;
7137
+ _this.overlayService = overlayService;
6885
7138
  _this.componentFactoryResolver = componentFactoryResolver;
6886
7139
  _this.formUserChangeListener = formUserChangeListener;
6887
7140
  _this.ngZoneWrapper = ngZoneWrapper;
@@ -6929,19 +7182,22 @@
6929
7182
  InputListboxComponent.decorators = [
6930
7183
  { type: i0.Component, args: [{
6931
7184
  selector: 'co-input-listbox',
6932
- template: "\n <div class=\"co-input-listbox-header\" [textContent]=\"placeholder\"></div>\n <div class=\"co-input-listbox-content\" [ngClass]=\"customCssClass ? customCssClass : undefined\">\n <ejs-listbox\n [ngModel]=\"value\"\n [dataSource]=\"collection\"\n [fields]=\"fields\"\n [disabled]=\"readonly\"\n [selectionSettings]=\"selectionSettings\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></ejs-listbox>\n </div>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
6933
- providers: [{
7185
+ template: "\n <div class=\"co-input-listbox-header\" [textContent]=\"placeholder\"></div>\n <div class=\"co-input-listbox-content\" [ngClass]=\"customCssClass ? customCssClass : undefined\">\n <ejs-listbox\n [ngModel]=\"value\"\n [dataSource]=\"collection\"\n [fields]=\"fields\"\n [disabled]=\"readonly\"\n [selectionSettings]=\"selectionSettings\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></ejs-listbox>\n </div>\n <div class=\"required-indicator\"></div>\n ",
7186
+ providers: [
7187
+ OverlayService, {
6934
7188
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, useExisting: i0.forwardRef(function () { return InputListboxComponent; })
6935
7189
  }, {
6936
7190
  provide: BaseInputComponent,
6937
7191
  useExisting: InputListboxComponent
6938
- }],
7192
+ }
7193
+ ],
6939
7194
  encapsulation: i0.ViewEncapsulation.None
6940
7195
  },] }
6941
7196
  ];
6942
7197
  InputListboxComponent.ctorParameters = function () { return [
6943
7198
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
6944
7199
  { type: i0.ChangeDetectorRef },
7200
+ { type: OverlayService },
6945
7201
  { type: i0.ComponentFactoryResolver },
6946
7202
  { type: FormInputUserModelChangeListenerService },
6947
7203
  { type: NgZoneWrapperService },
@@ -7324,10 +7580,11 @@
7324
7580
  // A component that lets users pick a number by increasing and decreasing it with buttons, or by typing.
7325
7581
  var InputNumberPickerComponent = /** @class */ (function (_super) {
7326
7582
  __extends(InputNumberPickerComponent, _super);
7327
- function InputNumberPickerComponent(formComponent, iconCacheService, _ngZone, componentFactoryResolver, changeDetector, formUserChangeListener) {
7328
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener) || this;
7583
+ function InputNumberPickerComponent(formComponent, iconCacheService, overlayService, _ngZone, componentFactoryResolver, changeDetector, formUserChangeListener) {
7584
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener) || this;
7329
7585
  _this.formComponent = formComponent;
7330
7586
  _this.iconCacheService = iconCacheService;
7587
+ _this.overlayService = overlayService;
7331
7588
  _this._ngZone = _ngZone;
7332
7589
  _this.componentFactoryResolver = componentFactoryResolver;
7333
7590
  _this.minusIcon = exports.CoreComponentsIcon.MinusSimple;
@@ -7568,13 +7825,15 @@
7568
7825
  InputNumberPickerComponent.decorators = [
7569
7826
  { type: i0.Component, args: [{
7570
7827
  selector: 'co-input-number-picker',
7571
- template: "\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"minus-operator circle\" [class.select]=\"minSelected\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(minusIcon)\"\n (mousedown)=\"onMinusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n <input type=\"text\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n (ngModelChange)=\"handleChangeModel($event)\"\n (keydown)=\"handleKeyDown($event)\"/>\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"plus-operator circle\" [class.select]=\"plusSelected\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(plusIcon)\"\n (mousedown)=\"onPlusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n ",
7572
- providers: [{
7828
+ template: "\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"minus-operator circle\" [class.select]=\"minSelected\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(minusIcon)\"\n (mousedown)=\"onMinusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n <input type=\"text\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n (ngModelChange)=\"handleChangeModel($event)\"\n (keydown)=\"handleKeyDown($event)\"/>\n <div class=\"button-wrapper\">\n <co-button *ngIf=\"showButtons\" class=\"plus-operator circle\" [class.select]=\"plusSelected\"\n [disabled]=\"readonly\"\n [iconData]=\"iconCacheService.getIcon(plusIcon)\"\n (mousedown)=\"onPlusMouseDown($event)\"\n (mouseup)=\"stopAutoCounting()\" (mouseleave)=\"stopAutoCounting()\"></co-button>\n </div>\n ",
7829
+ providers: [
7830
+ OverlayService, {
7573
7831
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, useExisting: i0.forwardRef(function () { return InputNumberPickerComponent; })
7574
7832
  }, {
7575
7833
  provide: BaseInputComponent,
7576
7834
  useExisting: InputNumberPickerComponent
7577
- }],
7835
+ }
7836
+ ],
7578
7837
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
7579
7838
  encapsulation: i0.ViewEncapsulation.None
7580
7839
  },] }
@@ -7582,6 +7841,7 @@
7582
7841
  InputNumberPickerComponent.ctorParameters = function () { return [
7583
7842
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
7584
7843
  { type: IconCacheService, decorators: [{ type: i0.Inject, args: [IconCacheService,] }] },
7844
+ { type: OverlayService },
7585
7845
  { type: i0.NgZone },
7586
7846
  { type: i0.ComponentFactoryResolver },
7587
7847
  { type: i0.ChangeDetectorRef },
@@ -7599,8 +7859,8 @@
7599
7859
  noValidation: [{ type: i0.Input }],
7600
7860
  decimals: [{ type: i0.Input }],
7601
7861
  modelChange: [{ type: i0.Output }],
7602
- showButtonsOnFocusOnly: [{ type: i0.HostBinding, args: ["class.show-buttons-on-focus-only",] }],
7603
- hasLabel: [{ type: i0.HostBinding, args: ["class.has-label",] }],
7862
+ showButtonsOnFocusOnly: [{ type: i0.HostBinding, args: ['class.show-buttons-on-focus-only',] }],
7863
+ hasLabel: [{ type: i0.HostBinding, args: ['class.has-label',] }],
7604
7864
  showClass: [{ type: i0.HostBinding, args: ['class.co-input-number-picker',] }]
7605
7865
  };
7606
7866
  __decorate([
@@ -7609,16 +7869,17 @@
7609
7869
 
7610
7870
  var InputTextComponent = /** @class */ (function (_super) {
7611
7871
  __extends(InputTextComponent, _super);
7612
- function InputTextComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
7613
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
7872
+ function InputTextComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
7873
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
7614
7874
  _this.formComponent = formComponent;
7615
7875
  _this.changeDetector = changeDetector;
7876
+ _this.overlayService = overlayService;
7616
7877
  _this.componentFactoryResolver = componentFactoryResolver;
7617
7878
  _this.formUserChangeListener = formUserChangeListener;
7618
7879
  _this.ngZoneWrapper = ngZoneWrapper;
7619
7880
  _this.elementRef = elementRef;
7620
- _this.placeholder = "";
7621
- _this.type = "text";
7881
+ _this.placeholder = '';
7882
+ _this.type = 'text';
7622
7883
  _this.digitsOnly = false;
7623
7884
  _this.excludePlusMinus = true;
7624
7885
  _this.showClearButton = undefined;
@@ -7687,21 +7948,24 @@
7687
7948
  }(BaseInputComponent));
7688
7949
  InputTextComponent.decorators = [
7689
7950
  { type: i0.Component, args: [{
7690
- selector: "co-input-text",
7691
- template: "\n <div class=\"input-text-wrapper\">\n <co-icon *ngIf=\"leftIcon\" class=\"input-text-left-icon\" [icon]=\"leftIcon\" [iconData]=\"leftIconData\" (click)=\"handleLeftIconClick($event)\"></co-icon>\n <div *ngIf=\"leftIcon\" class=\"spacer\"></div>\n <div class=\"input-wrapper\">\n <label *ngIf=\"showPlaceholderOnFocus || (!showPlaceholderOnFocus && !hasValue && !focused)\"\n [textContent]=\"placeholder\"></label>\n <input #input\n [type]=\"digitsOnly ? 'number' : type\"\n [ngModel]=\"model\"\n [min]=\"type === 'number' && this.min ? this.min : undefined\"\n [max]=\"type === 'number' && this.max ? this.max : undefined\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (keydown)=\"digitsOnly ? excludeNonDigitChars($event) : true\"\n >\n </div>\n <div *ngIf=\"rightIcon\" class=\"spacer\"></div>\n <co-icon *ngIf=\"rightIcon\" class=\"input-text-right-icon\" [icon]=\"rightIcon\" [iconData]=\"rightIconData\" (click)=\"handleRightIconClick($event)\"></co-icon>\n </div>\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
7692
- providers: [{
7951
+ selector: 'co-input-text',
7952
+ template: "\n <div class=\"input-text-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-icon *ngIf=\"leftIcon\" class=\"input-text-left-icon\" [icon]=\"leftIcon\" [iconData]=\"leftIconData\"\n (click)=\"handleLeftIconClick($event)\"></co-icon>\n <div *ngIf=\"leftIcon\" class=\"spacer\"></div>\n <div class=\"input-wrapper\">\n <label *ngIf=\"showPlaceholderOnFocus || (!showPlaceholderOnFocus && !hasValue && !focused)\"\n [textContent]=\"placeholder\"></label>\n <input #input\n [type]=\"digitsOnly ? 'number' : type\"\n [ngModel]=\"model\"\n [min]=\"type === 'number' && this.min ? this.min : undefined\"\n [max]=\"type === 'number' && this.max ? this.max : undefined\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n (keydown)=\"digitsOnly ? excludeNonDigitChars($event) : true\"\n >\n </div>\n <div *ngIf=\"rightIcon\" class=\"spacer\"></div>\n <co-icon *ngIf=\"rightIcon\" class=\"input-text-right-icon\" [icon]=\"rightIcon\" [iconData]=\"rightIconData\"\n (click)=\"handleRightIconClick($event)\"></co-icon>\n </div>\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n <div class=\"required-indicator\"></div>\n ",
7953
+ providers: [
7954
+ OverlayService, {
7693
7955
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
7694
7956
  useExisting: i0.forwardRef(function () { return InputTextComponent; })
7695
7957
  }, {
7696
7958
  provide: BaseInputComponent,
7697
7959
  useExisting: InputTextComponent
7698
- }],
7960
+ }
7961
+ ],
7699
7962
  encapsulation: i0.ViewEncapsulation.None
7700
7963
  },] }
7701
7964
  ];
7702
7965
  InputTextComponent.ctorParameters = function () { return [
7703
7966
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
7704
7967
  { type: i0.ChangeDetectorRef },
7968
+ { type: OverlayService },
7705
7969
  { type: i0.ComponentFactoryResolver },
7706
7970
  { type: FormInputUserModelChangeListenerService },
7707
7971
  { type: NgZoneWrapperService },
@@ -7725,32 +7989,12 @@
7725
7989
  hideArrowButtons: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.hide-arrows',] }],
7726
7990
  leftIconClick: [{ type: i0.Output }],
7727
7991
  rightIconClick: [{ type: i0.Output }],
7728
- showClass: [{ type: i0.HostBinding, args: ["class.co-input-text",] }],
7992
+ showClass: [{ type: i0.HostBinding, args: ['class.co-input-text',] }],
7729
7993
  hasLeftIcon: [{ type: i0.HostBinding, args: ['class.has-left-icon',] }],
7730
7994
  hasRightIcon: [{ type: i0.HostBinding, args: ['class.has-right-icon',] }],
7731
- hasOwnLabel: [{ type: i0.HostBinding, args: ["class.has-own-label",] }]
7995
+ hasOwnLabel: [{ type: i0.HostBinding, args: ['class.has-own-label',] }]
7732
7996
  };
7733
7997
 
7734
- var ValidationErrorModule = /** @class */ (function () {
7735
- function ValidationErrorModule() {
7736
- }
7737
- return ValidationErrorModule;
7738
- }());
7739
- ValidationErrorModule.decorators = [
7740
- { type: i0.NgModule, args: [{
7741
- imports: [
7742
- common.CommonModule,
7743
- IconModule
7744
- ],
7745
- declarations: [
7746
- ValidationErrorComponent
7747
- ],
7748
- exports: [
7749
- ValidationErrorComponent
7750
- ]
7751
- },] }
7752
- ];
7753
-
7754
7998
  var InputTextModule = /** @class */ (function () {
7755
7999
  function InputTextModule() {
7756
8000
  }
@@ -7767,7 +8011,8 @@
7767
8011
  ej2AngularInputs.TextBoxAllModule,
7768
8012
  ej2AngularInputs.NumericTextBoxModule,
7769
8013
  ValidationErrorModule,
7770
- CommitButtonsModule
8014
+ CommitButtonsModule,
8015
+ OverlayModule
7771
8016
  ],
7772
8017
  declarations: [
7773
8018
  InputTextComponent
@@ -7798,10 +8043,11 @@
7798
8043
 
7799
8044
  var InputRadioButtonComponent = /** @class */ (function (_super) {
7800
8045
  __extends(InputRadioButtonComponent, _super);
7801
- function InputRadioButtonComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
7802
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
8046
+ function InputRadioButtonComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
8047
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
7803
8048
  _this.formComponent = formComponent;
7804
8049
  _this.changeDetector = changeDetector;
8050
+ _this.overlayService = overlayService;
7805
8051
  _this.componentFactoryResolver = componentFactoryResolver;
7806
8052
  _this.formUserChangeListener = formUserChangeListener;
7807
8053
  _this.ngZoneWrapper = ngZoneWrapper;
@@ -7831,19 +8077,21 @@
7831
8077
  }(BaseInputComponent));
7832
8078
  InputRadioButtonComponent.decorators = [
7833
8079
  { type: i0.Component, args: [{
7834
- selector: "co-input-radio-button",
7835
- template: "\n <div class=\"outer-circle\" [class.selected]=\"model\">\n <div class=\"inner-circle\" *ngIf=\"model\" @showSelected></div>\n </div>\n <div class=\"label\" *ngIf=\"label\" [textContent]=\"label\"></div>\n <input #input [ngModel]=\"model\" type=\"hidden\">\n ",
7836
- providers: [{
8080
+ selector: 'co-input-radio-button',
8081
+ template: "\n <div class=\"outer-circle\" [class.selected]=\"model\">\n <div class=\"inner-circle\" *ngIf=\"model\" @showSelected></div>\n </div>\n <div class=\"label\" *ngIf=\"label\" [textContent]=\"label\"></div>\n <input #input [ngModel]=\"model\" type=\"hidden\">\n ",
8082
+ providers: [
8083
+ OverlayService, {
7837
8084
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME, useExisting: i0.forwardRef(function () { return InputRadioButtonComponent; })
7838
8085
  }, {
7839
8086
  provide: BaseInputComponent,
7840
8087
  useExisting: InputRadioButtonComponent
7841
- }],
8088
+ }
8089
+ ],
7842
8090
  animations: [
7843
- animations.trigger("showSelected", [
7844
- animations.state("void", animations.style({ transform: "scale(0)" })),
7845
- animations.state("*", animations.style({ transform: "scale(1)" })),
7846
- animations.transition("void <=> *", animations.animate("200ms ease-in-out")),
8091
+ animations.trigger('showSelected', [
8092
+ animations.state('void', animations.style({ transform: 'scale(0)' })),
8093
+ animations.state('*', animations.style({ transform: 'scale(1)' })),
8094
+ animations.transition('void <=> *', animations.animate('200ms ease-in-out')),
7847
8095
  ])
7848
8096
  ],
7849
8097
  encapsulation: i0.ViewEncapsulation.None
@@ -7852,15 +8100,16 @@
7852
8100
  InputRadioButtonComponent.ctorParameters = function () { return [
7853
8101
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
7854
8102
  { type: i0.ChangeDetectorRef },
8103
+ { type: OverlayService },
7855
8104
  { type: i0.ComponentFactoryResolver },
7856
8105
  { type: FormInputUserModelChangeListenerService },
7857
8106
  { type: NgZoneWrapperService },
7858
8107
  { type: i0.ElementRef }
7859
8108
  ]; };
7860
8109
  InputRadioButtonComponent.propDecorators = {
7861
- isModelSelected: [{ type: i0.HostBinding, args: ["class.selected",] }],
7862
- showClass: [{ type: i0.HostBinding, args: ["class.co-radio-button",] }],
7863
- handleClick: [{ type: i0.HostListener, args: ["click", ["$event"],] }]
8110
+ isModelSelected: [{ type: i0.HostBinding, args: ['class.selected',] }],
8111
+ showClass: [{ type: i0.HostBinding, args: ['class.co-radio-button',] }],
8112
+ handleClick: [{ type: i0.HostListener, args: ['click', ['$event'],] }]
7864
8113
  };
7865
8114
 
7866
8115
  var InputRadioButtonModule = /** @class */ (function () {
@@ -7913,6 +8162,9 @@
7913
8162
  { type: i0.Component, args: [{
7914
8163
  selector: 'co-input-search',
7915
8164
  template: "\n <co-input-text\n [ngClass]=\"customCssClass\"\n [model]=\"model\"\n [leftIcon]=\"useLeftIcon ? searchIcon : null\"\n [rightIcon]=\"useRightIcon ? searchIcon : null\"\n [leftIconData]=\"useLeftIcon && leftIconData ? leftIconData : undefined\"\n [rightIconData]=\"useRightIcon && rightIconData ? rightIconData : undefined\"\n [placeholder]=\"placeholder\"\n [customHeight]=\"true\"\n [showPlaceholderOnFocus]=\"false\"\n (modelChange)=\"modelChange.emit($event)\"\n (leftIconClick)=\"leftIconClick.emit($event)\"\n (rightIconClick)=\"rightIconClick.emit($event)\"\n ></co-input-text>\n ",
8165
+ providers: [
8166
+ OverlayService
8167
+ ],
7916
8168
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
7917
8169
  encapsulation: i0.ViewEncapsulation.None
7918
8170
  },] }
@@ -7956,15 +8208,16 @@
7956
8208
 
7957
8209
  var InputTextareaComponent = /** @class */ (function (_super) {
7958
8210
  __extends(InputTextareaComponent, _super);
7959
- function InputTextareaComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
7960
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
8211
+ function InputTextareaComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
8212
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
7961
8213
  _this.formComponent = formComponent;
7962
8214
  _this.changeDetector = changeDetector;
8215
+ _this.overlayService = overlayService;
7963
8216
  _this.componentFactoryResolver = componentFactoryResolver;
7964
8217
  _this.formUserChangeListener = formUserChangeListener;
7965
8218
  _this.ngZoneWrapper = ngZoneWrapper;
7966
8219
  _this.elementRef = elementRef;
7967
- _this.placeholder = "";
8220
+ _this.placeholder = '';
7968
8221
  _this.hasOwnLabel = true;
7969
8222
  _super.prototype._markAsOnPush.call(_this);
7970
8223
  return _this;
@@ -7976,21 +8229,24 @@
7976
8229
  }(BaseInputComponent));
7977
8230
  InputTextareaComponent.decorators = [
7978
8231
  { type: i0.Component, args: [{
7979
- selector: "co-input-textarea",
7980
- template: "\n <label [textContent]=\"placeholder\"></label>\n <textarea\n #input\n type=\"textarea\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></textarea>\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
7981
- providers: [{
8232
+ selector: 'co-input-textarea',
8233
+ template: "\n <label [textContent]=\"placeholder\"></label>\n <textarea\n #input\n type=\"textarea\"\n [ngModel]=\"model\"\n [readonly]=\"readonly\"\n [required]=\"required\"\n (ngModelChange)=\"modelChange.emit($event)\"\n ></textarea>\n <co-commit-buttons *ngIf=\"showSaveCancel && focused && canSaveOrCancel\"\n [committing]=\"committing\"\n [commitFinished]=\"commitFinished\"\n (commitClick)=\"commitClick($event)\"\n (cancelClick)=\"cancelClick($event)\"\n >\n </co-commit-buttons>\n <div class=\"required-indicator\"></div>\n ",
8234
+ providers: [
8235
+ OverlayService, {
7982
8236
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
7983
8237
  useExisting: i0.forwardRef(function () { return InputTextareaComponent; })
7984
8238
  }, {
7985
8239
  provide: BaseInputComponent,
7986
8240
  useExisting: InputTextareaComponent
7987
- }],
8241
+ }
8242
+ ],
7988
8243
  encapsulation: i0.ViewEncapsulation.None
7989
8244
  },] }
7990
8245
  ];
7991
8246
  InputTextareaComponent.ctorParameters = function () { return [
7992
8247
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
7993
8248
  { type: i0.ChangeDetectorRef },
8249
+ { type: OverlayService },
7994
8250
  { type: i0.ComponentFactoryResolver },
7995
8251
  { type: FormInputUserModelChangeListenerService },
7996
8252
  { type: NgZoneWrapperService },
@@ -7998,8 +8254,8 @@
7998
8254
  ]; };
7999
8255
  InputTextareaComponent.propDecorators = {
8000
8256
  placeholder: [{ type: i0.Input }],
8001
- showClass: [{ type: i0.HostBinding, args: ["class.co-input-textarea",] }],
8002
- hasOwnLabel: [{ type: i0.HostBinding, args: ["class.has-own-label",] }]
8257
+ showClass: [{ type: i0.HostBinding, args: ['class.co-input-textarea',] }],
8258
+ hasOwnLabel: [{ type: i0.HostBinding, args: ['class.has-own-label',] }]
8003
8259
  };
8004
8260
 
8005
8261
  var InputTextareaModule = /** @class */ (function () {
@@ -8026,10 +8282,11 @@
8026
8282
 
8027
8283
  var MultiSelectListComponent = /** @class */ (function (_super) {
8028
8284
  __extends(MultiSelectListComponent, _super);
8029
- function MultiSelectListComponent(formComponent, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
8030
- var _this = _super.call(this, changeDetector, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) || this;
8285
+ function MultiSelectListComponent(formComponent, changeDetector, overlayService, componentFactoryResolver, formUserChangeListener, ngZoneWrapper, elementRef) {
8286
+ var _this = _super.call(this, changeDetector, componentFactoryResolver, overlayService, formUserChangeListener, ngZoneWrapper, elementRef) || this;
8031
8287
  _this.formComponent = formComponent;
8032
8288
  _this.changeDetector = changeDetector;
8289
+ _this.overlayService = overlayService;
8033
8290
  _this.componentFactoryResolver = componentFactoryResolver;
8034
8291
  _this.formUserChangeListener = formUserChangeListener;
8035
8292
  _this.ngZoneWrapper = ngZoneWrapper;
@@ -8040,14 +8297,14 @@
8040
8297
  */
8041
8298
  _this.fields = {};
8042
8299
  _this.showSelectAll = true;
8043
- _this.mode = "Default";
8300
+ _this.mode = 'Default';
8044
8301
  _super.prototype._markAsOnPush.call(_this);
8045
8302
  return _this;
8046
8303
  }
8047
8304
  Object.defineProperty(MultiSelectListComponent.prototype, "showCheckbox", {
8048
8305
  set: function (value) {
8049
8306
  if (value) {
8050
- this.mode = "CheckBox";
8307
+ this.mode = 'CheckBox';
8051
8308
  }
8052
8309
  },
8053
8310
  enumerable: false,
@@ -8068,9 +8325,10 @@
8068
8325
  }(BaseInputComponent));
8069
8326
  MultiSelectListComponent.decorators = [
8070
8327
  { type: i0.Component, args: [{
8071
- selector: "co-multi-select-list",
8072
- template: "\n <ejs-multiselect\n [dataSource]=\"collection\"\n [placeholder]=\"placeholder\"\n [value]=\"model\"\n [mode]=\"mode\"\n [fields]=\"fields\"\n [readonly]=\"readonly\"\n [itemTemplate]=\"itemTemplate\"\n [headerTemplate]=\"headerTemplate\"\n [valueTemplate]=\"valueTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [selectAllText]=\"'Select All'\"\n [showSelectAll]=showSelectAll\n [ngModel]=\"model\"\n (ngModelChange)=\"handleModelChange($event)\"\n (valueChange)=\"handleModelChange($event)\"\n ></ejs-multiselect>\n <div class=\"required-indicator\"></div>\n <ng-template #validationError></ng-template>\n ",
8328
+ selector: 'co-multi-select-list',
8329
+ template: "\n <ejs-multiselect\n [dataSource]=\"collection\"\n [placeholder]=\"placeholder\"\n [value]=\"model\"\n [mode]=\"mode\"\n [fields]=\"fields\"\n [readonly]=\"readonly\"\n [itemTemplate]=\"itemTemplate\"\n [headerTemplate]=\"headerTemplate\"\n [valueTemplate]=\"valueTemplate\"\n [footerTemplate]=\"footerTemplate\"\n [selectAllText]=\"'Select All'\"\n [showSelectAll]=showSelectAll\n [ngModel]=\"model\"\n (ngModelChange)=\"handleModelChange($event)\"\n (valueChange)=\"handleModelChange($event)\"\n ></ejs-multiselect>\n <div class=\"required-indicator\"></div>\n ",
8073
8330
  providers: [
8331
+ OverlayService,
8074
8332
  ej2AngularDropdowns.CheckBoxSelectionService,
8075
8333
  {
8076
8334
  provide: SCREEN_CONFIG_ADAPTER_COMPONENT_INTERFACE_NAME,
@@ -8086,6 +8344,7 @@
8086
8344
  MultiSelectListComponent.ctorParameters = function () { return [
8087
8345
  { type: FormComponent, decorators: [{ type: i0.Optional }] },
8088
8346
  { type: i0.ChangeDetectorRef },
8347
+ { type: OverlayService },
8089
8348
  { type: i0.ComponentFactoryResolver },
8090
8349
  { type: FormInputUserModelChangeListenerService },
8091
8350
  { type: NgZoneWrapperService },
@@ -8101,7 +8360,7 @@
8101
8360
  footerTemplate: [{ type: i0.Input }],
8102
8361
  showSelectAll: [{ type: i0.Input }],
8103
8362
  showCheckbox: [{ type: i0.Input }],
8104
- showClass: [{ type: i0.HostBinding, args: ["class.co-multi-select-list",] }]
8363
+ showClass: [{ type: i0.HostBinding, args: ['class.co-multi-select-list',] }]
8105
8364
  };
8106
8365
 
8107
8366
  var MultiSelectListModule = /** @class */ (function () {
@@ -10970,266 +11229,222 @@
10970
11229
  },] }
10971
11230
  ];
10972
11231
 
10973
- var FilterPipe = /** @class */ (function () {
10974
- function FilterPipe() {
11232
+ var ListOfValuesPopupComponent = /** @class */ (function (_super) {
11233
+ __extends(ListOfValuesPopupComponent, _super);
11234
+ function ListOfValuesPopupComponent() {
11235
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
11236
+ _this.chosenOption = new i0.EventEmitter();
11237
+ _this.closePopup = new i0.EventEmitter();
11238
+ _this.displayField = 'description';
11239
+ _this.searchDisabled = false;
11240
+ _this.filteredOptions = _this.collection;
11241
+ _this.searchTerm = '';
11242
+ _this._collection = [];
11243
+ return _this;
10975
11244
  }
10976
- FilterPipe.prototype.transform = function (items, field, value) {
10977
- if (!items || !field) {
10978
- return items;
11245
+ ListOfValuesPopupComponent.prototype.showClass = function () {
11246
+ return true;
11247
+ };
11248
+ Object.defineProperty(ListOfValuesPopupComponent.prototype, "collection", {
11249
+ get: function () {
11250
+ return this._collection;
11251
+ },
11252
+ set: function (value) {
11253
+ this._collection = value || [];
11254
+ this.filterOptions();
11255
+ },
11256
+ enumerable: false,
11257
+ configurable: true
11258
+ });
11259
+ ListOfValuesPopupComponent.prototype.ngOnInit = function () {
11260
+ _super.prototype.ngOnInit.call(this);
11261
+ if (this.model) {
11262
+ this.selectedModel = this.model[this.displayField];
10979
11263
  }
10980
- return items.filter(function (item) { return item[field] === value; });
10981
11264
  };
10982
- return FilterPipe;
10983
- }());
10984
- FilterPipe.decorators = [
10985
- { type: i0.Pipe, args: [{
10986
- name: "filter",
10987
- pure: false
10988
- },] }
10989
- ];
10990
-
10991
- var FilterPipeModule = /** @class */ (function () {
10992
- function FilterPipeModule() {
10993
- }
10994
- return FilterPipeModule;
10995
- }());
10996
- FilterPipeModule.decorators = [
10997
- { type: i0.NgModule, args: [{
10998
- declarations: [
10999
- FilterPipe
11265
+ ListOfValuesPopupComponent.prototype.filterOptions = function () {
11266
+ var _this = this;
11267
+ this.filteredOptions = this.collection.filter(function (option) { return option[_this.displayField].toLowerCase().includes(_this.searchTerm.toLowerCase()); });
11268
+ };
11269
+ ListOfValuesPopupComponent.prototype.onOptionClick = function (option) {
11270
+ this.model = option;
11271
+ this.selectedModel = this.model[this.displayField];
11272
+ this.modelChange.emit(this.model);
11273
+ this.searchTerm = option.label;
11274
+ this.searchTerm = "";
11275
+ this.filterOptions();
11276
+ this.chosenOption.emit(option);
11277
+ };
11278
+ ListOfValuesPopupComponent.prototype.optionClicked = function () {
11279
+ this.overlayService.removeComponent();
11280
+ this.closePopup.emit();
11281
+ };
11282
+ return ListOfValuesPopupComponent;
11283
+ }(BaseInputComponent));
11284
+ ListOfValuesPopupComponent.decorators = [
11285
+ { type: i0.Component, args: [{
11286
+ selector: "co-list-of-values-popup",
11287
+ template: "\n <div class=\"lov-options\" [overlay]=\"parentForOverlay\" [inheritWidth]=\"true\" [ngClass]=\"customCssClass\" (clickOutside)=\"optionClicked()\">\n <co-input-text *ngIf=\"!searchDisabled\" [(model)]=\"searchTerm\" [placeholder]=\"searchPlaceholder\" (modelChange)=\"filterOptions()\"></co-input-text>\n <ul>\n <li *ngFor=\"let option of filteredOptions\" [class.selected]=\"option === model\" (click)=\"onOptionClick(option)\">\n <span [textContent]=\"option[displayField]\"></span>\n </li>\n </ul>\n </div>\n\n ",
11288
+ providers: [
11289
+ OverlayService
11000
11290
  ],
11001
- exports: [
11002
- FilterPipe
11003
- ]
11291
+ encapsulation: i0.ViewEncapsulation.None
11004
11292
  },] }
11005
- ];
11293
+ ];
11294
+ ListOfValuesPopupComponent.propDecorators = {
11295
+ showClass: [{ type: i0.HostBinding, args: ["class.co-list-of-values-popup",] }],
11296
+ chosenOption: [{ type: i0.Output }],
11297
+ closePopup: [{ type: i0.Output }],
11298
+ displayField: [{ type: i0.Input }],
11299
+ searchPlaceholder: [{ type: i0.Input }],
11300
+ customCssClass: [{ type: i0.Input }],
11301
+ searchDisabled: [{ type: i0.Input }],
11302
+ parentForOverlay: [{ type: i0.Input }],
11303
+ collection: [{ type: i0.Input }]
11304
+ };
11006
11305
 
11007
- var FilterItemComponent = /** @class */ (function () {
11008
- function FilterItemComponent(iconService) {
11009
- this.iconService = iconService;
11010
- this.icons = exports.CoreComponentsIcon;
11011
- this.initialLimit = 10;
11012
- this.expanded = false;
11013
- // Set to false to use filter item with a multi selectable collection. Set to true to specify custom content
11014
- this.customContent = false;
11015
- // Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
11016
- this.showAllResults = false;
11017
- this.singleSelect = false;
11018
- this.filterButtonLabel = "Search";
11019
- this.searchPlaceholder = 'Search...';
11020
- this.showMoreLabel = 'Show more';
11021
- this.showLessLabel = 'Show less';
11022
- this.noResultsLabel = "No results";
11023
- this.collectionChange = new i0.EventEmitter();
11024
- this.filterButtonClicked = new i0.EventEmitter();
11025
- this.filteredCollection = [];
11026
- this.limitTo = 10;
11027
- this.filterText = "";
11028
- this.showButton = false;
11029
- this._collection = [];
11306
+ var ListOfValuesComponent = /** @class */ (function (_super) {
11307
+ __extends(ListOfValuesComponent, _super);
11308
+ function ListOfValuesComponent() {
11309
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
11310
+ _this.icons = exports.CoreComponentsIcon;
11311
+ _this.multiselect = false;
11312
+ _this.displayField = 'description';
11313
+ _this.searchDisabled = false;
11314
+ _this.selectedOptions = [];
11315
+ _this.filteredOptions = _this.collection;
11316
+ _this.searchTerm = '';
11317
+ _this.isSelectOpen = false;
11318
+ _this.state = 'default';
11319
+ _this.searchClicked = false;
11320
+ _this.multiselectTags = [];
11321
+ _this._collection = [];
11322
+ return _this;
11030
11323
  }
11031
- Object.defineProperty(FilterItemComponent.prototype, "collection", {
11324
+ ListOfValuesComponent.prototype.showClass = function () {
11325
+ return true;
11326
+ };
11327
+ Object.defineProperty(ListOfValuesComponent.prototype, "collection", {
11032
11328
  get: function () {
11033
11329
  return this._collection;
11034
11330
  },
11035
11331
  set: function (value) {
11036
- var _a;
11037
- this._collection = value;
11038
- this.filteredCollection = (_a = this._collection) === null || _a === void 0 ? void 0 : _a.slice();
11332
+ this._collection = value || [];
11333
+ this.filterOptions();
11039
11334
  },
11040
11335
  enumerable: false,
11041
11336
  configurable: true
11042
11337
  });
11043
- FilterItemComponent.prototype.showClass = function () {
11044
- return true;
11045
- };
11046
- FilterItemComponent.prototype.ngOnInit = function () {
11047
- this.setToInitialLimit();
11048
- this.showButton = this.valueSelected();
11049
- };
11050
- FilterItemComponent.prototype.setToInitialLimit = function () {
11051
- this.limitTo = this.initialLimit;
11052
- };
11053
- FilterItemComponent.prototype.increaseLimit = function () {
11054
- this.limitTo += 10;
11055
- };
11056
- FilterItemComponent.prototype.moreToShow = function () {
11057
- var _a;
11058
- if (this.showAllResults) {
11059
- return false;
11338
+ ListOfValuesComponent.prototype.ngOnInit = function () {
11339
+ _super.prototype.ngOnInit.call(this);
11340
+ if (this.model) {
11341
+ this.selectedModel = this.model[this.displayField];
11060
11342
  }
11061
- return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) > this.limitTo;
11062
11343
  };
11063
- FilterItemComponent.prototype.lessToShow = function () {
11064
- var _a, _b;
11065
- if (this.showAllResults) {
11066
- return false;
11344
+ ListOfValuesComponent.prototype.filterOptions = function () {
11345
+ var _this = this;
11346
+ if (!this.multiselect) {
11347
+ this.filteredOptions = this.collection.filter(function (option) { return option[_this.displayField].toLowerCase().includes(_this.searchTerm.toLowerCase()); });
11067
11348
  }
11068
- return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) <= this.limitTo && ((_b = this.filteredCollection) === null || _b === void 0 ? void 0 : _b.length) > this.initialLimit;
11069
- };
11070
- FilterItemComponent.prototype.handleModelChange = function (model) {
11071
- this.showButton = true;
11072
- if (this.singleSelect) {
11073
- this.collection.forEach(function (m) {
11074
- if (m.code !== model.code && m.description !== model.description) {
11075
- m.checked = false;
11349
+ else {
11350
+ this.selectedOptions = this.selectedOptions.filter(function (option) {
11351
+ if (_this.collection) {
11352
+ return _this.searchTerm.includes(option.label);
11353
+ }
11354
+ else {
11355
+ return _this.searchTerm.includes(option.value);
11076
11356
  }
11077
11357
  });
11078
11358
  }
11079
- model.checked = !model.checked;
11080
- this.collectionChange.emit(this.collection);
11081
11359
  };
11082
- FilterItemComponent.prototype.valueSelected = function () {
11083
- if (this.collection) {
11084
- return !!this.collection.find(function (c) { return c.checked; });
11360
+ ListOfValuesComponent.prototype.onOptionClick = function (option) {
11361
+ if (!this.multiselect) {
11362
+ this.model = option;
11363
+ this.selectedModel = this.model[this.displayField];
11364
+ this.modelChange.emit(this.model);
11365
+ this.searchTerm = option.label;
11366
+ this.isSelectOpen = false;
11367
+ this.searchTerm = "";
11368
+ this.filterOptions();
11369
+ }
11370
+ if (this.multiselect) {
11371
+ if (this.selectedOptions.includes(option)) {
11372
+ this.selectedOptions.splice(this.selectedOptions.indexOf(option), 1);
11373
+ }
11374
+ else {
11375
+ this.selectedOptions.push(option);
11376
+ }
11377
+ this.modelChange.emit(this.selectedOptions);
11085
11378
  }
11086
- return false;
11087
11379
  };
11088
- // Applies filter to the collection.
11089
- FilterItemComponent.prototype.applyFilter = function (text) {
11090
- var _a, _b;
11091
- return __awaiter(this, void 0, void 0, function () {
11092
- var _c, filterText, filteredItemCount;
11093
- return __generator(this, function (_d) {
11094
- switch (_d.label) {
11095
- case 0:
11096
- if (!(!isNaN(this.minSearchCharsToLoadCollection) && this.collectionLoadFn)) return [3 /*break*/, 3];
11097
- if (!(text.length === this.minSearchCharsToLoadCollection && text.length > this.filterText.length)) return [3 /*break*/, 2];
11098
- _c = this;
11099
- return [4 /*yield*/, this.collectionLoadFn(text)];
11100
- case 1:
11101
- _c.collection = _d.sent();
11102
- return [3 /*break*/, 3];
11103
- case 2:
11104
- if (text.length < this.minSearchCharsToLoadCollection) {
11105
- this.collection = undefined;
11106
- }
11107
- _d.label = 3;
11108
- case 3:
11109
- this.filterText = text;
11110
- if (!this.collection) {
11111
- return [2 /*return*/, []];
11112
- }
11113
- filterText = (_a = this.filterText) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
11114
- filteredItemCount = 0;
11115
- this.filteredCollection = (_b = this.collection) === null || _b === void 0 ? void 0 : _b.filter(function (item) {
11116
- var _a;
11117
- var labelText = (_a = item.description) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
11118
- var isHiddenByFilter = ((labelText === null || labelText === void 0 ? void 0 : labelText.indexOf(filterText)) === -1);
11119
- if (isHiddenByFilter) {
11120
- return false;
11121
- }
11122
- else {
11123
- filteredItemCount++;
11124
- return true;
11125
- }
11126
- });
11127
- return [2 /*return*/];
11128
- }
11380
+ ListOfValuesComponent.prototype.toggleSelect = function () {
11381
+ var _this = this;
11382
+ this.isSelectOpen = !this.isSelectOpen;
11383
+ if (this.isSelectOpen) {
11384
+ this.overlayService.createComponent(ListOfValuesPopupComponent, {
11385
+ parentForOverlay: this.parentForOverlay,
11386
+ customCssClass: this.customCssClass,
11387
+ searchDisabled: this.searchDisabled,
11388
+ searchPlaceholder: this.searchPlaceholder,
11389
+ displayField: this.displayField,
11390
+ collection: this.collection
11391
+ }, {
11392
+ chosenOption: function (value) { return _this.optionChosen(value); },
11393
+ closePopup: function () { return _this.closePopup(); }
11129
11394
  });
11130
- });
11395
+ }
11396
+ else {
11397
+ this.overlayService.removeComponent();
11398
+ }
11399
+ this.state = (this.state === 'default' ? 'rotated' : 'default');
11131
11400
  };
11132
- FilterItemComponent.prototype.onButtonClicked = function () {
11133
- this.filterButtonClicked.emit();
11401
+ ListOfValuesComponent.prototype.multiselectOkClick = function () {
11402
+ this.searchClicked = false;
11134
11403
  };
11135
- return FilterItemComponent;
11136
- }());
11137
- FilterItemComponent.decorators = [
11404
+ ListOfValuesComponent.prototype.createMultiSelectTags = function (tags) {
11405
+ this.multiselectTags = tags;
11406
+ };
11407
+ ListOfValuesComponent.prototype.openMultiselectSearch = function () {
11408
+ this.searchClicked = true;
11409
+ };
11410
+ ListOfValuesComponent.prototype.optionChosen = function (option) {
11411
+ this.selectedModel = option[this.displayField];
11412
+ };
11413
+ ListOfValuesComponent.prototype.closePopup = function () {
11414
+ this.overlayService.removeComponent();
11415
+ };
11416
+ return ListOfValuesComponent;
11417
+ }(BaseInputComponent));
11418
+ ListOfValuesComponent.decorators = [
11138
11419
  { type: i0.Component, args: [{
11139
- selector: "co-filter-item",
11140
- template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n [showButton]=\"showButton\"\n [buttonText]=\"filterButtonLabel\"\n (buttonClicked)=\"onButtonClicked()\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\"\n (keydown)=\"showButton=true\" (mousedown)=\"showButton=true\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"applyFilter($event)\"\n >\n </co-input-text>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"!singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n [clickableLabel]=\"false\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
11141
- encapsulation: i0.ViewEncapsulation.None,
11142
- changeDetection: i0.ChangeDetectionStrategy.OnPush
11420
+ selector: "co-list-of-values",
11421
+ template: "\n <div class=\"lov-container\">\n <div class=\"lov-container-child\" *ngIf=\"!multiselect\">\n <div class=\"search-wrapper\" overlayParent #parentForOverlay=\"overlayParent\">\n <co-input-text class=\"lov-search no-focus-line\"\n type=\"text\"\n [model]=\"selectedModel\"\n [placeholder]=\"label\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [rightIcon]=\"icons.ArrowPointDown\"\n (click)=\"toggleSelect()\"\n (rightIconClick)=\"toggleSelect()\"\n ></co-input-text>\n </div>\n\n\n\n </div>\n <div *ngIf=\"multiselect\">\n <div class=\"search-wrapper-multiselect\" (click)=\"openMultiselectSearch()\" *ngIf=\"!searchClicked\">\n <div class=\"tag-wrapper\">\n <ul class=\"tag-ul-wrapper\">\n <li class=\"tag\" *ngFor=\"let tags of multiselectTags\">\n <span [textContent]=\"tags.label\"></span>\n </li>\n </ul>\n </div>\n </div>\n <div *ngIf=\"searchClicked\">\n <co-list-of-values-multiselect-search [collection]=\"filteredOptions\" [returnChosenCollection]=\"multiselectTags\" (okButtonClicked)=\"multiselectOkClick()\" (chosenCollection)=\"createMultiSelectTags($event)\"></co-list-of-values-multiselect-search>\n </div>\n </div>\n </div>\n ",
11422
+ providers: [
11423
+ OverlayService
11424
+ ],
11425
+ animations: [
11426
+ animations.trigger('rotatedState', [
11427
+ animations.state('default', animations.style({ transform: 'rotate(0)' })),
11428
+ animations.state('rotated', animations.style({ transform: 'rotate(-180deg)' })),
11429
+ animations.transition('rotated => default', animations.animate('300ms ease-out')),
11430
+ animations.transition('default => rotated', animations.animate('300ms ease-out'))
11431
+ ])
11432
+ ],
11433
+ encapsulation: i0.ViewEncapsulation.None
11143
11434
  },] }
11144
11435
  ];
11145
- FilterItemComponent.ctorParameters = function () { return [
11146
- { type: IconCacheService }
11147
- ]; };
11148
- FilterItemComponent.propDecorators = {
11436
+ ListOfValuesComponent.propDecorators = {
11437
+ parentForOverlay: [{ type: i0.ViewChild, args: ["parentForOverlay", { read: i0.ElementRef },] }],
11438
+ multiselect: [{ type: i0.Input }],
11439
+ showClass: [{ type: i0.HostBinding, args: ["class.co-list-of-values",] }],
11440
+ displayField: [{ type: i0.Input }],
11149
11441
  collection: [{ type: i0.Input }],
11150
- placeholder: [{ type: i0.Input }],
11151
- initialLimit: [{ type: i0.Input }],
11152
- expanded: [{ type: i0.Input }],
11153
- minSearchCharsToLoadCollection: [{ type: i0.Input }],
11154
- collectionLoadFn: [{ type: i0.Input }],
11155
- customContent: [{ type: i0.Input }],
11156
- showAllResults: [{ type: i0.Input }],
11157
- singleSelect: [{ type: i0.Input }],
11158
- filterButtonLabel: [{ type: i0.Input }],
11159
11442
  searchPlaceholder: [{ type: i0.Input }],
11160
- showMoreLabel: [{ type: i0.Input }],
11161
- showLessLabel: [{ type: i0.Input }],
11162
- noResultsLabel: [{ type: i0.Input }],
11163
- collectionChange: [{ type: i0.Output }],
11164
- filterButtonClicked: [{ type: i0.Output }],
11165
- showClass: [{ type: i0.HostBinding, args: ["class.co-filter-item",] }]
11443
+ label: [{ type: i0.Input }],
11444
+ customCssClass: [{ type: i0.Input }],
11445
+ searchDisabled: [{ type: i0.Input }]
11166
11446
  };
11167
11447
 
11168
- // A pipe for prepending strings to other strings in view templates.
11169
- var PrependPipe = /** @class */ (function () {
11170
- function PrependPipe() {
11171
- }
11172
- PrependPipe.prototype.transform = function (value, prepend) {
11173
- if (!value) {
11174
- return "";
11175
- }
11176
- if (!prepend) {
11177
- return value;
11178
- }
11179
- return prepend + value;
11180
- };
11181
- return PrependPipe;
11182
- }());
11183
- PrependPipe.decorators = [
11184
- { type: i0.Pipe, args: [{ name: "prepend" },] }
11185
- ];
11186
-
11187
- var PrependPipeModule = /** @class */ (function () {
11188
- function PrependPipeModule() {
11189
- }
11190
- return PrependPipeModule;
11191
- }());
11192
- PrependPipeModule.decorators = [
11193
- { type: i0.NgModule, args: [{
11194
- declarations: [
11195
- PrependPipe
11196
- ],
11197
- exports: [
11198
- PrependPipe
11199
- ]
11200
- },] }
11201
- ];
11202
-
11203
- var FilterItemModule = /** @class */ (function () {
11204
- function FilterItemModule() {
11205
- }
11206
- return FilterItemModule;
11207
- }());
11208
- FilterItemModule.decorators = [
11209
- { type: i0.NgModule, args: [{
11210
- imports: [
11211
- common.CommonModule,
11212
- CollapsibleModule,
11213
- InputTextModule,
11214
- InputCheckboxMultiSelectModule,
11215
- InputCheckboxModule,
11216
- IconModule,
11217
- scrolling.ScrollingModule,
11218
- AppendPipeModule,
11219
- PrependPipeModule,
11220
- InputTextModule,
11221
- InputRadioButtonModule,
11222
- InputTextModule
11223
- ],
11224
- declarations: [
11225
- FilterItemComponent
11226
- ],
11227
- exports: [
11228
- FilterItemComponent
11229
- ]
11230
- },] }
11231
- ];
11232
-
11233
11448
  // Human-readable JS keyboard codes, as in KeyboardEvent.key string values.
11234
11449
  var KeyboardKey;
11235
11450
  (function (KeyboardKey) {
@@ -11414,163 +11629,439 @@
11414
11629
  });
11415
11630
  });
11416
11631
  };
11417
- ClickOutsideDirective.prototype.ngOnDestroy = function () {
11418
- this._master.removeClickOutside(this);
11419
- this.elementRef.nativeElement.removeEventListener('click', this.onClick, EventUtils.passiveCapture);
11420
- this.elementRef = undefined;
11632
+ ClickOutsideDirective.prototype.ngOnDestroy = function () {
11633
+ this._master.removeClickOutside(this);
11634
+ this.elementRef.nativeElement.removeEventListener('click', this.onClick, EventUtils.passiveCapture);
11635
+ this.elementRef = undefined;
11636
+ };
11637
+ return ClickOutsideDirective;
11638
+ }());
11639
+ ClickOutsideDirective.decorators = [
11640
+ { type: i0.Directive, args: [{
11641
+ selector: "[clickOutside]",
11642
+ exportAs: 'clickOutside'
11643
+ },] }
11644
+ ];
11645
+ ClickOutsideDirective.ctorParameters = function () { return [
11646
+ { type: i0.ElementRef },
11647
+ { type: i0.NgZone },
11648
+ { type: ClickOutsideMasterService }
11649
+ ]; };
11650
+ ClickOutsideDirective.propDecorators = {
11651
+ enabled: [{ type: i0.Input, args: ["clickOutside",] }],
11652
+ alwaysTrigger: [{ type: i0.Input }],
11653
+ clickOutside: [{ type: i0.Output }]
11654
+ };
11655
+ __decorate([
11656
+ InputBoolean()
11657
+ ], ClickOutsideDirective.prototype, "alwaysTrigger", void 0);
11658
+
11659
+ var ClickoutsideModule = /** @class */ (function () {
11660
+ function ClickoutsideModule() {
11661
+ }
11662
+ return ClickoutsideModule;
11663
+ }());
11664
+ ClickoutsideModule.decorators = [
11665
+ { type: i0.NgModule, args: [{
11666
+ declarations: [
11667
+ ClickOutsideDirective
11668
+ ],
11669
+ providers: [
11670
+ ClickOutsideMasterService
11671
+ ],
11672
+ exports: [
11673
+ ClickOutsideDirective
11674
+ ]
11675
+ },] }
11676
+ ];
11677
+
11678
+ var ListOfValuesMultiselectSearch = /** @class */ (function (_super) {
11679
+ __extends(ListOfValuesMultiselectSearch, _super);
11680
+ function ListOfValuesMultiselectSearch() {
11681
+ var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
11682
+ _this.icons = exports.CoreComponentsIcon;
11683
+ _this.chosenCollection = new i0.EventEmitter();
11684
+ _this.okButtonClicked = new i0.EventEmitter();
11685
+ _this.selectedCollection = [];
11686
+ _this.selectedOptions = [];
11687
+ _this.allOptionsSelected = false;
11688
+ _this.searchTerm = '';
11689
+ return _this;
11690
+ }
11691
+ ListOfValuesMultiselectSearch.prototype.showClass = function () {
11692
+ return true;
11693
+ };
11694
+ Object.defineProperty(ListOfValuesMultiselectSearch.prototype, "filteredCollection", {
11695
+ get: function () {
11696
+ var _this = this;
11697
+ if (this.searchTerm.trim() === '') {
11698
+ return this.collection;
11699
+ }
11700
+ return this.collection.filter(function (option) { return option.label.toLowerCase().includes(_this.searchTerm.toLowerCase()); });
11701
+ },
11702
+ enumerable: false,
11703
+ configurable: true
11704
+ });
11705
+ ListOfValuesMultiselectSearch.prototype.ngOnInit = function () {
11706
+ if (this.returnChosenCollection) {
11707
+ this.selectedCollection = this.returnChosenCollection;
11708
+ }
11709
+ };
11710
+ ListOfValuesMultiselectSearch.prototype.onOptionClick = function (option) {
11711
+ var index = this.selectedCollection.findIndex(function (selectedOption) { return selectedOption.value === option.value; });
11712
+ if (index !== -1) {
11713
+ this.selectedCollection.splice(index, 1);
11714
+ }
11715
+ else {
11716
+ this.selectedCollection.push(option);
11717
+ }
11718
+ };
11719
+ ListOfValuesMultiselectSearch.prototype.okClicked = function () {
11720
+ this.chosenCollection.emit(this.selectedCollection);
11721
+ this.okButtonClicked.emit();
11722
+ };
11723
+ ListOfValuesMultiselectSearch.prototype.onToggleSelectAll = function () {
11724
+ if (this.allOptionsSelected) {
11725
+ this.selectedCollection = [];
11726
+ this.allOptionsSelected = false;
11727
+ }
11728
+ else {
11729
+ this.selectedCollection = __spreadArray([], __read(this.collection));
11730
+ this.allOptionsSelected = true;
11731
+ }
11732
+ };
11733
+ ListOfValuesMultiselectSearch.prototype.searchCollection = function () {
11734
+ var _this = this;
11735
+ this.selectedOptions = this.selectedOptions.filter(function (option) {
11736
+ if (_this.collection) {
11737
+ return _this.searchTerm.includes(option.label);
11738
+ }
11739
+ else {
11740
+ return _this.searchTerm.includes(option.value);
11741
+ }
11742
+ });
11743
+ };
11744
+ return ListOfValuesMultiselectSearch;
11745
+ }(BaseInputComponent));
11746
+ ListOfValuesMultiselectSearch.decorators = [
11747
+ { type: i0.Component, args: [{
11748
+ selector: "co-list-of-values-multiselect-search",
11749
+ template: "\n <div class=\"co-list-of-values-multiselect-search\">\n <div class=\"list-of-values-multiselect-search-input-text\">\n <co-input-text [placeholder]=\"'Zoeken...'\" [(model)]=\"searchTerm\" (input)=\"searchCollection()\"></co-input-text>\n </div>\n <div class=\"list-of-values-multiselect-options\">\n <div class=\"list-of-values-multiselect-search-deselect\" (click)=\"onToggleSelectAll()\">\n <span [textContent]=\"'(De)selecteer alles'\"></span>\n <co-icon [icon]=\"icons.CheckRound\"></co-icon>\n </div>\n <div class=\"list-of-values-multiselect-list\">\n <ul>\n <li *ngFor=\"let option of filteredCollection\" (click)=\"onOptionClick(option)\">\n <co-input-checkbox class=\"lov-options-checkbox\" (modelChange)=\"onOptionClick(option)\" [model]=\"selectedCollection.includes(option)\"></co-input-checkbox>\n <span>{{ option.label }}</span>\n </li>\n </ul>\n </div>\n <div class=\"list-of-values-multiselect-ok-button\" (click)=\"okClicked()\">\n <span [textContent]=\"'Ok'\"></span>\n <co-icon [icon]=\"icons.Check\"></co-icon>\n </div>\n </div>\n </div>\n ",
11750
+ encapsulation: i0.ViewEncapsulation.None
11751
+ },] }
11752
+ ];
11753
+ ListOfValuesMultiselectSearch.propDecorators = {
11754
+ showClass: [{ type: i0.HostBinding, args: ["class.co-list-of-values-multiselect-search",] }],
11755
+ collection: [{ type: i0.Input }],
11756
+ returnChosenCollection: [{ type: i0.Input }],
11757
+ chosenCollection: [{ type: i0.Output }],
11758
+ okButtonClicked: [{ type: i0.Output }]
11759
+ };
11760
+
11761
+ var ListOfValuesMultiselectSearchModule = /** @class */ (function () {
11762
+ function ListOfValuesMultiselectSearchModule() {
11763
+ }
11764
+ return ListOfValuesMultiselectSearchModule;
11765
+ }());
11766
+ ListOfValuesMultiselectSearchModule.decorators = [
11767
+ { type: i0.NgModule, args: [{
11768
+ imports: [
11769
+ common.CommonModule,
11770
+ InputTextModule,
11771
+ IconModule,
11772
+ InputCheckboxModule,
11773
+ ],
11774
+ declarations: [
11775
+ ListOfValuesMultiselectSearch
11776
+ ],
11777
+ exports: [
11778
+ ListOfValuesMultiselectSearch
11779
+ ]
11780
+ },] }
11781
+ ];
11782
+
11783
+ var ListOfValuesModule = /** @class */ (function () {
11784
+ function ListOfValuesModule() {
11785
+ }
11786
+ return ListOfValuesModule;
11787
+ }());
11788
+ ListOfValuesModule.decorators = [
11789
+ { type: i0.NgModule, args: [{
11790
+ imports: [
11791
+ common.CommonModule,
11792
+ forms.FormsModule,
11793
+ InputTextModule,
11794
+ InputCheckboxModule,
11795
+ OverlayModule,
11796
+ ClickoutsideModule,
11797
+ ListOfValuesMultiselectSearchModule
11798
+ ],
11799
+ declarations: [
11800
+ ListOfValuesComponent,
11801
+ ListOfValuesPopupComponent
11802
+ ],
11803
+ exports: [
11804
+ ListOfValuesComponent
11805
+ ]
11806
+ },] }
11807
+ ];
11808
+
11809
+ var FilterPipe = /** @class */ (function () {
11810
+ function FilterPipe() {
11811
+ }
11812
+ FilterPipe.prototype.transform = function (items, field, value) {
11813
+ if (!items || !field) {
11814
+ return items;
11815
+ }
11816
+ return items.filter(function (item) { return item[field] === value; });
11817
+ };
11818
+ return FilterPipe;
11819
+ }());
11820
+ FilterPipe.decorators = [
11821
+ { type: i0.Pipe, args: [{
11822
+ name: "filter",
11823
+ pure: false
11824
+ },] }
11825
+ ];
11826
+
11827
+ var FilterPipeModule = /** @class */ (function () {
11828
+ function FilterPipeModule() {
11829
+ }
11830
+ return FilterPipeModule;
11831
+ }());
11832
+ FilterPipeModule.decorators = [
11833
+ { type: i0.NgModule, args: [{
11834
+ declarations: [
11835
+ FilterPipe
11836
+ ],
11837
+ exports: [
11838
+ FilterPipe
11839
+ ]
11840
+ },] }
11841
+ ];
11842
+
11843
+ var FilterItemComponent = /** @class */ (function () {
11844
+ function FilterItemComponent(iconService) {
11845
+ this.iconService = iconService;
11846
+ this.icons = exports.CoreComponentsIcon;
11847
+ this.initialLimit = 10;
11848
+ this.expanded = false;
11849
+ // Set to false to use filter item with a multi selectable collection. Set to true to specify custom content
11850
+ this.customContent = false;
11851
+ // Set to true to show all results. Set to false to get 'show more' and 'show less' buttons to expand and contract.
11852
+ this.showAllResults = false;
11853
+ this.singleSelect = false;
11854
+ this.filterButtonLabel = "Search";
11855
+ this.searchPlaceholder = 'Search...';
11856
+ this.showMoreLabel = 'Show more';
11857
+ this.showLessLabel = 'Show less';
11858
+ this.noResultsLabel = "No results";
11859
+ this.collectionChange = new i0.EventEmitter();
11860
+ this.filterButtonClicked = new i0.EventEmitter();
11861
+ this.filteredCollection = [];
11862
+ this.limitTo = 10;
11863
+ this.filterText = "";
11864
+ this.showButton = false;
11865
+ this._collection = [];
11866
+ }
11867
+ Object.defineProperty(FilterItemComponent.prototype, "collection", {
11868
+ get: function () {
11869
+ return this._collection;
11870
+ },
11871
+ set: function (value) {
11872
+ var _a;
11873
+ this._collection = value;
11874
+ this.filteredCollection = (_a = this._collection) === null || _a === void 0 ? void 0 : _a.slice();
11875
+ },
11876
+ enumerable: false,
11877
+ configurable: true
11878
+ });
11879
+ FilterItemComponent.prototype.showClass = function () {
11880
+ return true;
11881
+ };
11882
+ FilterItemComponent.prototype.ngOnInit = function () {
11883
+ this.setToInitialLimit();
11884
+ this.showButton = this.valueSelected();
11885
+ };
11886
+ FilterItemComponent.prototype.setToInitialLimit = function () {
11887
+ this.limitTo = this.initialLimit;
11888
+ };
11889
+ FilterItemComponent.prototype.increaseLimit = function () {
11890
+ this.limitTo += 10;
11891
+ };
11892
+ FilterItemComponent.prototype.moreToShow = function () {
11893
+ var _a;
11894
+ if (this.showAllResults) {
11895
+ return false;
11896
+ }
11897
+ return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) > this.limitTo;
11898
+ };
11899
+ FilterItemComponent.prototype.lessToShow = function () {
11900
+ var _a, _b;
11901
+ if (this.showAllResults) {
11902
+ return false;
11903
+ }
11904
+ return ((_a = this.filteredCollection) === null || _a === void 0 ? void 0 : _a.length) <= this.limitTo && ((_b = this.filteredCollection) === null || _b === void 0 ? void 0 : _b.length) > this.initialLimit;
11905
+ };
11906
+ FilterItemComponent.prototype.handleModelChange = function (model) {
11907
+ this.showButton = true;
11908
+ if (this.singleSelect) {
11909
+ this.collection.forEach(function (m) {
11910
+ if (m.code !== model.code && m.description !== model.description) {
11911
+ m.checked = false;
11912
+ }
11913
+ });
11914
+ }
11915
+ model.checked = !model.checked;
11916
+ this.collectionChange.emit(this.collection);
11917
+ };
11918
+ FilterItemComponent.prototype.valueSelected = function () {
11919
+ if (this.collection) {
11920
+ return !!this.collection.find(function (c) { return c.checked; });
11921
+ }
11922
+ return false;
11923
+ };
11924
+ // Applies filter to the collection.
11925
+ FilterItemComponent.prototype.applyFilter = function (text) {
11926
+ var _a, _b;
11927
+ return __awaiter(this, void 0, void 0, function () {
11928
+ var _c, filterText, filteredItemCount;
11929
+ return __generator(this, function (_d) {
11930
+ switch (_d.label) {
11931
+ case 0:
11932
+ if (!(!isNaN(this.minSearchCharsToLoadCollection) && this.collectionLoadFn)) return [3 /*break*/, 3];
11933
+ if (!(text.length === this.minSearchCharsToLoadCollection && text.length > this.filterText.length)) return [3 /*break*/, 2];
11934
+ _c = this;
11935
+ return [4 /*yield*/, this.collectionLoadFn(text)];
11936
+ case 1:
11937
+ _c.collection = _d.sent();
11938
+ return [3 /*break*/, 3];
11939
+ case 2:
11940
+ if (text.length < this.minSearchCharsToLoadCollection) {
11941
+ this.collection = undefined;
11942
+ }
11943
+ _d.label = 3;
11944
+ case 3:
11945
+ this.filterText = text;
11946
+ if (!this.collection) {
11947
+ return [2 /*return*/, []];
11948
+ }
11949
+ filterText = (_a = this.filterText) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
11950
+ filteredItemCount = 0;
11951
+ this.filteredCollection = (_b = this.collection) === null || _b === void 0 ? void 0 : _b.filter(function (item) {
11952
+ var _a;
11953
+ var labelText = (_a = item.description) === null || _a === void 0 ? void 0 : _a.toString().toLowerCase();
11954
+ var isHiddenByFilter = ((labelText === null || labelText === void 0 ? void 0 : labelText.indexOf(filterText)) === -1);
11955
+ if (isHiddenByFilter) {
11956
+ return false;
11957
+ }
11958
+ else {
11959
+ filteredItemCount++;
11960
+ return true;
11961
+ }
11962
+ });
11963
+ return [2 /*return*/];
11964
+ }
11965
+ });
11966
+ });
11967
+ };
11968
+ FilterItemComponent.prototype.onButtonClicked = function () {
11969
+ this.filterButtonClicked.emit();
11421
11970
  };
11422
- return ClickOutsideDirective;
11971
+ return FilterItemComponent;
11423
11972
  }());
11424
- ClickOutsideDirective.decorators = [
11425
- { type: i0.Directive, args: [{
11426
- selector: "[clickOutside]",
11427
- exportAs: 'clickOutside'
11973
+ FilterItemComponent.decorators = [
11974
+ { type: i0.Component, args: [{
11975
+ selector: "co-filter-item",
11976
+ template: "\n <div class=\"co-filter-item-header\">\n <co-collapsible\n [headerTitle]=\"placeholder\"\n [expandButtonLast]=\"true\"\n [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"\n [expanded]=\"expanded\"\n [showButton]=\"showButton\"\n [buttonText]=\"filterButtonLabel\"\n (buttonClicked)=\"onButtonClicked()\"\n >\n <div class=\"co-filter-item-collapsable-content\">\n <div class=\"co-filter-item-custom-content\" *ngIf=\"customContent; else collectionContent\"\n (keydown)=\"showButton=true\" (mousedown)=\"showButton=true\">\n <ng-content></ng-content>\n </div>\n <ng-template #collectionContent>\n <div class=\"co-filter-item-collection-content\">\n <co-input-text\n *ngIf=\"collection?.length > 10 || minSearchCharsToLoadCollection\"\n [placeholder]=\"searchPlaceholder\"\n [model]=\"filterText\"\n (modelChange)=\"applyFilter($event)\"\n >\n </co-input-text>\n <div class=\"no-results\" *ngIf=\"filteredCollection?.length === 0\">\n <span [textContent]=\"noResultsLabel\"></span>\n </div>\n <div class=\"co-filter-item-collection-results\">\n <ng-container\n *ngFor=\"let option of filteredCollection; let index = index\">\n <div class=\"co-filter-item-collection-result-item\" *ngIf=\"index < limitTo || showAllResults\">\n <co-input-checkbox *ngIf=\"!singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n [clickableLabel]=\"false\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-checkbox>\n <co-input-radio-button *ngIf=\"singleSelect\"\n [label]=\"option.description\"\n [model]=\"option.checked\"\n (modelChange)=\"handleModelChange(option)\"\n ></co-input-radio-button>\n <div class=\"co-filter-item-amount\" *ngIf=\"option.count\"\n [textContent]=\"option.count.toString() | append: ')' | prepend: ' ('\"\n ></div>\n </div>\n\n </ng-container>\n </div>\n <div class=\"co-filter-show-more-or-less\" *ngIf=\"!showAllResults\">\n <div class=\"co-filter-show-more clickable\"\n *ngIf=\"moreToShow()\">\n <a (click)=\"increaseLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointDown)\"></co-icon>\n <span [textContent]=\"showMoreLabel\"></span>\n </a>\n </div>\n <div class=\"co-filter-show-less clickable\"\n *ngIf=\"lessToShow()\">\n <a (click)=\"setToInitialLimit()\">\n <co-icon [iconData]=\"iconService.getIcon(icons.ArrowPointUp)\"></co-icon>\n <span [textContent]=\"showLessLabel\"></span>\n </a>\n </div>\n </div>\n </div>\n </ng-template>\n </div>\n </co-collapsible>\n </div>\n\n ",
11977
+ encapsulation: i0.ViewEncapsulation.None,
11978
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
11428
11979
  },] }
11429
11980
  ];
11430
- ClickOutsideDirective.ctorParameters = function () { return [
11431
- { type: i0.ElementRef },
11432
- { type: i0.NgZone },
11433
- { type: ClickOutsideMasterService }
11981
+ FilterItemComponent.ctorParameters = function () { return [
11982
+ { type: IconCacheService }
11434
11983
  ]; };
11435
- ClickOutsideDirective.propDecorators = {
11436
- enabled: [{ type: i0.Input, args: ["clickOutside",] }],
11437
- alwaysTrigger: [{ type: i0.Input }],
11438
- clickOutside: [{ type: i0.Output }]
11439
- };
11440
- __decorate([
11441
- InputBoolean()
11442
- ], ClickOutsideDirective.prototype, "alwaysTrigger", void 0);
11443
-
11444
- var ClickoutsideModule = /** @class */ (function () {
11445
- function ClickoutsideModule() {
11446
- }
11447
- return ClickoutsideModule;
11448
- }());
11449
- ClickoutsideModule.decorators = [
11450
- { type: i0.NgModule, args: [{
11451
- declarations: [
11452
- ClickOutsideDirective
11453
- ],
11454
- providers: [
11455
- ClickOutsideMasterService
11456
- ],
11457
- exports: [
11458
- ClickOutsideDirective
11459
- ]
11460
- },] }
11461
- ];
11984
+ FilterItemComponent.propDecorators = {
11985
+ collection: [{ type: i0.Input }],
11986
+ placeholder: [{ type: i0.Input }],
11987
+ initialLimit: [{ type: i0.Input }],
11988
+ expanded: [{ type: i0.Input }],
11989
+ minSearchCharsToLoadCollection: [{ type: i0.Input }],
11990
+ collectionLoadFn: [{ type: i0.Input }],
11991
+ customContent: [{ type: i0.Input }],
11992
+ showAllResults: [{ type: i0.Input }],
11993
+ singleSelect: [{ type: i0.Input }],
11994
+ filterButtonLabel: [{ type: i0.Input }],
11995
+ searchPlaceholder: [{ type: i0.Input }],
11996
+ showMoreLabel: [{ type: i0.Input }],
11997
+ showLessLabel: [{ type: i0.Input }],
11998
+ noResultsLabel: [{ type: i0.Input }],
11999
+ collectionChange: [{ type: i0.Output }],
12000
+ filterButtonClicked: [{ type: i0.Output }],
12001
+ showClass: [{ type: i0.HostBinding, args: ["class.co-filter-item",] }]
12002
+ };
11462
12003
 
11463
- var OverlayDirective = /** @class */ (function () {
11464
- function OverlayDirective(elementRef) {
11465
- this.keepInView = false;
11466
- this._elementRef = elementRef;
12004
+ // A pipe for prepending strings to other strings in view templates.
12005
+ var PrependPipe = /** @class */ (function () {
12006
+ function PrependPipe() {
11467
12007
  }
11468
- Object.defineProperty(OverlayDirective.prototype, "parent", {
11469
- set: function (value) {
11470
- if (value && value.elementRef) {
11471
- this._parent = value.elementRef;
11472
- }
11473
- else {
11474
- if (this._parent) {
11475
- this._observer.disconnect();
11476
- }
11477
- }
11478
- },
11479
- enumerable: false,
11480
- configurable: true
11481
- });
11482
- OverlayDirective.prototype.handleScroll = function (event) {
11483
- this._checkAndPlaceElement();
11484
- };
11485
- OverlayDirective.prototype.ngOnDestroy = function () {
11486
- // document.removeEventListener("scroll", (event) => this._handleScroll(event), false);
11487
- this._observer.disconnect();
11488
- this._elementRef = undefined;
11489
- this._parent = undefined;
11490
- };
11491
- OverlayDirective.prototype.ngOnInit = function () {
11492
- var _this = this;
11493
- // document.addEventListener("scroll", (event) => this._handleScroll(event), false);
11494
- this._checkAndPlaceElement();
11495
- this._observer = new ResizeObserver(function (entries) {
11496
- _this._checkAndPlaceElement();
11497
- });
11498
- this._observer.observe(document.body);
11499
- };
11500
- OverlayDirective.prototype._checkAndPlaceElement = function () {
11501
- var elementRect = this._elementRef.nativeElement.getBoundingClientRect();
11502
- var parentRect = this._parent.nativeElement.getBoundingClientRect();
11503
- this._placeElement(window.innerHeight, window.innerWidth, parentRect, elementRect);
11504
- };
11505
- OverlayDirective.prototype._placeElement = function (bottom, right, parentRect, elementRect) {
11506
- if (bottom < parentRect.bottom + elementRect.height) { // make sure it fits at the bottom
11507
- this._elementRef.nativeElement.style.top = (parentRect.top - elementRect.height) + "px";
11508
- }
11509
- else {
11510
- this._elementRef.nativeElement.style.top = parentRect.bottom + "px";
12008
+ PrependPipe.prototype.transform = function (value, prepend) {
12009
+ if (!value) {
12010
+ return "";
11511
12011
  }
11512
- if (this.keepInView) {
11513
- if (elementRect.right > window.innerWidth) {
11514
- //see if we can move it to the left
11515
- if ((window.innerWidth - elementRect.width) > 0) {
11516
- this._elementRef.nativeElement.style.left = (window.innerWidth - elementRect.width) + "px";
11517
- }
11518
- else { //resize so it fits into view
11519
- this._elementRef.nativeElement.style.width = window.innerWidth + "px";
11520
- this._elementRef.nativeElement.style.left = 0;
11521
- }
11522
- }
12012
+ if (!prepend) {
12013
+ return value;
11523
12014
  }
12015
+ return prepend + value;
11524
12016
  };
11525
- return OverlayDirective;
12017
+ return PrependPipe;
11526
12018
  }());
11527
- OverlayDirective.decorators = [
11528
- { type: i0.Directive, args: [{
11529
- selector: "[overlay]"
11530
- },] }
11531
- ];
11532
- OverlayDirective.ctorParameters = function () { return [
11533
- { type: i0.ElementRef }
11534
- ]; };
11535
- OverlayDirective.propDecorators = {
11536
- parent: [{ type: i0.Input, args: ["overlay",] }],
11537
- keepInView: [{ type: i0.Input }],
11538
- handleScroll: [{ type: i0.HostListener, args: ["document:scroll", ["$event"],] }]
11539
- };
12019
+ PrependPipe.decorators = [
12020
+ { type: i0.Pipe, args: [{ name: "prepend" },] }
12021
+ ];
11540
12022
 
11541
- var OverlayParentDirective = /** @class */ (function () {
11542
- function OverlayParentDirective(elementRef) {
11543
- this.elementRef = elementRef;
12023
+ var PrependPipeModule = /** @class */ (function () {
12024
+ function PrependPipeModule() {
11544
12025
  }
11545
- OverlayParentDirective.prototype.ngOnDestroy = function () {
11546
- this.elementRef = undefined;
11547
- };
11548
- return OverlayParentDirective;
12026
+ return PrependPipeModule;
11549
12027
  }());
11550
- OverlayParentDirective.decorators = [
11551
- { type: i0.Directive, args: [{
11552
- selector: '[overlayParent]',
11553
- exportAs: 'overlayParent'
12028
+ PrependPipeModule.decorators = [
12029
+ { type: i0.NgModule, args: [{
12030
+ declarations: [
12031
+ PrependPipe
12032
+ ],
12033
+ exports: [
12034
+ PrependPipe
12035
+ ]
11554
12036
  },] }
11555
- ];
11556
- OverlayParentDirective.ctorParameters = function () { return [
11557
- { type: i0.ElementRef }
11558
- ]; };
12037
+ ];
11559
12038
 
11560
- var OverlayModule = /** @class */ (function () {
11561
- function OverlayModule() {
12039
+ var FilterItemModule = /** @class */ (function () {
12040
+ function FilterItemModule() {
11562
12041
  }
11563
- return OverlayModule;
12042
+ return FilterItemModule;
11564
12043
  }());
11565
- OverlayModule.decorators = [
12044
+ FilterItemModule.decorators = [
11566
12045
  { type: i0.NgModule, args: [{
12046
+ imports: [
12047
+ common.CommonModule,
12048
+ CollapsibleModule,
12049
+ InputTextModule,
12050
+ InputCheckboxMultiSelectModule,
12051
+ InputCheckboxModule,
12052
+ IconModule,
12053
+ scrolling.ScrollingModule,
12054
+ AppendPipeModule,
12055
+ PrependPipeModule,
12056
+ InputTextModule,
12057
+ InputRadioButtonModule,
12058
+ InputTextModule
12059
+ ],
11567
12060
  declarations: [
11568
- OverlayDirective,
11569
- OverlayParentDirective
12061
+ FilterItemComponent
11570
12062
  ],
11571
12063
  exports: [
11572
- OverlayDirective,
11573
- OverlayParentDirective
12064
+ FilterItemComponent
11574
12065
  ]
11575
12066
  },] }
11576
12067
  ];
@@ -11992,28 +12483,6 @@
11992
12483
  },] }
11993
12484
  ];
11994
12485
 
11995
- var ColorSequenceService = /** @class */ (function () {
11996
- function ColorSequenceService() {
11997
- this.colors = new Map();
11998
- }
11999
- ColorSequenceService.prototype.getRandomColor = function (id) {
12000
- if (this.colors.has(id)) {
12001
- return this.colors.get(id);
12002
- }
12003
- var randomColor = Math.floor(Math.random() * 16777215).toString(16);
12004
- var result = '#' + randomColor;
12005
- this.colors.set(id, result);
12006
- return result;
12007
- };
12008
- return ColorSequenceService;
12009
- }());
12010
- ColorSequenceService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ColorSequenceService_Factory() { return new ColorSequenceService(); }, token: ColorSequenceService, providedIn: "root" });
12011
- ColorSequenceService.decorators = [
12012
- { type: i0.Injectable, args: [{
12013
- providedIn: 'root'
12014
- },] }
12015
- ];
12016
-
12017
12486
  var FilterItemViewmodel = /** @class */ (function () {
12018
12487
  function FilterItemViewmodel(code, description, checked, count, valueName) {
12019
12488
  this.checked = false;
@@ -12038,6 +12507,28 @@
12038
12507
  return FilterViewmodel;
12039
12508
  }());
12040
12509
 
12510
+ var ColorSequenceService = /** @class */ (function () {
12511
+ function ColorSequenceService() {
12512
+ this.colors = new Map();
12513
+ }
12514
+ ColorSequenceService.prototype.getRandomColor = function (id) {
12515
+ if (this.colors.has(id)) {
12516
+ return this.colors.get(id);
12517
+ }
12518
+ var randomColor = Math.floor(Math.random() * 16777215).toString(16);
12519
+ var result = '#' + randomColor;
12520
+ this.colors.set(id, result);
12521
+ return result;
12522
+ };
12523
+ return ColorSequenceService;
12524
+ }());
12525
+ ColorSequenceService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function ColorSequenceService_Factory() { return new ColorSequenceService(); }, token: ColorSequenceService, providedIn: "root" });
12526
+ ColorSequenceService.decorators = [
12527
+ { type: i0.Injectable, args: [{
12528
+ providedIn: 'root'
12529
+ },] }
12530
+ ];
12531
+
12041
12532
  /*
12042
12533
  * Public API Surface of corecomponents
12043
12534
  */
@@ -12126,11 +12617,16 @@
12126
12617
  exports.InputTextareaModule = InputTextareaModule;
12127
12618
  exports.LevelIndicatorComponent = LevelIndicatorComponent;
12128
12619
  exports.LevelIndicatorModule = LevelIndicatorModule;
12620
+ exports.ListOfValuesComponent = ListOfValuesComponent;
12621
+ exports.ListOfValuesModule = ListOfValuesModule;
12622
+ exports.ListOfValuesMultiselectSearch = ListOfValuesMultiselectSearch;
12623
+ exports.ListOfValuesMultiselectSearchModule = ListOfValuesMultiselectSearchModule;
12129
12624
  exports.MultiSelectListComponent = MultiSelectListComponent;
12130
12625
  exports.MultiSelectListModule = MultiSelectListModule;
12131
12626
  exports.ObserveVisibilityModule = ObserveVisibilityModule;
12132
12627
  exports.OrientationOfDirection = OrientationOfDirection;
12133
12628
  exports.OverlayModule = OverlayModule;
12629
+ exports.OverlayService = OverlayService;
12134
12630
  exports.PaginationBarComponent = PaginationBarComponent;
12135
12631
  exports.PaginationBarModule = PaginationBarModule;
12136
12632
  exports.PaginationComponent = PaginationComponent;
@@ -12156,21 +12652,22 @@
12156
12652
  exports.showHideDialogAnimation = showHideDialogAnimation;
12157
12653
  exports["ɵa"] = RippleModule;
12158
12654
  exports["ɵb"] = MD_RIPPLE_GLOBAL_OPTIONS;
12159
- exports["ɵba"] = PaginationService;
12160
- exports["ɵbb"] = PaginatePipe;
12161
- exports["ɵbc"] = SimpleGridCellComponent;
12162
- exports["ɵbd"] = PrependPipeModule;
12163
- exports["ɵbe"] = PrependPipe;
12655
+ exports["ɵba"] = BaseSimpleGridComponent;
12656
+ exports["ɵbb"] = ObserveVisibilityDirective;
12657
+ exports["ɵbc"] = PaginationService;
12658
+ exports["ɵbd"] = PaginatePipe;
12659
+ exports["ɵbe"] = SimpleGridCellComponent;
12164
12660
  exports["ɵbf"] = ClickOutsideDirective;
12165
12661
  exports["ɵbg"] = ClickOutsideMasterService;
12166
- exports["ɵbh"] = OverlayDirective;
12167
- exports["ɵbi"] = OverlayParentDirective;
12168
- exports["ɵbj"] = TooltipModule;
12169
- exports["ɵbk"] = TooltipComponent;
12170
- exports["ɵbl"] = TooltipDirective;
12171
- exports["ɵbm"] = CheckmarkOverlayComponent;
12172
- exports["ɵbn"] = ScreenConfigurationDirective;
12173
- exports["ɵbo"] = ScreenConfigComponentWrapper;
12662
+ exports["ɵbh"] = ListOfValuesPopupComponent;
12663
+ exports["ɵbi"] = PrependPipeModule;
12664
+ exports["ɵbj"] = PrependPipe;
12665
+ exports["ɵbk"] = TooltipModule;
12666
+ exports["ɵbl"] = TooltipComponent;
12667
+ exports["ɵbm"] = TooltipDirective;
12668
+ exports["ɵbn"] = CheckmarkOverlayComponent;
12669
+ exports["ɵbo"] = ScreenConfigurationDirective;
12670
+ exports["ɵbp"] = ScreenConfigComponentWrapper;
12174
12671
  exports["ɵc"] = CoRippleDirective;
12175
12672
  exports["ɵd"] = CoViewportRulerService;
12176
12673
  exports["ɵe"] = CoScrollDispatcherService;
@@ -12191,10 +12688,10 @@
12191
12688
  exports["ɵt"] = CommitButtonsModule;
12192
12689
  exports["ɵu"] = CommitButtonsComponent;
12193
12690
  exports["ɵv"] = ValidationErrorModule;
12194
- exports["ɵw"] = ValidationErrorComponent;
12195
- exports["ɵx"] = PopupShowerService;
12196
- exports["ɵy"] = BaseSimpleGridComponent;
12197
- exports["ɵz"] = ObserveVisibilityDirective;
12691
+ exports["ɵw"] = OverlayDirective;
12692
+ exports["ɵx"] = OverlayParentDirective;
12693
+ exports["ɵy"] = ValidationErrorComponent;
12694
+ exports["ɵz"] = PopupShowerService;
12198
12695
 
12199
12696
  Object.defineProperty(exports, '__esModule', { value: true });
12200
12697