@wizishop/angular-components 0.0.56 → 0.0.60
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 +114 -0
- package/bundles/wizishop-angular-components.umd.js +42 -5
- 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/button/button.component.js +39 -4
- package/esm2015/lib/components/tag/tag.component.js +5 -3
- package/fesm2015/wizishop-angular-components.js +42 -5
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/button/button.component.d.ts +12 -2
- package/lib/components/tag/tag.component.d.ts +1 -0
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.60.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.56.tgz +0 -0
package/angular-components.scss
CHANGED
|
@@ -2229,6 +2229,18 @@ $wac-color-success-popup-alert: #6DCC95!default;
|
|
|
2229
2229
|
font-weight: 500;
|
|
2230
2230
|
transition: 0.3s ease;
|
|
2231
2231
|
|
|
2232
|
+
&.big {
|
|
2233
|
+
padding: rem(11) rem(15);
|
|
2234
|
+
font-size: rem(14);
|
|
2235
|
+
font-weight: 500;
|
|
2236
|
+
&.wac-tag--default {
|
|
2237
|
+
i {
|
|
2238
|
+
color: $wac-second-color;
|
|
2239
|
+
font-size: rem(14);
|
|
2240
|
+
}
|
|
2241
|
+
}
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2232
2244
|
&.hover {
|
|
2233
2245
|
cursor: pointer;
|
|
2234
2246
|
}
|
|
@@ -3179,6 +3191,75 @@ span.wac-tooltip {
|
|
|
3179
3191
|
}
|
|
3180
3192
|
}
|
|
3181
3193
|
|
|
3194
|
+
&.deletePosition-center .wac-button__confirmDelete {
|
|
3195
|
+
left: 50%;
|
|
3196
|
+
transform: translateX(-50%) translateY(-1px);
|
|
3197
|
+
}
|
|
3198
|
+
|
|
3199
|
+
&.deletePosition-right .wac-button__confirmDelete {
|
|
3200
|
+
right: 0;
|
|
3201
|
+
transform: translateY(-1px);
|
|
3202
|
+
}
|
|
3203
|
+
|
|
3204
|
+
&.deletePosition-left .wac-button__confirmDelete {
|
|
3205
|
+
left: 0;
|
|
3206
|
+
transform: translateY(-1px);
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
&__confirmDelete {
|
|
3210
|
+
overflow: hidden;
|
|
3211
|
+
max-width: 0;
|
|
3212
|
+
height: 40px;
|
|
3213
|
+
position: absolute;
|
|
3214
|
+
top: 0;
|
|
3215
|
+
z-index: 2;
|
|
3216
|
+
transition: .3s ease!important;
|
|
3217
|
+
border-radius: 3px;
|
|
3218
|
+
|
|
3219
|
+
|
|
3220
|
+
.is-success & {
|
|
3221
|
+
background-color: $wac-green-color;
|
|
3222
|
+
&:hover, &:focus {
|
|
3223
|
+
background-color: darken($wac-green-color, 15%);
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
.is-danger & {
|
|
3227
|
+
background-color: $wac-primary-button;
|
|
3228
|
+
&:hover, &:focus {
|
|
3229
|
+
background-color: darken($wac-primary-button, 15%);
|
|
3230
|
+
}
|
|
3231
|
+
}
|
|
3232
|
+
&__text {
|
|
3233
|
+
position: absolute;
|
|
3234
|
+
top: 0;
|
|
3235
|
+
left: 50%;
|
|
3236
|
+
transform: translateX(-50%);
|
|
3237
|
+
width: auto;
|
|
3238
|
+
white-space: nowrap;
|
|
3239
|
+
height: rem(40);
|
|
3240
|
+
line-height: rem(40);
|
|
3241
|
+
color: $wac-white !important;
|
|
3242
|
+
padding: 0 20px;
|
|
3243
|
+
font-size: rem(14);
|
|
3244
|
+
opacity: 0;
|
|
3245
|
+
transition: .3s ease;
|
|
3246
|
+
}
|
|
3247
|
+
}
|
|
3248
|
+
|
|
3249
|
+
&.step-delete {
|
|
3250
|
+
i {
|
|
3251
|
+
transition: .3s ease!important;
|
|
3252
|
+
opacity: 0!important;
|
|
3253
|
+
}
|
|
3254
|
+
.wac-button__confirmDelete {
|
|
3255
|
+
transition: .6s ease .3s!important;
|
|
3256
|
+
&__text {
|
|
3257
|
+
opacity: 1;
|
|
3258
|
+
transition: .3s ease .9s;
|
|
3259
|
+
}
|
|
3260
|
+
}
|
|
3261
|
+
}
|
|
3262
|
+
|
|
3182
3263
|
&.alone {
|
|
3183
3264
|
padding: 7px 14.6px;
|
|
3184
3265
|
|
|
@@ -3663,6 +3744,39 @@ span.wac-tooltip {
|
|
|
3663
3744
|
left: 14.6px;
|
|
3664
3745
|
}
|
|
3665
3746
|
}
|
|
3747
|
+
|
|
3748
|
+
&.opacity {
|
|
3749
|
+
min-width: rem(40);
|
|
3750
|
+
min-height: rem(40);
|
|
3751
|
+
|
|
3752
|
+
&.alone {
|
|
3753
|
+
display: flex;
|
|
3754
|
+
align-items: center;
|
|
3755
|
+
justify-content: center;
|
|
3756
|
+
}
|
|
3757
|
+
|
|
3758
|
+
&.is-success {
|
|
3759
|
+
i {
|
|
3760
|
+
color: $wac-green-color!important;
|
|
3761
|
+
}
|
|
3762
|
+
&:hover, &:focus {
|
|
3763
|
+
i {
|
|
3764
|
+
color: $wac-white!important;
|
|
3765
|
+
}
|
|
3766
|
+
}
|
|
3767
|
+
}
|
|
3768
|
+
|
|
3769
|
+
&.is-danger {
|
|
3770
|
+
i {
|
|
3771
|
+
color: $wac-primary-button!important;
|
|
3772
|
+
}
|
|
3773
|
+
&:hover, &:focus {
|
|
3774
|
+
i {
|
|
3775
|
+
color: $wac-white!important;
|
|
3776
|
+
}
|
|
3777
|
+
}
|
|
3778
|
+
}
|
|
3779
|
+
}
|
|
3666
3780
|
}
|
|
3667
3781
|
.wac-wrapper-blocs {
|
|
3668
3782
|
&.sidebar {
|
|
@@ -848,6 +848,7 @@
|
|
|
848
848
|
this.label = '';
|
|
849
849
|
this.hasClose = false;
|
|
850
850
|
this.isOpen = true;
|
|
851
|
+
this.big = false;
|
|
851
852
|
}
|
|
852
853
|
TagComponent.prototype.closeTag = function () {
|
|
853
854
|
if (this.hasClose) {
|
|
@@ -859,14 +860,15 @@
|
|
|
859
860
|
TagComponent.decorators = [
|
|
860
861
|
{ type: i0.Component, args: [{
|
|
861
862
|
selector: 'wac-tag',
|
|
862
|
-
template: "<div class=\"wac-tag\" [classList]=\"'wac-tag--' + class\" [ngClass]=\"{ hover: hasClose }\" *ngIf=\"isOpen\" (click)=\"closeTag()\">\n {{ label }}\n <span *ngIf=\"hasClose\"><i class=\"fas fa-times\"></i></span>\n</div>\n"
|
|
863
|
+
template: "<div class=\"wac-tag\" [classList]=\"'wac-tag--' + class\" [ngClass]=\"{ hover: hasClose, 'big': big }\" *ngIf=\"isOpen\" (click)=\"closeTag()\">\n {{ label }}\n <span *ngIf=\"hasClose\"><i class=\"fas fa-times\"></i></span>\n</div>\n"
|
|
863
864
|
},] }
|
|
864
865
|
];
|
|
865
866
|
TagComponent.ctorParameters = function () { return []; };
|
|
866
867
|
TagComponent.propDecorators = {
|
|
867
868
|
label: [{ type: i0.Input }],
|
|
868
869
|
class: [{ type: i0.Input }],
|
|
869
|
-
hasClose: [{ type: i0.Input }]
|
|
870
|
+
hasClose: [{ type: i0.Input }],
|
|
871
|
+
big: [{ type: i0.Input }]
|
|
870
872
|
};
|
|
871
873
|
|
|
872
874
|
var TabComponent = /** @class */ (function () {
|
|
@@ -912,13 +914,24 @@
|
|
|
912
914
|
this.animation = false;
|
|
913
915
|
this.animationRight = false;
|
|
914
916
|
this.animationText = '';
|
|
917
|
+
this.confirmDelete = false;
|
|
918
|
+
this.confirmDeleteText = '';
|
|
919
|
+
this.confirmDeletePosition = 'right';
|
|
915
920
|
this.click = new i0.EventEmitter();
|
|
916
921
|
this.isLoading = false;
|
|
917
922
|
this.interval = null;
|
|
923
|
+
this.waitForConfirmDelete = false;
|
|
918
924
|
this.buttonMaxWidth = '0px';
|
|
919
925
|
this.buttonWidth = '0px';
|
|
926
|
+
this.buttonMaxWidthDelete = '0px';
|
|
927
|
+
this.buttonWidthDelete = '0px';
|
|
920
928
|
this.currentLoading = 0;
|
|
921
929
|
}
|
|
930
|
+
ButtonComponent.prototype.ngOnInit = function () {
|
|
931
|
+
if (this.confirmDelete) {
|
|
932
|
+
this.waitForConfirmDelete = true;
|
|
933
|
+
}
|
|
934
|
+
};
|
|
922
935
|
ButtonComponent.prototype.launchLoading = function () {
|
|
923
936
|
var _this = this;
|
|
924
937
|
if (this.isLoading || this.interval !== null) {
|
|
@@ -945,13 +958,29 @@
|
|
|
945
958
|
ButtonComponent.prototype.resetMaxWidth = function () {
|
|
946
959
|
this.buttonMaxWidth = '0px';
|
|
947
960
|
};
|
|
961
|
+
ButtonComponent.prototype.addMaxWidthDelete = function () {
|
|
962
|
+
this.buttonMaxWidthDelete = this.buttonWidthDelete + 'px';
|
|
963
|
+
console.log('here', this.buttonMaxWidthDelete);
|
|
964
|
+
};
|
|
965
|
+
ButtonComponent.prototype.resetMaxWidthDelete = function () {
|
|
966
|
+
this.buttonMaxWidthDelete = '0px';
|
|
967
|
+
this.waitForConfirmDelete = true;
|
|
968
|
+
};
|
|
948
969
|
ButtonComponent.prototype.onButtonClick = function (event) {
|
|
949
970
|
event.stopPropagation();
|
|
950
971
|
if (!this.disabled) {
|
|
951
972
|
if (this.hasLoader) {
|
|
952
973
|
this.launchLoading();
|
|
953
974
|
}
|
|
954
|
-
this.
|
|
975
|
+
if (!this.waitForConfirmDelete) {
|
|
976
|
+
this.click.emit(event);
|
|
977
|
+
if (this.confirmDelete) {
|
|
978
|
+
this.resetMaxWidthDelete();
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
else {
|
|
982
|
+
this.waitForConfirmDelete = false;
|
|
983
|
+
}
|
|
955
984
|
}
|
|
956
985
|
};
|
|
957
986
|
ButtonComponent.prototype.ngAfterViewInit = function () {
|
|
@@ -960,6 +989,10 @@
|
|
|
960
989
|
if (_this.animation) {
|
|
961
990
|
_this.buttonWidth = _this.calculWidth.nativeElement.offsetWidth;
|
|
962
991
|
}
|
|
992
|
+
if (_this.confirmDelete) {
|
|
993
|
+
_this.buttonWidthDelete = _this.calculWidthDelete.nativeElement.offsetWidth;
|
|
994
|
+
console.log('here2', _this.buttonWidthDelete);
|
|
995
|
+
}
|
|
963
996
|
}, 1000);
|
|
964
997
|
};
|
|
965
998
|
return ButtonComponent;
|
|
@@ -967,7 +1000,7 @@
|
|
|
967
1000
|
ButtonComponent.decorators = [
|
|
968
1001
|
{ type: i0.Component, args: [{
|
|
969
1002
|
selector: 'wac-button',
|
|
970
|
-
template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"onButtonClick($event)
|
|
1003
|
+
template: "<a\n [class]=\"'wac-button ' + extraClasses\"\n (click)=\"confirmDelete && waitForConfirmDelete ? addMaxWidthDelete() : '';onButtonClick($event);\"\n (mouseleave)=\"animation ? resetMaxWidth() : '';\"\n (mouseenter)=\"animation ? addMaxWidth() : '';\"\n wzAutoHide (clickOutside)=\"confirmDelete && !waitForConfirmDelete ? resetMaxWidthDelete() : ''\"\n [ngClass]=\"[label === '' ? 'alone' : '',animationRight ? 'animation-right' : '', animation ? 'animationText' : '', isLoading ? 'is-loading' : '', opacity ? 'opacity' : '', disabled ? 'disabled' : '', widthAuto ? 'width-auto' : '', whiteSpaceNowrap ? 'white-space-no-wrap' : '', !waitForConfirmDelete && confirmDelete ? 'step-delete' : '', confirmDelete ? 'deletePosition-' + confirmDeletePosition : '']\"\n>\n <span class=\"wac-button__wrapper\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n <span class=\"wac-button__animation\" [style.maxWidth]=\"buttonMaxWidth\" [style.width]=\"buttonWidth + 'px'\">\n <span #calculWidth class=\"wac-button__animation__text\" [innerHTML]=\"animationText\"></span>\n </span>\n <span class=\"wac-button__confirmDelete\" [style.maxWidth]=\"buttonMaxWidthDelete\" [style.width]=\"buttonWidthDelete + 'px'\">\n <span #calculWidthDelete class=\"wac-button__confirmDelete__text\" [innerHTML]=\"confirmDeleteText\"></span>\n </span>\n <span\n class=\"wac-button__loader\"\n [ngClass]=\"extraClasses.includes('is-outlined') ? 'outlined' : ''\"\n *ngIf=\"isLoading || interval !== null\"\n [style.width]=\"currentLoading + '%'\"\n >\n <span *ngIf=\"extraClasses.includes('is-outlined')\">\n <i *ngIf=\"icon !== ''\" [ngClass]=\"icon\" [style.font-size.px]=\"iconFontSize\"></i>\n {{ label }}\n <i *ngIf=\"iconNext !== ''\" [ngClass]=\"iconNext\" [style.font-size.px]=\"iconFontSize\"></i>\n </span>\n\n </span>\n</a>\n"
|
|
971
1004
|
},] }
|
|
972
1005
|
];
|
|
973
1006
|
ButtonComponent.ctorParameters = function () { return []; };
|
|
@@ -985,8 +1018,12 @@
|
|
|
985
1018
|
animation: [{ type: i0.Input }],
|
|
986
1019
|
animationRight: [{ type: i0.Input }],
|
|
987
1020
|
animationText: [{ type: i0.Input }],
|
|
1021
|
+
confirmDelete: [{ type: i0.Input }],
|
|
1022
|
+
confirmDeleteText: [{ type: i0.Input }],
|
|
1023
|
+
confirmDeletePosition: [{ type: i0.Input }],
|
|
988
1024
|
click: [{ type: i0.Output }],
|
|
989
|
-
calculWidth: [{ type: i0.ViewChild, args: ['calculWidth',] }]
|
|
1025
|
+
calculWidth: [{ type: i0.ViewChild, args: ['calculWidth',] }],
|
|
1026
|
+
calculWidthDelete: [{ type: i0.ViewChild, args: ['calculWidthDelete',] }]
|
|
990
1027
|
};
|
|
991
1028
|
|
|
992
1029
|
var InfoComponent = /** @class */ (function () {
|