@colijnit/corecomponents_v12 259.1.24 → 259.1.26

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.
@@ -10810,24 +10810,14 @@
10810
10810
  if (this._newRow) {
10811
10811
  this.saveRow.next(this._newRowReference);
10812
10812
  this._newRowReference = null; // clear
10813
+ window.scrollTo({ top: 0, behavior: 'smooth' });
10813
10814
  }
10814
10815
  else {
10815
10816
  var index = -1; // existing row
10816
- if (this.rowsPerPage) {
10817
- index = (this.currentPage - 1) * this.rowsPerPage + this.editRowIndex;
10818
- }
10819
- else {
10820
- index = this.editRowIndex;
10821
- }
10822
10817
  if (index >= 0 && index < this.data.length) {
10823
- this.saveRow.next(this.data[index]);
10818
+ this.saveRow.next(this.data[this.editRowIndex]);
10824
10819
  }
10825
10820
  }
10826
- if (this.currentPage !== 1) {
10827
- this.currentPage = 1;
10828
- this.selectedRowIndex = -1;
10829
- window.scrollTo({ top: 0, behavior: 'smooth' });
10830
- }
10831
10821
  this._newRow = false;
10832
10822
  if (stopediting) {
10833
10823
  this._resetEdit();
@@ -12049,12 +12039,12 @@
12049
12039
  }
12050
12040
  this.selectedModel = model;
12051
12041
  };
12052
- ListOfValuesComponent.prototype.onModelChange = function (text) {
12042
+ ListOfValuesComponent.prototype.onModelChange = function (model) {
12053
12043
  var _this = this;
12054
12044
  this.isLoading = true;
12055
12045
  clearTimeout(this.debounceTimeout);
12056
12046
  this.debounceTimeout = setTimeout(function () {
12057
- _this.applyFilter(text);
12047
+ _this.applyFilter(model);
12058
12048
  }, 300);
12059
12049
  };
12060
12050
  ListOfValuesComponent.prototype.applyFilter = function (text) {
@@ -12097,6 +12087,9 @@
12097
12087
  (((_b = this.filteredCollection) === null || _b === void 0 ? void 0 : _b.length) > 0 && ((_c = this.filterText) === null || _c === void 0 ? void 0 : _c.length) > 2) ? this.openPopup() : this.closePopup();
12098
12088
  this.isLoading = false;
12099
12089
  this.changeDetector.detectChanges();
12090
+ if (this._lovPopupComponentRef) {
12091
+ this._lovPopupComponentRef.instance.searchTerm = text;
12092
+ }
12100
12093
  return [2 /*return*/];
12101
12094
  }
12102
12095
  });
@@ -12239,7 +12232,7 @@
12239
12232
  ListOfValuesComponent.decorators = [
12240
12233
  { type: i0.Component, args: [{
12241
12234
  selector: 'co-list-of-values',
12242
- template: "\n <co-input-text\n *ngIf=\"!largeCollection\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isSelectOpen\"\n aria-controls=\"lov-popup\"\n role=\"combobox\"\n class=\"no-focus-line\"\n overlayParent\n #parentForOverlay=\"overlayParent\"\n type=\"text\"\n [id]=\"label\"\n [model]=\"multiselect ? selectedModels : selectedModel\"\n [placeholder]=\"label\"\n [myFormInputInstance]=\"this\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [noClickFocus]=\"false\"\n [leftIconData]=\" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData\"\n [rightIcon]=\"isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular\"\n [showClearButton]=\"true\"\n [useContent]=\"multiselect\"\n [customHeight]=\"multiselect\"\n [keepFocussed]=\"keepFocussed\"\n (modelChange)=\"handleInputModelChange($event)\"\n (click)=\"openPopup()\"\n (rightIconClick)=\"toggleSelect()\"\n (keydown)=\"handleInputKeyDown($event)\"\n (clearIconClick)=\"clearModel($event)\"\n (blur)=\"checkModel()\">\n <ng-container *ngIf=\"multiselect && showChips\">\n <div class=\"multiselect-chips-wrapper\">\n <div class=\"chips\" *ngFor=\"let chip of model\">\n <span class=\"chips-description\" [textContent]=\"chip[displayField]\"></span>\n <co-icon class=\"remove-chip-icon\" [icon]=\"icons.CrossSkinny\" (click)=\"removeOptionFromModel(chip)\"></co-icon>\n </div>\n </div>\n </ng-container>\n </co-input-text>\n\n <co-input-text\n *ngIf=\"largeCollection\"\n [model]=\"filterText\"\n [placeholder]=\"label\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (modelChange)=\"onModelChange($event)\">\n </co-input-text>\n <div *ngIf=\"isLoading\" class=\"filter-loader\"><span></span></div>\n <input type=\"hidden\" [ngModel]=\"model\">\n ",
12235
+ template: "\n <co-input-text\n *ngIf=\"!largeCollection\"\n aria-haspopup=\"listbox\"\n [attr.aria-expanded]=\"isSelectOpen\"\n aria-controls=\"lov-popup\"\n role=\"combobox\"\n class=\"no-focus-line\"\n overlayParent\n #parentForOverlay=\"overlayParent\"\n type=\"text\"\n [id]=\"label\"\n [model]=\"multiselect ? ((!selectedModels || selectedModels.length === 0) ? null : selectedModels ) : selectedModel\"\n [placeholder]=\"label\"\n [myFormInputInstance]=\"this\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [required]=\"required\"\n [noClickFocus]=\"false\"\n [leftIconData]=\" model && model[optionIcon] ? iconCacheService.getIcon(model[optionIcon]) : leftIconData\"\n [rightIcon]=\"isSelectOpen ? icons.ChevronUpRegular : icons.ChevronDownRegular\"\n [showClearButton]=\"true\"\n [useContent]=\"multiselect\"\n [customHeight]=\"multiselect\"\n [keepFocussed]=\"keepFocussed\"\n (modelChange)=\"handleInputModelChange($event)\"\n (click)=\"openPopup()\"\n (rightIconClick)=\"toggleSelect()\"\n (keydown)=\"handleInputKeyDown($event)\"\n (clearIconClick)=\"clearModel($event)\"\n (blur)=\"checkModel()\">\n <ng-container *ngIf=\"multiselect && showChips\">\n <div class=\"multiselect-chips-wrapper\">\n <div class=\"chips\" *ngFor=\"let chip of model\">\n <span class=\"chips-description\" [textContent]=\"chip[displayField]\"></span>\n <co-icon class=\"remove-chip-icon\" [icon]=\"icons.CrossSkinny\" (click)=\"removeOptionFromModel(chip)\"></co-icon>\n </div>\n </div>\n </ng-container>\n </co-input-text>\n\n <co-input-text\n *ngIf=\"largeCollection\"\n [model]=\"filterText\"\n [placeholder]=\"label\"\n [required]=\"required\"\n [disabled]=\"disabled\"\n [readonly]=\"readonly\"\n (modelChange)=\"onModelChange($event)\">\n </co-input-text>\n <div *ngIf=\"isLoading\" class=\"filter-loader\"><span></span></div>\n <input type=\"hidden\" [ngModel]=\"(selectedModels && selectedModels.length) || selectedModel ? model : null\">\n ",
12243
12236
  providers: [
12244
12237
  OverlayService,
12245
12238
  {
@@ -14608,7 +14601,7 @@
14608
14601
  if (myCfgObj) {
14609
14602
  this._setHostVisible(myCfgObj.immediatelyVisible());
14610
14603
  if (!this.screenConfigNativeElement) {
14611
- this.hostComponent.required = myCfgObj.isRequired();
14604
+ this.hostComponent.required = this.hostComponent.required || myCfgObj.isRequired();
14612
14605
  this.hostComponent.readonly = this.hostComponent.forceReadonly || this._moduleInReadonlyMode() || myCfgObj.isReadonly();
14613
14606
  this.hostComponent.decimals = myCfgObj.scale;
14614
14607
  this.hostComponent.maxLength = myCfgObj.maxLength;
@@ -15329,13 +15322,15 @@
15329
15322
  return split.join(':');
15330
15323
  };
15331
15324
  HourSchedulingExpandableComponent.prototype.convertTZ = function (date, tzString) {
15332
- return new Date((typeof date === "string" ? new Date(date) : date).toLocaleString("en-US", { timeZone: tzString }));
15325
+ var _a;
15326
+ return new Date((_a = (typeof date === "string" ? new Date(date) : date)) === null || _a === void 0 ? void 0 : _a.toLocaleString("en-US", { timeZone: tzString }));
15333
15327
  };
15334
15328
  HourSchedulingExpandableComponent.prototype.convertDateToEuropean = function (date) {
15335
15329
  return this.convertTZ(date, 'Europe/Amsterdam');
15336
15330
  };
15337
15331
  HourSchedulingExpandableComponent.prototype.handleDeselectAll = function () {
15338
- this.scheduledObjects.forEach(function (scheduledObject) {
15332
+ var _a;
15333
+ (_a = this.scheduledObjects) === null || _a === void 0 ? void 0 : _a.forEach(function (scheduledObject) {
15339
15334
  if (scheduledObject.selected) {
15340
15335
  scheduledObject.selected = false;
15341
15336
  }