@wizishop/angular-components 0.0.235 → 0.0.236
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 +347 -347
- package/bundles/wizishop-angular-components.umd.js +1 -13
- 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 +2 -14
- package/fesm2015/wizishop-angular-components.js +1 -13
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/draganddrop-list/draganddrop-list.component.d.ts +0 -3
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.236.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.235.tgz +0 -0
|
@@ -4592,30 +4592,22 @@
|
|
|
4592
4592
|
this.itemsChange = new i0.EventEmitter();
|
|
4593
4593
|
}
|
|
4594
4594
|
DraganddropListComponent.prototype.ngOnInit = function () {
|
|
4595
|
-
this.setTempCopy();
|
|
4596
4595
|
};
|
|
4597
4596
|
DraganddropListComponent.prototype.drop = function (event) {
|
|
4598
4597
|
if (!this.disabled) {
|
|
4599
4598
|
dragDrop.moveItemInArray(this.items, event.previousIndex, event.currentIndex);
|
|
4600
4599
|
this.itemsChange.emit(Object.values(this.items));
|
|
4601
|
-
this.setTempCopy();
|
|
4602
4600
|
}
|
|
4603
4601
|
};
|
|
4604
4602
|
DraganddropListComponent.prototype.delete = function (index) {
|
|
4605
4603
|
if (!this.disabled) {
|
|
4606
4604
|
this.items = this.items.filter(function (value, i) { return i !== index; });
|
|
4607
4605
|
this.itemsChange.emit(Object.values(this.items));
|
|
4608
|
-
this.setTempCopy();
|
|
4609
4606
|
}
|
|
4610
4607
|
};
|
|
4611
|
-
DraganddropListComponent.prototype.saveField = function (index, event) {
|
|
4612
|
-
this.copyTemps[index] = event.target.value;
|
|
4613
|
-
this.itemsChange.emit(Object.values(this.copyTemps));
|
|
4614
|
-
};
|
|
4615
4608
|
DraganddropListComponent.prototype.saveFieldEnd = function (index, event) {
|
|
4616
4609
|
this.items[index] = event.target.value;
|
|
4617
4610
|
this.itemsChange.emit(Object.values(this.items));
|
|
4618
|
-
this.setTempCopy();
|
|
4619
4611
|
};
|
|
4620
4612
|
DraganddropListComponent.prototype.addField = function () {
|
|
4621
4613
|
this.showTriggerSave = true;
|
|
@@ -4623,18 +4615,14 @@
|
|
|
4623
4615
|
DraganddropListComponent.prototype.saveNewField = function (event) {
|
|
4624
4616
|
this.items.push(event.target.value);
|
|
4625
4617
|
this.itemsChange.emit(Object.values(this.items));
|
|
4626
|
-
this.setTempCopy();
|
|
4627
4618
|
this.showTriggerSave = false;
|
|
4628
4619
|
};
|
|
4629
|
-
DraganddropListComponent.prototype.setTempCopy = function () {
|
|
4630
|
-
this.copyTemps = Object.assign({}, this.items);
|
|
4631
|
-
};
|
|
4632
4620
|
return DraganddropListComponent;
|
|
4633
4621
|
}());
|
|
4634
4622
|
DraganddropListComponent.decorators = [
|
|
4635
4623
|
{ type: i0.Component, args: [{
|
|
4636
4624
|
selector: 'wac-draganddrop-list',
|
|
4637
|
-
template: "<div class=\"wac-draganddrop-list\" *ngIf=\"!disabled\" [style.backgroundColor]=\"backgroundColor\">\n <div class=\"wac-draganddrop-list__label\" *ngIf=\"label\"><span [innerHTML]=\"label\"></span></div>\n <div class=\"wac-draganddrop-list__wrapper\" [cdkDropListLockAxis]=\"'y'\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"wac-draganddrop-list__wrapper__item\" [style.backgroundColor]=\"backgroundColor\" *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 (mousedown)=\"$event.stopPropagation()\" class=\"wac-draganddrop-list__wrapper__item__input\">\n <wac-input [value]=\"item\" [extraClasses]=\"'transparent'\" (
|
|
4625
|
+
template: "<div class=\"wac-draganddrop-list\" *ngIf=\"!disabled\" [style.backgroundColor]=\"backgroundColor\">\n <div class=\"wac-draganddrop-list__label\" *ngIf=\"label\"><span [innerHTML]=\"label\"></span></div>\n <div class=\"wac-draganddrop-list__wrapper\" [cdkDropListLockAxis]=\"'y'\" cdkDropList (cdkDropListDropped)=\"drop($event)\">\n <div class=\"wac-draganddrop-list__wrapper__item\" [style.backgroundColor]=\"backgroundColor\" *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 (mousedown)=\"$event.stopPropagation()\" class=\"wac-draganddrop-list__wrapper__item__input\">\n <wac-input [value]=\"item\" [extraClasses]=\"'transparent'\" (keyup.enter)=\"saveFieldEnd(i, $event)\" (focusout)=\"saveFieldEnd(i, $event)\"></wac-input>\n </span>\n </div>\n <div (mousedown)=\"$event.stopPropagation()\">\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 *ngIf=\"i === (items.length - 1) && max > items.length && !showTriggerSave\">\n <wac-button [extraClasses]=\"'is-info'\" [iconFontSize]=\"'18px'\" [opacity]=\"true\" [icon]=\"'fa-regular fa-plus'\" (click)=\"addField()\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-draganddrop-list__wrapper__item wac-draganddrop-list__wrapper__item--trigger\" *ngIf=\"showTriggerSave\">\n <div>\n <span class=\"wac-draganddrop-list__wrapper__item__icon\">\n <span></span>\n </span>\n <span class=\"wac-draganddrop-list__wrapper__item__input\">\n <wac-input [extraClasses]=\"'transparent'\" (keyup.enter)=\"saveNewField($event)\" (focusout)=\"saveNewField($event)\"></wac-input>\n </span>\n </div>\n </div>\n </div>\n</div>\n\n<div class=\"wac-draganddrop-list wac-draganddrop-list--disabled\" *ngIf=\"disabled\">\n <div class=\"wac-draganddrop-list__label\" *ngIf=\"label\"><span [innerHTML]=\"label\"></span></div>\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",
|
|
4638
4626
|
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
4639
4627
|
},] }
|
|
4640
4628
|
];
|