@wizishop/angular-components 0.0.113 → 0.0.114
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/bundles/wizishop-angular-components.umd.js +72 -35
- 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/selected-list/selected-list.component.js +3 -17
- package/esm2015/lib/directives/ng-var.directive.js +33 -0
- package/esm2015/lib/directives/shared-directives.module.js +3 -2
- package/esm2015/lib/pipes/selected-list/are-all-options-selected.pipe.js +13 -0
- package/esm2015/lib/pipes/shared-pipes.module.js +4 -2
- package/esm2015/wizishop-angular-components.js +16 -14
- package/fesm2015/wizishop-angular-components.js +51 -20
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/selected-list/selected-list.component.d.ts +1 -5
- package/lib/directives/ng-var.directive.d.ts +9 -0
- package/lib/pipes/selected-list/are-all-options-selected.pipe.d.ts +5 -0
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.114.tgz +0 -0
- package/wizishop-angular-components.d.ts +15 -13
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.113.tgz +0 -0
|
@@ -596,7 +596,44 @@
|
|
|
596
596
|
isActive: [{ type: i0.Input, args: ['zIndexToggle',] }]
|
|
597
597
|
};
|
|
598
598
|
|
|
599
|
-
var
|
|
599
|
+
var VarDirective = /** @class */ (function () {
|
|
600
|
+
function VarDirective(templateRef, vcRef) {
|
|
601
|
+
this.templateRef = templateRef;
|
|
602
|
+
this.vcRef = vcRef;
|
|
603
|
+
this.context = {
|
|
604
|
+
$implicit: null,
|
|
605
|
+
ngVar: null,
|
|
606
|
+
};
|
|
607
|
+
this.hasView = false;
|
|
608
|
+
}
|
|
609
|
+
Object.defineProperty(VarDirective.prototype, "ngVar", {
|
|
610
|
+
// https://stackoverflow.com/questions/38582293/how-to-declare-a-variable-in-a-template-in-angular
|
|
611
|
+
set: function (context) {
|
|
612
|
+
this.context.$implicit = this.context.ngVar = context;
|
|
613
|
+
if (!this.hasView) {
|
|
614
|
+
this.vcRef.createEmbeddedView(this.templateRef, this.context);
|
|
615
|
+
this.hasView = true;
|
|
616
|
+
}
|
|
617
|
+
},
|
|
618
|
+
enumerable: false,
|
|
619
|
+
configurable: true
|
|
620
|
+
});
|
|
621
|
+
return VarDirective;
|
|
622
|
+
}());
|
|
623
|
+
VarDirective.decorators = [
|
|
624
|
+
{ type: i0.Directive, args: [{
|
|
625
|
+
selector: '[ngVar]',
|
|
626
|
+
},] }
|
|
627
|
+
];
|
|
628
|
+
VarDirective.ctorParameters = function () { return [
|
|
629
|
+
{ type: i0.TemplateRef },
|
|
630
|
+
{ type: i0.ViewContainerRef }
|
|
631
|
+
]; };
|
|
632
|
+
VarDirective.propDecorators = {
|
|
633
|
+
ngVar: [{ type: i0.Input }]
|
|
634
|
+
};
|
|
635
|
+
|
|
636
|
+
var directives = [DebounceKeyupDirective, AbstractDebounceDirective, AutoHideDirective, ZindexToggleDirective, VarDirective];
|
|
600
637
|
var SharedDirectives = /** @class */ (function () {
|
|
601
638
|
function SharedDirectives() {
|
|
602
639
|
}
|
|
@@ -3737,25 +3774,13 @@
|
|
|
3737
3774
|
|
|
3738
3775
|
var SelectedListComponent = /** @class */ (function () {
|
|
3739
3776
|
function SelectedListComponent() {
|
|
3740
|
-
this.
|
|
3777
|
+
this.options = [];
|
|
3741
3778
|
this.enableSelectAll = true;
|
|
3742
3779
|
this.selectedItemsIndex = new i0.EventEmitter();
|
|
3743
3780
|
this.selectedItemsAll = new i0.EventEmitter();
|
|
3744
3781
|
this.unSelectedItemsAll = new i0.EventEmitter();
|
|
3745
3782
|
this.selectedOptionIndex = [];
|
|
3746
|
-
this.switchSelectAll = false;
|
|
3747
3783
|
}
|
|
3748
|
-
Object.defineProperty(SelectedListComponent.prototype, "options", {
|
|
3749
|
-
get: function () {
|
|
3750
|
-
return this._options;
|
|
3751
|
-
},
|
|
3752
|
-
set: function (options) {
|
|
3753
|
-
this._options = options;
|
|
3754
|
-
this.handleSwitchSelectAll();
|
|
3755
|
-
},
|
|
3756
|
-
enumerable: false,
|
|
3757
|
-
configurable: true
|
|
3758
|
-
});
|
|
3759
3784
|
SelectedListComponent.prototype.ngOnInit = function () {
|
|
3760
3785
|
};
|
|
3761
3786
|
SelectedListComponent.prototype.onSelectAll = function () {
|
|
@@ -3763,7 +3788,6 @@
|
|
|
3763
3788
|
option.checked = true;
|
|
3764
3789
|
return index;
|
|
3765
3790
|
});
|
|
3766
|
-
this.switchSelectAll = true;
|
|
3767
3791
|
this.selectedItemsAll.emit(this.selectedOptionIndex);
|
|
3768
3792
|
};
|
|
3769
3793
|
SelectedListComponent.prototype.onUnSelectAll = function () {
|
|
@@ -3771,26 +3795,21 @@
|
|
|
3771
3795
|
option.checked = false;
|
|
3772
3796
|
return index;
|
|
3773
3797
|
});
|
|
3774
|
-
this.switchSelectAll = false;
|
|
3775
3798
|
this.unSelectedItemsAll.emit(this.selectedOptionIndex);
|
|
3776
3799
|
};
|
|
3777
3800
|
SelectedListComponent.prototype.onSelectItem = function (index) {
|
|
3778
3801
|
this.options[index].checked = !this.options[index].checked;
|
|
3779
|
-
this.handleSwitchSelectAll();
|
|
3780
3802
|
this.selectedItemsIndex.emit(index);
|
|
3781
3803
|
};
|
|
3782
3804
|
SelectedListComponent.prototype.areAllOptionsChecked = function () {
|
|
3783
3805
|
return !this.options.some(function (option) { return !option.checked; });
|
|
3784
3806
|
};
|
|
3785
|
-
SelectedListComponent.prototype.handleSwitchSelectAll = function () {
|
|
3786
|
-
this.switchSelectAll = this.areAllOptionsChecked();
|
|
3787
|
-
};
|
|
3788
3807
|
return SelectedListComponent;
|
|
3789
3808
|
}());
|
|
3790
3809
|
SelectedListComponent.decorators = [
|
|
3791
3810
|
{ type: i0.Component, args: [{
|
|
3792
3811
|
selector: 'wac-selected-list',
|
|
3793
|
-
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 && !
|
|
3812
|
+
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 <ng-container *ngVar=\"(options | areAllOptionsSelected) as areAllOptionsSelected\">\n <span *ngIf=\"textSelectAll && !areAllOptionsSelected\" [innerHTML]=\"textSelectAll\" (click)=\"onSelectAll()\"></span>\n <span *ngIf=\"textUnSelectAll && areAllOptionsSelected\" [innerHTML]=\"textUnSelectAll\" (click)=\"onUnSelectAll()\"></span>\n </ng-container>\n\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)=\"onSelectItem(i)\">\n <span [innerHTML]=\"item.label\"></span>\n <i class=\"fas fa-check\"></i>\n </div>\n </div>\n </div>\n</div>\n"
|
|
3794
3813
|
},] }
|
|
3795
3814
|
];
|
|
3796
3815
|
SelectedListComponent.propDecorators = {
|
|
@@ -3936,9 +3955,25 @@
|
|
|
3936
3955
|
},] }
|
|
3937
3956
|
];
|
|
3938
3957
|
|
|
3958
|
+
var AreAllOptionsSelectedPipe = /** @class */ (function () {
|
|
3959
|
+
function AreAllOptionsSelectedPipe() {
|
|
3960
|
+
}
|
|
3961
|
+
AreAllOptionsSelectedPipe.prototype.transform = function (options) {
|
|
3962
|
+
return !options.some(function (option) { return !option.checked; });
|
|
3963
|
+
};
|
|
3964
|
+
return AreAllOptionsSelectedPipe;
|
|
3965
|
+
}());
|
|
3966
|
+
AreAllOptionsSelectedPipe.decorators = [
|
|
3967
|
+
{ type: i0.Pipe, args: [{
|
|
3968
|
+
name: 'areAllOptionsSelected',
|
|
3969
|
+
pure: false
|
|
3970
|
+
},] }
|
|
3971
|
+
];
|
|
3972
|
+
|
|
3939
3973
|
var exportedPipes = [FormatObjectToRecursifTreePipe, FormatObjectToSimpleTreePipe];
|
|
3940
3974
|
var pipes$1 = [
|
|
3941
|
-
SelectFiltersPipe
|
|
3975
|
+
SelectFiltersPipe,
|
|
3976
|
+
AreAllOptionsSelectedPipe
|
|
3942
3977
|
];
|
|
3943
3978
|
var SharedPipes = /** @class */ (function () {
|
|
3944
3979
|
function SharedPipes() {
|
|
@@ -4177,19 +4212,21 @@
|
|
|
4177
4212
|
exports.WzEditInPlaceComponent = WzEditInPlaceComponent;
|
|
4178
4213
|
exports.ZindexToggleDirective = ZindexToggleDirective;
|
|
4179
4214
|
exports.ɵa = DomService;
|
|
4180
|
-
exports.ɵb =
|
|
4181
|
-
exports.ɵc =
|
|
4182
|
-
exports.ɵd =
|
|
4183
|
-
exports.ɵe =
|
|
4184
|
-
exports.ɵf =
|
|
4185
|
-
exports.ɵg =
|
|
4186
|
-
exports.ɵh =
|
|
4187
|
-
exports.ɵi =
|
|
4188
|
-
exports.ɵj =
|
|
4189
|
-
exports.ɵk =
|
|
4190
|
-
exports.ɵl =
|
|
4191
|
-
exports.ɵm =
|
|
4192
|
-
exports.ɵn =
|
|
4215
|
+
exports.ɵb = VarDirective;
|
|
4216
|
+
exports.ɵc = AreAllOptionsSelectedPipe;
|
|
4217
|
+
exports.ɵd = PaginationModule;
|
|
4218
|
+
exports.ɵe = PagniationArrayTotalPages;
|
|
4219
|
+
exports.ɵf = PagniationIsLastPage;
|
|
4220
|
+
exports.ɵg = PagniationText;
|
|
4221
|
+
exports.ɵh = TableModule;
|
|
4222
|
+
exports.ɵi = InputSearchModule;
|
|
4223
|
+
exports.ɵj = InputModule;
|
|
4224
|
+
exports.ɵk = TooltipModule;
|
|
4225
|
+
exports.ɵl = ProgressBarModule;
|
|
4226
|
+
exports.ɵm = LoaderModule;
|
|
4227
|
+
exports.ɵn = CheckboxModule;
|
|
4228
|
+
exports.ɵo = inOutY;
|
|
4229
|
+
exports.ɵp = inOutX;
|
|
4193
4230
|
|
|
4194
4231
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4195
4232
|
|