@wizishop/angular-components 0.0.184 → 0.0.185

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.
@@ -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 {
@@ -2794,7 +2839,9 @@ $wac-subtitle-color: #7A87A1!default;
2794
2839
  }
2795
2840
  }
2796
2841
  .subtitle {
2842
+ padding: 0 0 0 60px;
2797
2843
  .center & {
2844
+ padding: 0;
2798
2845
  display: flex;
2799
2846
  justify-content: center;
2800
2847
  }
@@ -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
 
@@ -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: "<p>content-with-buttons works!</p>\n"
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.ctorParameters = function () { return []; };
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,