@wizishop/angular-components 0.0.200 → 0.0.201

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.
@@ -4571,27 +4571,33 @@
4571
4571
 
4572
4572
  var DraganddropListComponent = /** @class */ (function () {
4573
4573
  function DraganddropListComponent() {
4574
+ this.disable = false;
4574
4575
  this.itemsChange = new i0.EventEmitter();
4575
4576
  }
4576
4577
  DraganddropListComponent.prototype.drop = function (event) {
4577
- dragDrop.moveItemInArray(this.items, event.previousIndex, event.currentIndex);
4578
- this.itemsChange.emit(this.items);
4578
+ if (!this.disable) {
4579
+ dragDrop.moveItemInArray(this.items, event.previousIndex, event.currentIndex);
4580
+ this.itemsChange.emit(this.items);
4581
+ }
4579
4582
  };
4580
4583
  DraganddropListComponent.prototype.delete = function (index) {
4581
- this.items = this.items.filter(function (value, i) { return i !== index; });
4582
- this.itemsChange.emit(this.items);
4584
+ if (!this.disable) {
4585
+ this.items = this.items.filter(function (value, i) { return i !== index; });
4586
+ this.itemsChange.emit(this.items);
4587
+ }
4583
4588
  };
4584
4589
  return DraganddropListComponent;
4585
4590
  }());
4586
4591
  DraganddropListComponent.decorators = [
4587
4592
  { type: i0.Component, args: [{
4588
4593
  selector: 'wac-draganddrop-list',
4589
- template: "<div class=\"wac-draganddrop-list\">\n <div class=\"wac-draganddrop-list__wrapper\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"wac-draganddrop-list__wrapper__item\" *ngFor=\"let item of items;let i = index;\" cdkDrag>\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__icon\">\n <span></span>\n </span>\n <span class=\"wac-draganddrop-list__wrapper__item__label\" [innerHTML]=\"item\"></span>\n </div>\n <div>\n <wac-button [iconFontSize]=\"'14px'\" [opacity]=\"true\" [icon]=\"'fa-regular fa-trash-can'\" [extraClasses]=\"'is-danger'\" (click)=\"delete(i)\"></wac-button>\n </div>\n </div>\n </div>\n</div>\n",
4594
+ template: "<div class=\"wac-draganddrop-list\" *ngIf=\"!disable\">\n <div class=\"wac-draganddrop-list__wrapper\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"wac-draganddrop-list__wrapper__item\" *ngFor=\"let item of items;let i = index;\" cdkDrag>\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__icon\">\n <span></span>\n </span>\n <span class=\"wac-draganddrop-list__wrapper__item__label\" [innerHTML]=\"item\"></span>\n </div>\n <div>\n <wac-button [iconFontSize]=\"'14px'\" [opacity]=\"true\" [icon]=\"'fa-regular fa-trash-can'\" [extraClasses]=\"'is-danger'\" (click)=\"delete(i)\"></wac-button>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"wac-draganddrop-list wac-draganddrop-list--disabled\" *ngIf=\"disable\">\n <div class=\"wac-draganddrop-list__wrapper\">\n <div class=\"wac-draganddrop-list__wrapper__item\" *ngFor=\"let item of items;let i = index;\">\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__label\" [innerHTML]=\"item\"></span>\n </div>\n </div>\n </div>\n</div>\n",
4590
4595
  changeDetection: i0.ChangeDetectionStrategy.OnPush
4591
4596
  },] }
4592
4597
  ];
4593
4598
  DraganddropListComponent.propDecorators = {
4594
4599
  items: [{ type: i0.Input }],
4600
+ disable: [{ type: i0.Input }],
4595
4601
  itemsChange: [{ type: i0.Output }]
4596
4602
  };
4597
4603