@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.
- package/angular-components.scss +332 -315
- package/bundles/wizishop-angular-components.umd.js +11 -5
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +1 -1
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/draganddrop-list/draganddrop-list.component.js +12 -6
- package/fesm2015/wizishop-angular-components.js +11 -5
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/draganddrop-list/draganddrop-list.component.d.ts +1 -0
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.201.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.200.tgz +0 -0
|
@@ -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
|
-
|
|
4578
|
-
|
|
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
|
-
|
|
4582
|
-
|
|
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
|
|