@wizishop/angular-components 0.0.182 → 0.0.186
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 +78 -1
- package/bundles/wizishop-angular-components.umd.js +45 -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/block-with-checkbox/block-with-checkbox.component.js +2 -2
- package/esm2015/lib/components/content-with-buttons/content-with-buttons.component.js +43 -5
- package/esm2015/lib/components/header-page/header-page.component.js +2 -2
- package/esm2015/lib/components/link/link.component.js +4 -2
- package/fesm2015/wizishop-angular-components.js +46 -6
- package/fesm2015/wizishop-angular-components.js.map +1 -1
- package/lib/components/content-with-buttons/content-with-buttons.component.d.ts +19 -3
- package/lib/components/link/link.component.d.ts +1 -0
- package/package.json +1 -1
- package/wizishop-angular-components-0.0.186.tgz +0 -0
- package/wizishop-angular-components.metadata.json +1 -1
- package/wizishop-angular-components-0.0.182.tgz +0 -0
package/angular-components.scss
CHANGED
|
@@ -2170,6 +2170,51 @@ $wac-subtitle-color: #7A87A1!default;
|
|
|
2170
2170
|
}
|
|
2171
2171
|
}
|
|
2172
2172
|
}
|
|
2173
|
+
.wac-content-with-buttons {
|
|
2174
|
+
display: flex;
|
|
2175
|
+
align-items: center;
|
|
2176
|
+
width: 100%;
|
|
2177
|
+
@include media('<tablet') {
|
|
2178
|
+
flex-direction: column;
|
|
2179
|
+
justify-content: flex-start;
|
|
2180
|
+
align-items: flex-start;
|
|
2181
|
+
}
|
|
2182
|
+
&__text {
|
|
2183
|
+
width: 100%;
|
|
2184
|
+
&__count {
|
|
2185
|
+
margin: 10px 0 0;
|
|
2186
|
+
width: 100%;
|
|
2187
|
+
display: flex;
|
|
2188
|
+
align-items: flex-end;
|
|
2189
|
+
justify-content: flex-start;
|
|
2190
|
+
> span {
|
|
2191
|
+
&:first-child {
|
|
2192
|
+
font-size: rem(12);
|
|
2193
|
+
font-style: italic;
|
|
2194
|
+
color: $wac-color-text-grey;
|
|
2195
|
+
line-height: rem(16);
|
|
2196
|
+
display: inline-block;
|
|
2197
|
+
transform: translateY(-3px);
|
|
2198
|
+
}
|
|
2199
|
+
&:last-child {
|
|
2200
|
+
display: inline-block;
|
|
2201
|
+
margin: 0 0 0 20px;
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
&__cta {
|
|
2207
|
+
display: flex;
|
|
2208
|
+
align-items: center;
|
|
2209
|
+
width: auto;
|
|
2210
|
+
> div {
|
|
2211
|
+
margin: 0 0 0 20px;
|
|
2212
|
+
}
|
|
2213
|
+
@include media('<tablet') {
|
|
2214
|
+
margin: 15px 0 0;
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
}
|
|
2173
2218
|
|
|
2174
2219
|
.wac-switch {
|
|
2175
2220
|
input {
|
|
@@ -2743,6 +2788,7 @@ $wac-subtitle-color: #7A87A1!default;
|
|
|
2743
2788
|
&__left {
|
|
2744
2789
|
width: auto;
|
|
2745
2790
|
display: flex;
|
|
2791
|
+
flex-wrap: wrap;
|
|
2746
2792
|
align-items: center;
|
|
2747
2793
|
align-content: center;
|
|
2748
2794
|
margin: 0 10px 0 0;
|
|
@@ -2784,6 +2830,31 @@ $wac-subtitle-color: #7A87A1!default;
|
|
|
2784
2830
|
}
|
|
2785
2831
|
}
|
|
2786
2832
|
}
|
|
2833
|
+
&__nowrap {
|
|
2834
|
+
width: 100%;
|
|
2835
|
+
display: flex;
|
|
2836
|
+
align-items: center;
|
|
2837
|
+
.center & {
|
|
2838
|
+
justify-content: center;
|
|
2839
|
+
}
|
|
2840
|
+
}
|
|
2841
|
+
.subtitle {
|
|
2842
|
+
padding: 0 0 0 60px;
|
|
2843
|
+
.center & {
|
|
2844
|
+
padding: 0;
|
|
2845
|
+
display: flex;
|
|
2846
|
+
justify-content: center;
|
|
2847
|
+
}
|
|
2848
|
+
&:empty {
|
|
2849
|
+
display: none;
|
|
2850
|
+
}
|
|
2851
|
+
&:not(:empty) {
|
|
2852
|
+
margin: 12px 0 0;
|
|
2853
|
+
}
|
|
2854
|
+
}
|
|
2855
|
+
> *:not(a) {
|
|
2856
|
+
width: 100%;
|
|
2857
|
+
}
|
|
2787
2858
|
}
|
|
2788
2859
|
&__right {
|
|
2789
2860
|
width: 100%;
|
|
@@ -3723,7 +3794,7 @@ span.wac-tooltip {
|
|
|
3723
3794
|
border: 2px solid transparent;
|
|
3724
3795
|
transition: .3s ease;
|
|
3725
3796
|
opacity: .45;
|
|
3726
|
-
&.selected
|
|
3797
|
+
&.selected, &:not(.disabled):hover, &:not(.disabled):focus {
|
|
3727
3798
|
border-color: $wac-input-active-color;
|
|
3728
3799
|
opacity: 1!important;
|
|
3729
3800
|
}
|
|
@@ -3943,6 +4014,12 @@ span.wac-tooltip {
|
|
|
3943
4014
|
font-style: italic;
|
|
3944
4015
|
}
|
|
3945
4016
|
|
|
4017
|
+
.subtitle {
|
|
4018
|
+
&:last-child {
|
|
4019
|
+
margin: 0;
|
|
4020
|
+
}
|
|
4021
|
+
}
|
|
4022
|
+
|
|
3946
4023
|
.package-subtitle {
|
|
3947
4024
|
margin: 10px 0 30px;
|
|
3948
4025
|
}
|
|
@@ -2121,7 +2121,7 @@
|
|
|
2121
2121
|
HeaderPageComponent.decorators = [
|
|
2122
2122
|
{ type: i0.Component, args: [{
|
|
2123
2123
|
selector: 'wac-header-page',
|
|
2124
|
-
template: "<div class=\"wac-header-page\">\n <div class=\"wac-header-page__maxWidth\">\n <div class=\"wac-header-page__maxWidth__top\" [ngClass]=\"{'center':center}\">\n <div class=\"wac-header-page__maxWidth__top__left\" [ngClass]=\"{'fullsize':center}\">\n <!-- TODO Hard to use when only want a button and not a router link -->\n <a *ngIf=\"linkBack\" [routerLink]=\"linkBack\"><i class=\"fas fa-chevron-left\"></i></a>\n
|
|
2124
|
+
template: "<div class=\"wac-header-page\">\n <div class=\"wac-header-page__maxWidth\">\n <div class=\"wac-header-page__maxWidth__top\" [ngClass]=\"{'center':center}\">\n <div class=\"wac-header-page__maxWidth__top__left\" [ngClass]=\"{'fullsize':center}\">\n <!-- TODO Hard to use when only want a button and not a router link -->\n <div class=\"wac-header-page__maxWidth__top__left__nowrap\">\n <a *ngIf=\"linkBack\" [routerLink]=\"linkBack\"><i class=\"fas fa-chevron-left\"></i></a>\n <wac-h1 [center]=\"center\" [withImg]=\"withImg\">{{ title }}<ng-content select=\"[role=header]\"></ng-content></wac-h1>\n </div>\n <p class=\"subtitle\"><ng-content select=\"[role=subtitle]\"></ng-content></p>\n </div>\n <div class=\"wac-header-page__maxWidth__top__right\" *ngIf=\"!center\">\n <ng-content></ng-content>\n </div>\n </div>\n </div>\n</div>\n"
|
|
2125
2125
|
},] }
|
|
2126
2126
|
];
|
|
2127
2127
|
HeaderPageComponent.ctorParameters = function () { return []; };
|
|
@@ -2265,6 +2265,7 @@
|
|
|
2265
2265
|
function LinkComponent(renderer2) {
|
|
2266
2266
|
this.renderer2 = renderer2;
|
|
2267
2267
|
this.target = '_self';
|
|
2268
|
+
this.fontSize = '14px';
|
|
2268
2269
|
}
|
|
2269
2270
|
Object.defineProperty(LinkComponent.prototype, "href", {
|
|
2270
2271
|
get: function () {
|
|
@@ -2299,7 +2300,7 @@
|
|
|
2299
2300
|
LinkComponent.decorators = [
|
|
2300
2301
|
{ type: i0.Component, args: [{
|
|
2301
2302
|
selector: 'wac-link',
|
|
2302
|
-
template: "<a #linkComponent class=\"wac-link\" [ngClass]=\"{ class: class }\" [id]=\"{ id: id }\"><ng-content></ng-content></a>\n"
|
|
2303
|
+
template: "<a #linkComponent class=\"wac-link\" [style.fontSize]=\"fontSize\" [ngClass]=\"{ class: class }\" [id]=\"{ id: id }\"><ng-content></ng-content></a>\n"
|
|
2303
2304
|
},] }
|
|
2304
2305
|
];
|
|
2305
2306
|
LinkComponent.ctorParameters = function () { return [
|
|
@@ -2310,6 +2311,7 @@
|
|
|
2310
2311
|
target: [{ type: i0.Input }],
|
|
2311
2312
|
id: [{ type: i0.Input }],
|
|
2312
2313
|
class: [{ type: i0.Input }],
|
|
2314
|
+
fontSize: [{ type: i0.Input }],
|
|
2313
2315
|
linkComponent: [{ type: i0.ViewChild, args: ['linkComponent',] }]
|
|
2314
2316
|
};
|
|
2315
2317
|
|
|
@@ -4354,7 +4356,7 @@
|
|
|
4354
4356
|
BlockWithCheckboxComponent.decorators = [
|
|
4355
4357
|
{ type: i0.Component, args: [{
|
|
4356
4358
|
selector: 'wac-block-with-checkbox',
|
|
4357
|
-
template: "<div class=\"block-with-checkbox\" [ngClass]=\"{'selected': inputRadioA.checked || selected, 'firstWacRadioBLock': isFirst, 'disabled': disabled}\" [style.opacity]=\"opacity\" (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\" [checked]=\"selected\" [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>\n"
|
|
4359
|
+
template: "<div class=\"block-with-checkbox\" (click)=\"disabled ? $event.preventDefault() : ''\" [ngClass]=\"{'selected': inputRadioA.checked || selected, 'firstWacRadioBLock': isFirst, 'disabled': disabled}\" [style.opacity]=\"opacity\" (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\" [checked]=\"selected\" [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>\n"
|
|
4358
4360
|
},] }
|
|
4359
4361
|
];
|
|
4360
4362
|
BlockWithCheckboxComponent.ctorParameters = function () { return []; };
|
|
@@ -4474,18 +4476,56 @@
|
|
|
4474
4476
|
|
|
4475
4477
|
var ContentWithButtonsComponent = /** @class */ (function () {
|
|
4476
4478
|
function ContentWithButtonsComponent() {
|
|
4479
|
+
this.iconCopy = 'fa-duotone fa-copy';
|
|
4480
|
+
this.iconTranslate = 'fa-thin fa-globe';
|
|
4481
|
+
this.count = true;
|
|
4482
|
+
this.countCharacterLabel = 'caractères';
|
|
4483
|
+
this.countWordsLabel = 'mots';
|
|
4484
|
+
this.copyAction = new i0.EventEmitter();
|
|
4485
|
+
this.reportAction = new i0.EventEmitter();
|
|
4486
|
+
this.translateAction = new i0.EventEmitter();
|
|
4487
|
+
this.countIsReady = false;
|
|
4477
4488
|
}
|
|
4478
4489
|
ContentWithButtonsComponent.prototype.ngOnInit = function () {
|
|
4490
|
+
this.randomLabelName = 'content-' + Math.random() * (900 - 700) + 700;
|
|
4491
|
+
};
|
|
4492
|
+
ContentWithButtonsComponent.prototype.ngAfterViewInit = function () {
|
|
4493
|
+
var _this = this;
|
|
4494
|
+
setTimeout(function () {
|
|
4495
|
+
var content = document.getElementById(_this.randomLabelName).innerHTML.replace(/(<([^>]+)>)/gi, '').replace(/[.,\/#!$%\^&\*;:{}=\-_`~()]/g, '');
|
|
4496
|
+
_this.countCharacter = content.trim().split(' ').join('').length;
|
|
4497
|
+
_this.countWords = content.trim().split(' ').length;
|
|
4498
|
+
_this.countIsReady = true;
|
|
4499
|
+
});
|
|
4500
|
+
};
|
|
4501
|
+
ContentWithButtonsComponent.prototype.eventCopy = function () {
|
|
4502
|
+
this.copyAction.emit(true);
|
|
4503
|
+
};
|
|
4504
|
+
ContentWithButtonsComponent.prototype.eventTranslate = function () {
|
|
4505
|
+
this.translateAction.emit(true);
|
|
4506
|
+
};
|
|
4507
|
+
ContentWithButtonsComponent.prototype.eventReport = function () {
|
|
4508
|
+
this.reportAction.emit(true);
|
|
4479
4509
|
};
|
|
4480
4510
|
return ContentWithButtonsComponent;
|
|
4481
4511
|
}());
|
|
4482
4512
|
ContentWithButtonsComponent.decorators = [
|
|
4483
4513
|
{ type: i0.Component, args: [{
|
|
4484
4514
|
selector: 'wac-content-with-buttons',
|
|
4485
|
-
template: "<
|
|
4515
|
+
template: "<div class=\"wac-content-with-buttons\">\n <div class=\"wac-content-with-buttons__text\">\n <div id=\"{{randomLabelName}}\">\n <ng-content></ng-content>\n </div>\n <div class=\"wac-content-with-buttons__text__count\" *ngIf=\"count && countIsReady\">\n <span>{{ countWords }} {{ countWordsLabel }} - {{ countCharacter }} {{ countCharacterLabel }}</span>\n <span><wac-link (click)=\"eventReport()\" fontSize=\"12px\">{{ reportLabel }}</wac-link></span>\n </div>\n </div>\n <div class=\"wac-content-with-buttons__cta\">\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]=\"iconTranslate\" (click)=\"eventTranslate()\"></wac-button></div>\n </div>\n</div>\n"
|
|
4486
4516
|
},] }
|
|
4487
4517
|
];
|
|
4488
|
-
ContentWithButtonsComponent.
|
|
4518
|
+
ContentWithButtonsComponent.propDecorators = {
|
|
4519
|
+
iconCopy: [{ type: i0.Input }],
|
|
4520
|
+
iconTranslate: [{ type: i0.Input }],
|
|
4521
|
+
count: [{ type: i0.Input }],
|
|
4522
|
+
countCharacterLabel: [{ type: i0.Input }],
|
|
4523
|
+
countWordsLabel: [{ type: i0.Input }],
|
|
4524
|
+
reportLabel: [{ type: i0.Input }],
|
|
4525
|
+
copyAction: [{ type: i0.Output }],
|
|
4526
|
+
reportAction: [{ type: i0.Output }],
|
|
4527
|
+
translateAction: [{ type: i0.Output }]
|
|
4528
|
+
};
|
|
4489
4529
|
|
|
4490
4530
|
var components = [
|
|
4491
4531
|
TagComponent,
|