@wizishop/angular-components 0.0.164 → 0.0.166
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 +2098 -2059
- package/bundles/wizishop-angular-components.umd.js +22 -6
- 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/block-with-checkbox/block-with-checkbox.component.js +14 -5
- package/esm2015/lib/components/mosaic/mosaic.component.js +11 -4
- package/fesm2015/wizishop-angular-components.js +22 -6
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/block-with-checkbox/block-with-checkbox.component.d.ts +4 -0
- package/lib/components/mosaic/mosaic.component.d.ts +5 -1
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.166.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.164.tgz +0 -0
|
@@ -7,13 +7,17 @@ export class BlockWithCheckboxComponent {
|
|
|
7
7
|
this.copyAction = new EventEmitter();
|
|
8
8
|
this.worldAction = new EventEmitter();
|
|
9
9
|
this.checkboxAction = new EventEmitter();
|
|
10
|
+
this.nameRadio = 'wacBlockCheckboxRadio';
|
|
11
|
+
this.isFirst = false;
|
|
10
12
|
}
|
|
11
13
|
ngOnInit() {
|
|
14
|
+
this.randomLabelName = 'radioBlock' + Math.random() * (900 - 700) + 700;
|
|
12
15
|
}
|
|
13
16
|
eventSelected(event) {
|
|
14
|
-
|
|
15
|
-
|
|
17
|
+
console.log(event);
|
|
18
|
+
this.selected = event.target.checked;
|
|
16
19
|
this.checkboxAction.emit(this.selected);
|
|
20
|
+
this.isFirst = false;
|
|
17
21
|
}
|
|
18
22
|
eventCopy() {
|
|
19
23
|
this.copyAction.emit(true);
|
|
@@ -21,11 +25,14 @@ export class BlockWithCheckboxComponent {
|
|
|
21
25
|
eventWorld() {
|
|
22
26
|
this.worldAction.emit(true);
|
|
23
27
|
}
|
|
28
|
+
removeFirstClass() {
|
|
29
|
+
document.querySelectorAll('.firstWacRadioBLock')[0].classList.remove('firstWacRadioBLock');
|
|
30
|
+
}
|
|
24
31
|
}
|
|
25
32
|
BlockWithCheckboxComponent.decorators = [
|
|
26
33
|
{ type: Component, args: [{
|
|
27
34
|
selector: 'wac-block-with-checkbox',
|
|
28
|
-
template: "<div class=\"block-with-checkbox\">\n <div class=\"block-with-checkbox__left\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input type=\"
|
|
35
|
+
template: "<div class=\"block-with-checkbox\" [ngClass]=\"{'selected': inputRadioA.checked, 'firstWacRadioBLock': isFirst}\" (mouseover)=\"removeFirstClass()\">\n <div class=\"block-with-checkbox__left\" (click)=\"inputRadioA.click()\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input #inputRadioA [name]=\"nameRadio\" type=\"radio\" [value]=\"selected\" (change)=\"eventSelected($event)\" [id]=\"randomLabelName\">\n <label [for]=\"randomLabelName\"></label>\n </div>\n </div>\n </div>\n <div class=\"block-with-checkbox__center\" (click)=\"inputRadioA.click()\">\n <ng-content></ng-content>\n </div>\n <div class=\"block-with-checkbox__right\">\n <div><wac-button extraClasses=\"is-blue opacity static-width\" [iconFontSize]=\"18\" [icon]=\"iconCopy\" (click)=\"eventCopy()\"></wac-button></div>\n <div><wac-button extraClasses=\"is-green opacity static-width\" [iconFontSize]=\"18\" [icon]=\"iconWorld\" (click)=\"eventWorld()\"></wac-button></div>\n </div>\n</div>\n"
|
|
29
36
|
},] }
|
|
30
37
|
];
|
|
31
38
|
BlockWithCheckboxComponent.ctorParameters = () => [];
|
|
@@ -35,6 +42,8 @@ BlockWithCheckboxComponent.propDecorators = {
|
|
|
35
42
|
iconWorld: [{ type: Input }],
|
|
36
43
|
copyAction: [{ type: Output }],
|
|
37
44
|
worldAction: [{ type: Output }],
|
|
38
|
-
checkboxAction: [{ type: Output }]
|
|
45
|
+
checkboxAction: [{ type: Output }],
|
|
46
|
+
nameRadio: [{ type: Input }],
|
|
47
|
+
isFirst: [{ type: Input }]
|
|
39
48
|
};
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
49
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmxvY2std2l0aC1jaGVja2JveC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hbmd1bGFyLWNvbXBvbmVudHMvc3JjL2xpYi9jb21wb25lbnRzL2Jsb2NrLXdpdGgtY2hlY2tib3gvYmxvY2std2l0aC1jaGVja2JveC5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBQyxNQUFNLGVBQWUsQ0FBQztBQU03RSxNQUFNLE9BQU8sMEJBQTBCO0lBNEJyQztRQXpCQSxhQUFRLEdBQUcsS0FBSyxDQUFDO1FBR2pCLGFBQVEsR0FBRyxrQkFBa0IsQ0FBQztRQUc5QixjQUFTLEdBQUcsa0JBQWtCLENBQUM7UUFHL0IsZUFBVSxHQUFHLElBQUksWUFBWSxFQUFXLENBQUM7UUFHekMsZ0JBQVcsR0FBRyxJQUFJLFlBQVksRUFBVyxDQUFDO1FBRzFDLG1CQUFjLEdBQUcsSUFBSSxZQUFZLEVBQVcsQ0FBQztRQUs3QyxjQUFTLEdBQUcsdUJBQXVCLENBQUM7UUFHcEMsWUFBTyxHQUFHLEtBQUssQ0FBQztJQUVBLENBQUM7SUFFakIsUUFBUTtRQUNOLElBQUksQ0FBQyxlQUFlLEdBQUcsWUFBWSxHQUFHLElBQUksQ0FBQyxNQUFNLEVBQUUsR0FBRyxDQUFDLEdBQUcsR0FBRyxHQUFHLENBQUMsR0FBRyxH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3hBY3Rpb24uZW1pdCh0aGlzLnNlbGVjdGVkKTtcbiAgICB0aGlzLmlzRmlyc3QgPSBmYWxzZTtcbiAgfVxuXG4gIGV2ZW50Q29weSgpIHtcbiAgICB0aGlzLmNvcHlBY3Rpb24uZW1pdCh0cnVlKTtcbiAgfVxuXG4gIGV2ZW50V29ybGQoKSB7XG4gICAgdGhpcy53b3JsZEFjdGlvbi5lbWl0KHRydWUpO1xuICB9XG5cbiAgcmVtb3ZlRmlyc3RDbGFzcygpIHtcbiAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuZmlyc3RXYWNSYWRpb0JMb2NrJylbMF0uY2xhc3NMaXN0LnJlbW92ZSgnZmlyc3RXYWNSYWRpb0JMb2NrJyk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
1
|
+
import { Component, EventEmitter, Input, Output } from '@angular/core';
|
|
2
2
|
export class MosaicComponent {
|
|
3
3
|
constructor() {
|
|
4
4
|
this.isLoading = true;
|
|
5
|
+
this.import = new EventEmitter();
|
|
5
6
|
}
|
|
6
7
|
ngOnInit() {
|
|
7
8
|
if (this.items) {
|
|
@@ -12,6 +13,9 @@ export class MosaicComponent {
|
|
|
12
13
|
}
|
|
13
14
|
this.isLoading = false;
|
|
14
15
|
}
|
|
16
|
+
emitIndex(index) {
|
|
17
|
+
this.import.emit(index);
|
|
18
|
+
}
|
|
15
19
|
sliceIntoChunks(arr, chunkSize) {
|
|
16
20
|
const res = [];
|
|
17
21
|
for (let i = 0; i < arr.length; i += chunkSize) {
|
|
@@ -24,11 +28,14 @@ export class MosaicComponent {
|
|
|
24
28
|
MosaicComponent.decorators = [
|
|
25
29
|
{ type: Component, args: [{
|
|
26
30
|
selector: 'wac-mosaic',
|
|
27
|
-
template: "<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n<div class=\"wac-mosaic\" *ngIf=\"!isLoading\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnLeft\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnLeft; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnCenter\" >\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnCenter; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnRight\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnRight; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n </div>\n</div>\n"
|
|
31
|
+
template: "<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n<div class=\"wac-mosaic\" *ngIf=\"!isLoading\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnLeft\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnLeft; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i)\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnCenter\" >\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnCenter; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i + this.columnLeft.length)\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnRight\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnRight; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i + this.columnLeft.length + this.columnCenter.length)\"></wac-button>\n </div>\n </div>\n </div>\n </div>\n</div>\n"
|
|
28
32
|
},] }
|
|
29
33
|
];
|
|
30
34
|
MosaicComponent.ctorParameters = () => [];
|
|
31
35
|
MosaicComponent.propDecorators = {
|
|
32
|
-
items: [{ type: Input }]
|
|
36
|
+
items: [{ type: Input }],
|
|
37
|
+
labelButtons: [{ type: Input }],
|
|
38
|
+
iconButtons: [{ type: Input }],
|
|
39
|
+
import: [{ type: Output }]
|
|
33
40
|
};
|
|
34
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
41
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9zYWljLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FuZ3VsYXItY29tcG9uZW50cy9zcmMvbGliL2NvbXBvbmVudHMvbW9zYWljL21vc2FpYy5jb21wb25lbnQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFDLFNBQVMsRUFBRSxZQUFZLEVBQUUsS0FBSyxFQUFVLE1BQU0sRUFBQyxNQUFNLGVBQWUsQ0FBQztBQU03RSxNQUFNLE9BQU8sZUFBZTtJQW9CMUI7UUFmQSxjQUFTLEdBQUcsSUFBSSxDQUFDO1FBU2pCLFdBQU0sR0FBRyxJQUFJLFlBQVksRUFBTyxDQUFDO0lBTWpCLENBQUM7SUFFakIsUUFBUTtRQUNOLElBQUksSUFBSSxDQUFDLEtBQUssRUFBRTtZQUNkLE1BQU0sVUFBVSxHQUFHLElBQUksQ0FBQyxlQUFlLENBQUMsSUFBSSxDQUFDLEtBQUssRUFBRSxDQUFDLElBQUksQ0FBQyxLQUFLLENBQU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bmtzKGFyciwgY2h1bmtTaXplKSB7XG4gICAgY29uc3QgcmVzID0gW107XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnIubGVuZ3RoOyBpICs9IGNodW5rU2l6ZSkge1xuICAgICAgY29uc3QgY2h1bmsgPSBhcnIuc2xpY2UoaSwgaSArIGNodW5rU2l6ZSk7XG4gICAgICByZXMucHVzaChjaHVuayk7XG4gICAgfVxuICAgIHJldHVybiByZXM7XG4gIH1cblxufVxuIl19
|
|
@@ -3784,13 +3784,17 @@ class BlockWithCheckboxComponent {
|
|
|
3784
3784
|
this.copyAction = new EventEmitter();
|
|
3785
3785
|
this.worldAction = new EventEmitter();
|
|
3786
3786
|
this.checkboxAction = new EventEmitter();
|
|
3787
|
+
this.nameRadio = 'wacBlockCheckboxRadio';
|
|
3788
|
+
this.isFirst = false;
|
|
3787
3789
|
}
|
|
3788
3790
|
ngOnInit() {
|
|
3791
|
+
this.randomLabelName = 'radioBlock' + Math.random() * (900 - 700) + 700;
|
|
3789
3792
|
}
|
|
3790
3793
|
eventSelected(event) {
|
|
3791
|
-
|
|
3792
|
-
|
|
3794
|
+
console.log(event);
|
|
3795
|
+
this.selected = event.target.checked;
|
|
3793
3796
|
this.checkboxAction.emit(this.selected);
|
|
3797
|
+
this.isFirst = false;
|
|
3794
3798
|
}
|
|
3795
3799
|
eventCopy() {
|
|
3796
3800
|
this.copyAction.emit(true);
|
|
@@ -3798,11 +3802,14 @@ class BlockWithCheckboxComponent {
|
|
|
3798
3802
|
eventWorld() {
|
|
3799
3803
|
this.worldAction.emit(true);
|
|
3800
3804
|
}
|
|
3805
|
+
removeFirstClass() {
|
|
3806
|
+
document.querySelectorAll('.firstWacRadioBLock')[0].classList.remove('firstWacRadioBLock');
|
|
3807
|
+
}
|
|
3801
3808
|
}
|
|
3802
3809
|
BlockWithCheckboxComponent.decorators = [
|
|
3803
3810
|
{ type: Component, args: [{
|
|
3804
3811
|
selector: 'wac-block-with-checkbox',
|
|
3805
|
-
template: "<div class=\"block-with-checkbox\">\n <div class=\"block-with-checkbox__left\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input type=\"
|
|
3812
|
+
template: "<div class=\"block-with-checkbox\" [ngClass]=\"{'selected': inputRadioA.checked, 'firstWacRadioBLock': isFirst}\" (mouseover)=\"removeFirstClass()\">\n <div class=\"block-with-checkbox__left\" (click)=\"inputRadioA.click()\">\n <div class=\"wac-radio-block\">\n <div class=\"wac-radio__row\">\n <input #inputRadioA [name]=\"nameRadio\" type=\"radio\" [value]=\"selected\" (change)=\"eventSelected($event)\" [id]=\"randomLabelName\">\n <label [for]=\"randomLabelName\"></label>\n </div>\n </div>\n </div>\n <div class=\"block-with-checkbox__center\" (click)=\"inputRadioA.click()\">\n <ng-content></ng-content>\n </div>\n <div class=\"block-with-checkbox__right\">\n <div><wac-button extraClasses=\"is-blue opacity static-width\" [iconFontSize]=\"18\" [icon]=\"iconCopy\" (click)=\"eventCopy()\"></wac-button></div>\n <div><wac-button extraClasses=\"is-green opacity static-width\" [iconFontSize]=\"18\" [icon]=\"iconWorld\" (click)=\"eventWorld()\"></wac-button></div>\n </div>\n</div>\n"
|
|
3806
3813
|
},] }
|
|
3807
3814
|
];
|
|
3808
3815
|
BlockWithCheckboxComponent.ctorParameters = () => [];
|
|
@@ -3812,7 +3819,9 @@ BlockWithCheckboxComponent.propDecorators = {
|
|
|
3812
3819
|
iconWorld: [{ type: Input }],
|
|
3813
3820
|
copyAction: [{ type: Output }],
|
|
3814
3821
|
worldAction: [{ type: Output }],
|
|
3815
|
-
checkboxAction: [{ type: Output }]
|
|
3822
|
+
checkboxAction: [{ type: Output }],
|
|
3823
|
+
nameRadio: [{ type: Input }],
|
|
3824
|
+
isFirst: [{ type: Input }]
|
|
3816
3825
|
};
|
|
3817
3826
|
|
|
3818
3827
|
class ConfirmDeleteComponent {
|
|
@@ -3853,6 +3862,7 @@ ConfirmDeleteComponent.propDecorators = {
|
|
|
3853
3862
|
class MosaicComponent {
|
|
3854
3863
|
constructor() {
|
|
3855
3864
|
this.isLoading = true;
|
|
3865
|
+
this.import = new EventEmitter();
|
|
3856
3866
|
}
|
|
3857
3867
|
ngOnInit() {
|
|
3858
3868
|
if (this.items) {
|
|
@@ -3863,6 +3873,9 @@ class MosaicComponent {
|
|
|
3863
3873
|
}
|
|
3864
3874
|
this.isLoading = false;
|
|
3865
3875
|
}
|
|
3876
|
+
emitIndex(index) {
|
|
3877
|
+
this.import.emit(index);
|
|
3878
|
+
}
|
|
3866
3879
|
sliceIntoChunks(arr, chunkSize) {
|
|
3867
3880
|
const res = [];
|
|
3868
3881
|
for (let i = 0; i < arr.length; i += chunkSize) {
|
|
@@ -3875,12 +3888,15 @@ class MosaicComponent {
|
|
|
3875
3888
|
MosaicComponent.decorators = [
|
|
3876
3889
|
{ type: Component, args: [{
|
|
3877
3890
|
selector: 'wac-mosaic',
|
|
3878
|
-
template: "<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n<div class=\"wac-mosaic\" *ngIf=\"!isLoading\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnLeft\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnLeft; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnCenter\" >\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnCenter; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnRight\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnRight; let i = index;\">\n <img [src]=\"img\" />\n </div>\n </div>\n </div>\n</div>\n"
|
|
3891
|
+
template: "<div class=\"wac-mosaic__loader\" *ngIf=\"isLoading\">\n <wac-loader></wac-loader>\n</div>\n<div class=\"wac-mosaic\" *ngIf=\"!isLoading\">\n <div class=\"wac-mosaic__wrapper\">\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnLeft\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnLeft; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i)\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnCenter\" >\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnCenter; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i + this.columnLeft.length)\"></wac-button>\n </div>\n </div>\n </div>\n <div class=\"wac-mosaic__wrapper__column\" *ngIf=\"columnRight\">\n <div class=\"wac-mosaic__wrapper__column__item\" *ngFor=\"let img of columnRight; let i = index;\">\n <img [src]=\"img\" />\n <div class=\"hover\">\n <wac-button [icon]=\"iconButtons\" [label]=\"labelButtons\" [extraClasses]=\"'is-success'\" (click)=\"emitIndex(i + this.columnLeft.length + this.columnCenter.length)\"></wac-button>\n </div>\n </div>\n </div>\n </div>\n</div>\n"
|
|
3879
3892
|
},] }
|
|
3880
3893
|
];
|
|
3881
3894
|
MosaicComponent.ctorParameters = () => [];
|
|
3882
3895
|
MosaicComponent.propDecorators = {
|
|
3883
|
-
items: [{ type: Input }]
|
|
3896
|
+
items: [{ type: Input }],
|
|
3897
|
+
labelButtons: [{ type: Input }],
|
|
3898
|
+
iconButtons: [{ type: Input }],
|
|
3899
|
+
import: [{ type: Output }]
|
|
3884
3900
|
};
|
|
3885
3901
|
|
|
3886
3902
|
const components = [
|