@wizishop/angular-components 0.0.62 → 0.0.66
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 +1049 -955
- package/bundles/wizishop-angular-components.umd.js +74 -3
- package/bundles/wizishop-angular-components.umd.js.map +1 -1
- package/bundles/wizishop-angular-components.umd.min.js +2 -2
- package/bundles/wizishop-angular-components.umd.min.js.map +1 -1
- package/esm2015/lib/components/search/search.component.js +3 -3
- package/esm2015/lib/components/search/shared/search-option.model.js +1 -1
- package/esm2015/lib/components/selected-list/selected-list.component.js +66 -0
- package/esm2015/lib/components/selected-list/shared/selected-list-option.model.js +2 -0
- package/esm2015/lib/components/shared-components.module.js +4 -2
- package/esm2015/public-api.js +3 -1
- package/fesm2015/wizishop-angular-components.js +70 -4
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/search/search.component.d.ts +1 -1
- package/lib/components/search/shared/search-option.model.d.ts +2 -2
- package/lib/components/selected-list/selected-list.component.d.ts +19 -0
- package/lib/components/selected-list/shared/selected-list-option.model.d.ts +5 -0
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
- package/wizishop-angular-components-0.0.66.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.62.tgz +0 -0
|
@@ -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.
|
|
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.
|
|
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 []; };
|
|
@@ -3683,6 +3683,75 @@
|
|
|
3683
3683
|
searchFocusOut: [{ type: i0.Output }]
|
|
3684
3684
|
};
|
|
3685
3685
|
|
|
3686
|
+
var SelectedListComponent = /** @class */ (function () {
|
|
3687
|
+
function SelectedListComponent() {
|
|
3688
|
+
this.enableSelectAll = true;
|
|
3689
|
+
this.selectedItemsIndex = new i0.EventEmitter();
|
|
3690
|
+
this.selectedItemsAll = new i0.EventEmitter();
|
|
3691
|
+
this.unSelectedItemsAll = new i0.EventEmitter();
|
|
3692
|
+
this.selectedOptionIndex = [];
|
|
3693
|
+
this.switchSelectAll = false;
|
|
3694
|
+
}
|
|
3695
|
+
SelectedListComponent.prototype.ngOnInit = function () {
|
|
3696
|
+
if (typeof this.options !== typeof undefined) {
|
|
3697
|
+
this.checkSelectedItem();
|
|
3698
|
+
if (this.selectedOptionIndex.length === this.options.length) {
|
|
3699
|
+
this.switchSelectAll = true;
|
|
3700
|
+
}
|
|
3701
|
+
}
|
|
3702
|
+
};
|
|
3703
|
+
SelectedListComponent.prototype.selectAll = function () {
|
|
3704
|
+
var _this = this;
|
|
3705
|
+
this.selectedOptionIndex = [];
|
|
3706
|
+
this.options.forEach(function (eln, i) {
|
|
3707
|
+
_this.options[i].checked = true;
|
|
3708
|
+
_this.selectedOptionIndex.push(i);
|
|
3709
|
+
});
|
|
3710
|
+
this.switchSelectAll = true;
|
|
3711
|
+
this.selectedItemsAll.emit(this.selectedOptionIndex);
|
|
3712
|
+
};
|
|
3713
|
+
SelectedListComponent.prototype.checkSelectedItem = function () {
|
|
3714
|
+
var _this = this;
|
|
3715
|
+
this.selectedOptionIndex = [];
|
|
3716
|
+
this.options.forEach(function (eln, i) {
|
|
3717
|
+
if (eln.checked) {
|
|
3718
|
+
_this.selectedOptionIndex.push(i);
|
|
3719
|
+
}
|
|
3720
|
+
});
|
|
3721
|
+
};
|
|
3722
|
+
SelectedListComponent.prototype.unSelectAll = function () {
|
|
3723
|
+
var _this = this;
|
|
3724
|
+
this.selectedOptionIndex = [];
|
|
3725
|
+
this.options.forEach(function (eln, i) {
|
|
3726
|
+
_this.options[i].checked = false;
|
|
3727
|
+
});
|
|
3728
|
+
this.switchSelectAll = false;
|
|
3729
|
+
this.unSelectedItemsAll.emit(this.selectedOptionIndex);
|
|
3730
|
+
};
|
|
3731
|
+
SelectedListComponent.prototype.selectItem = function (i) {
|
|
3732
|
+
this.options[i].checked = !this.options[i].checked;
|
|
3733
|
+
this.checkSelectedItem();
|
|
3734
|
+
this.selectedItemsIndex.emit(i);
|
|
3735
|
+
};
|
|
3736
|
+
return SelectedListComponent;
|
|
3737
|
+
}());
|
|
3738
|
+
SelectedListComponent.decorators = [
|
|
3739
|
+
{ type: i0.Component, args: [{
|
|
3740
|
+
selector: 'wac-selected-list',
|
|
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"
|
|
3742
|
+
},] }
|
|
3743
|
+
];
|
|
3744
|
+
SelectedListComponent.propDecorators = {
|
|
3745
|
+
options: [{ type: i0.Input }],
|
|
3746
|
+
label: [{ type: i0.Input }],
|
|
3747
|
+
textSelectAll: [{ type: i0.Input }],
|
|
3748
|
+
textUnSelectAll: [{ type: i0.Input }],
|
|
3749
|
+
enableSelectAll: [{ type: i0.Input }],
|
|
3750
|
+
selectedItemsIndex: [{ type: i0.Output }],
|
|
3751
|
+
selectedItemsAll: [{ type: i0.Output }],
|
|
3752
|
+
unSelectedItemsAll: [{ type: i0.Output }]
|
|
3753
|
+
};
|
|
3754
|
+
|
|
3686
3755
|
var components = [
|
|
3687
3756
|
TagComponent,
|
|
3688
3757
|
TabComponent,
|
|
@@ -3723,7 +3792,8 @@
|
|
|
3723
3792
|
FiltersComponent,
|
|
3724
3793
|
WrapperBlocsComponent,
|
|
3725
3794
|
SnackbarComponent,
|
|
3726
|
-
SearchComponent
|
|
3795
|
+
SearchComponent,
|
|
3796
|
+
SelectedListComponent
|
|
3727
3797
|
];
|
|
3728
3798
|
var exportsFromModule = [
|
|
3729
3799
|
PaginationComponent,
|
|
@@ -3839,6 +3909,7 @@
|
|
|
3839
3909
|
exports.SearchComponent = SearchComponent;
|
|
3840
3910
|
exports.SelectComponent = SelectComponent;
|
|
3841
3911
|
exports.SelectInTextComponent = SelectInTextComponent;
|
|
3912
|
+
exports.SelectedListComponent = SelectedListComponent;
|
|
3842
3913
|
exports.SeparatorComponent = SeparatorComponent;
|
|
3843
3914
|
exports.SettingsComponent = SettingsComponent;
|
|
3844
3915
|
exports.SharedComponentsModule = SharedComponentsModule;
|