@wizishop/angular-components 0.0.63 → 0.0.67

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.
@@ -3654,7 +3654,7 @@
3654
3654
  this.selectValue.emit(index);
3655
3655
  }
3656
3656
  else {
3657
- var findInOption = this.options.findIndex(function (element) { return element.label === label && element.value === value; });
3657
+ var findInOption = this.options.findIndex(function (element) { return element.label === label && element.id === value; });
3658
3658
  this.selectValue.emit(findInOption);
3659
3659
  }
3660
3660
  };
@@ -3667,7 +3667,7 @@
3667
3667
  SearchComponent.decorators = [
3668
3668
  { type: i0.Component, args: [{
3669
3669
  selector: 'wac-search',
3670
- template: "<div class=\"wac-search\" [ngClass]=\"{ open: openSelect || alwaysOpen }\" [zIndexToggle]=\"openSelect\" wzAutoHide (clickOutside)=\"closeSelect()\">\n <div class=\"wac-search__wrapper\">\n <button><i class=\"fal fa-search\"></i></button>\n <input [value]=\"search\" type=\"text\" required [placeholder]=\"placeholder\" (focus)=\"openSelect = true;\" (focusout)=\"sendEventFocusOut()\" (keyup)=\"setSearchValueToQuery($event)\" />\n </div>\n <div class=\"wac-search__absolute\" *ngIf=\"triggerOptions\" [ngClass]=\"{'hidden': !openSelect}\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"triggerOptions.length > 0\">\n <div (click)=\"onClose()\" class=\"wac-select__content__item\" *ngFor=\"let item of triggerOptions; let index = index;\">\n <div [ngClass]=\"{ selected: item.active }\" (click)=\"onSelectItem(index, item.value, item.label)\">\n {{ item.label }}\n </div>\n </div>\n </perfect-scrollbar>\n <div class=\"wac-select__content__empty\" *ngIf=\"triggerOptions.length === 0\">\n <span *ngIf=\"emptyResult\">{{emptyResult}}</span>\n </div>\n </div>\n</div>\n"
3670
+ template: "<div class=\"wac-search\" [ngClass]=\"{ open: openSelect || alwaysOpen }\" [zIndexToggle]=\"openSelect\" wzAutoHide (clickOutside)=\"closeSelect()\">\n <div class=\"wac-search__wrapper\">\n <button><i class=\"fal fa-search\"></i></button>\n <input [value]=\"search\" type=\"text\" required [placeholder]=\"placeholder\" (focus)=\"openSelect = true;\" (focusout)=\"sendEventFocusOut()\" (keyup)=\"setSearchValueToQuery($event)\" />\n </div>\n <div class=\"wac-search__absolute\" *ngIf=\"triggerOptions\" [ngClass]=\"{'hidden': !openSelect}\">\n <perfect-scrollbar [config]=\"{ suppressScrollX: true }\" *ngIf=\"triggerOptions.length > 0\">\n <div (click)=\"onClose()\" class=\"wac-select__content__item\" *ngFor=\"let item of triggerOptions; let index = index;\">\n <div [ngClass]=\"{ selected: item.checked }\" (click)=\"onSelectItem(index, item.id, item.label)\">\n {{ item.label }}\n </div>\n </div>\n </perfect-scrollbar>\n <div class=\"wac-select__content__empty\" *ngIf=\"triggerOptions.length === 0\">\n <span *ngIf=\"emptyResult\">{{emptyResult}}</span>\n </div>\n </div>\n</div>\n"
3671
3671
  },] }
3672
3672
  ];
3673
3673
  SearchComponent.ctorParameters = function () { return []; };
@@ -3686,7 +3686,9 @@
3686
3686
  var SelectedListComponent = /** @class */ (function () {
3687
3687
  function SelectedListComponent() {
3688
3688
  this.enableSelectAll = true;
3689
- this.selectedItems = new i0.EventEmitter();
3689
+ this.selectedItemsIndex = new i0.EventEmitter();
3690
+ this.selectedItemsAll = new i0.EventEmitter();
3691
+ this.unSelectedItemsAll = new i0.EventEmitter();
3690
3692
  this.selectedOptionIndex = [];
3691
3693
  this.switchSelectAll = false;
3692
3694
  }
@@ -3702,17 +3704,17 @@
3702
3704
  var _this = this;
3703
3705
  this.selectedOptionIndex = [];
3704
3706
  this.options.forEach(function (eln, i) {
3705
- _this.options[i].active = true;
3707
+ _this.options[i].checked = true;
3706
3708
  _this.selectedOptionIndex.push(i);
3707
3709
  });
3708
3710
  this.switchSelectAll = true;
3709
- this.selectedItems.emit(this.selectedOptionIndex);
3711
+ this.selectedItemsAll.emit(this.selectedOptionIndex);
3710
3712
  };
3711
3713
  SelectedListComponent.prototype.checkSelectedItem = function () {
3712
3714
  var _this = this;
3713
3715
  this.selectedOptionIndex = [];
3714
3716
  this.options.forEach(function (eln, i) {
3715
- if (eln.active) {
3717
+ if (eln.checked) {
3716
3718
  _this.selectedOptionIndex.push(i);
3717
3719
  }
3718
3720
  });
@@ -3721,22 +3723,22 @@
3721
3723
  var _this = this;
3722
3724
  this.selectedOptionIndex = [];
3723
3725
  this.options.forEach(function (eln, i) {
3724
- _this.options[i].active = false;
3726
+ _this.options[i].checked = false;
3725
3727
  });
3726
3728
  this.switchSelectAll = false;
3727
- this.selectedItems.emit(this.selectedOptionIndex);
3729
+ this.unSelectedItemsAll.emit(this.selectedOptionIndex);
3728
3730
  };
3729
3731
  SelectedListComponent.prototype.selectItem = function (i) {
3730
- this.options[i].active = !this.options[i].active;
3732
+ this.options[i].checked = !this.options[i].checked;
3731
3733
  this.checkSelectedItem();
3732
- this.selectedItems.emit(this.selectedOptionIndex);
3734
+ this.selectedItemsIndex.emit(i);
3733
3735
  };
3734
3736
  return SelectedListComponent;
3735
3737
  }());
3736
3738
  SelectedListComponent.decorators = [
3737
3739
  { type: i0.Component, args: [{
3738
3740
  selector: 'wac-selected-list',
3739
- template: "<div class=\"selected-list\">\n <div class=\"selected-list__wrapper\">\n <div class=\"selected-list__wrapper__head\">\n <p *ngIf=\"label\" [innerHTML]=\"label\"></p>\n <span *ngIf=\"textSelectAll && !switchSelectAll\" [innerHTML]=\"textSelectAll\" (click)=\"selectAll()\"></span>\n <span *ngIf=\"textUnSelectAll && switchSelectAll\" [innerHTML]=\"textUnSelectAll\" (click)=\"unSelectAll()\"></span>\n </div>\n <div class=\"selected-list__wrapper__content\">\n <div class=\"selected-list__wrapper__content__item\" *ngFor=\"let item of options;let i = index;\" [ngClass]=\"{'active': item.active}\" (click)=\"selectItem(i)\">\n <span [innerHTML]=\"item.label\"></span>\n <i class=\"fas fa-check\"></i>\n </div>\n </div>\n </div>\n</div>\n"
3741
+ template: "<div class=\"selected-list\">\n <div class=\"selected-list__wrapper\">\n <div class=\"selected-list__wrapper__head\">\n <p *ngIf=\"label\" [innerHTML]=\"label\"></p>\n <span *ngIf=\"textSelectAll && !switchSelectAll\" [innerHTML]=\"textSelectAll\" (click)=\"selectAll()\"></span>\n <span *ngIf=\"textUnSelectAll && switchSelectAll\" [innerHTML]=\"textUnSelectAll\" (click)=\"unSelectAll()\"></span>\n </div>\n <div class=\"selected-list__wrapper__content\">\n <div class=\"selected-list__wrapper__content__item\" *ngFor=\"let item of options;let i = index;\" [ngClass]=\"{'active': item.checked}\" (click)=\"selectItem(i)\">\n <span [innerHTML]=\"item.label\"></span>\n <i class=\"fas fa-check\"></i>\n </div>\n </div>\n </div>\n</div>\n"
3740
3742
  },] }
3741
3743
  ];
3742
3744
  SelectedListComponent.propDecorators = {
@@ -3745,7 +3747,9 @@
3745
3747
  textSelectAll: [{ type: i0.Input }],
3746
3748
  textUnSelectAll: [{ type: i0.Input }],
3747
3749
  enableSelectAll: [{ type: i0.Input }],
3748
- selectedItems: [{ type: i0.Output }]
3750
+ selectedItemsIndex: [{ type: i0.Output }],
3751
+ selectedItemsAll: [{ type: i0.Output }],
3752
+ unSelectedItemsAll: [{ type: i0.Output }]
3749
3753
  };
3750
3754
 
3751
3755
  var components = [