@stemy/ngx-utils 19.1.0 → 19.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5379,6 +5379,9 @@ class DropListComponent {
5379
5379
  this.idField = "id";
5380
5380
  this.labelField = "label";
5381
5381
  this.value = [];
5382
+ this.context = [];
5383
+ this.prepareItem = () => { };
5384
+ this.checkFn = () => false;
5382
5385
  this.valueMap = {};
5383
5386
  this.remove = id => {
5384
5387
  this.changeValue(this.value.filter(t => t !== id));
@@ -5421,6 +5424,8 @@ class DropListComponent {
5421
5424
  this.valueMap = this.context?.reduce((res, item) => {
5422
5425
  // In case this is a dynamic form option which stores real value under props
5423
5426
  item = Object.assign({}, item, item.props || {});
5427
+ // Prepare item
5428
+ this.prepareItem(item);
5424
5429
  const id = item[this.idField] || item.id;
5425
5430
  res[id] = item;
5426
5431
  return res;
@@ -5448,7 +5453,7 @@ class DropListComponent {
5448
5453
  this.onTouched?.();
5449
5454
  }
5450
5455
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.3", ngImport: i0, type: DropListComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
5451
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: DropListComponent, isStandalone: false, selector: "drop-list", inputs: { disabled: "disabled", unique: "unique", idField: "idField", labelField: "labelField", value: "value", context: "context", checkFn: "checkFn" }, providers: [{
5456
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.3", type: DropListComponent, isStandalone: false, selector: "drop-list", inputs: { disabled: "disabled", unique: "unique", idField: "idField", labelField: "labelField", value: "value", context: "context", prepareItem: "prepareItem", checkFn: "checkFn" }, providers: [{
5452
5457
  provide: NG_VALUE_ACCESSOR,
5453
5458
  useExisting: forwardRef(() => DropListComponent),
5454
5459
  multi: true,
@@ -5473,6 +5478,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.3", ngImpor
5473
5478
  type: Input
5474
5479
  }], context: [{
5475
5480
  type: Input
5481
+ }], prepareItem: [{
5482
+ type: Input
5476
5483
  }], checkFn: [{
5477
5484
  type: Input
5478
5485
  }], itemTemplate: [{