@the-liberators/ngx-scrumteamsurvey-tools 2.2.81 → 2.2.82

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.
@@ -7,29 +7,32 @@ export class AgeIndicatorComponent {
7
7
  }
8
8
  ngOnInit() {
9
9
  var measureDate = new Date(this.lastMeasured);
10
- var lastMeasuredMonths = Math.max(0, (new Date().getFullYear() - measureDate.getFullYear()) * 12 - measureDate.getMonth() + new Date().getMonth());
11
- if (lastMeasuredMonths > 12) {
12
- lastMeasuredMonths == 12;
10
+ this.lastMeasuredMonths = Math.max(0, (new Date().getFullYear() - measureDate.getFullYear()) * 12 - measureDate.getMonth() + new Date().getMonth());
11
+ if (this.lastMeasuredMonths > 12) {
12
+ this.lastMeasuredMonths = 12;
13
13
  }
14
- this.lastMeasuredDots = new Array(lastMeasuredMonths);
15
- this.lastMeasuredOpacity = 1 - (lastMeasuredMonths / 14);
16
- if (lastMeasuredMonths <= 1) {
14
+ if (this.lastMeasuredMonths < 1) {
15
+ this.lastMeasuredMonths = 1;
16
+ }
17
+ this.lastMeasuredOpacity = 1 - (this.lastMeasuredMonths / 14);
18
+ console.log(this.lastMeasuredMonths);
19
+ if (this.lastMeasuredMonths <= 1) {
17
20
  this.lastMeasuredTooltip = 'This factor was last measured 1 month or less ago. It is fresh data.';
18
21
  }
19
- else if (lastMeasuredMonths >= 12) {
22
+ else if (this.lastMeasuredMonths >= 12) {
20
23
  this.lastMeasuredTooltip = 'This factor was last measured 12 month or more ago. We recommend to measure this again to keep data fresh.';
21
24
  }
22
25
  else {
23
- this.lastMeasuredTooltip = 'This factor was last measured ' + lastMeasuredMonths + ' month or more ago. The fresher your data, the more reliable it is.';
26
+ this.lastMeasuredTooltip = 'This factor was last measured ' + this.lastMeasuredMonths + ' month or more ago. The fresher your data, the more reliable it is.';
24
27
  }
25
28
  }
26
29
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AgeIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
27
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: AgeIndicatorComponent, selector: "age-indicator", inputs: { lastMeasured: "lastMeasured" }, ngImport: i0, template: "<div class=\"age-indicator\" [style.opacity]=\"lastMeasuredOpacity\" [matTooltip]=\"lastMeasuredTooltip\" *ngIf=\"lastMeasuredDots\">\n <div class=\"age-indicator-dot\" *ngFor=\"let dot of lastMeasuredDots\"></div>\n</div>\n", styles: [".smallTextUppercase{font-family:StevieSansThin,sans-serif;font-style:normal;font-weight:400;font-size:15px;line-height:140%;text-transform:uppercase;line-height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
30
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: AgeIndicatorComponent, selector: "age-indicator", inputs: { lastMeasured: "lastMeasured" }, ngImport: i0, template: "<div class=\"age-indicator\" [style.opacity]=\"lastMeasuredOpacity\" [matTooltip]=\"lastMeasuredTooltip\" *ngIf=\"lastMeasuredMonths > 0\">\n <div class=\"age-indicator-dot\" *ngFor=\"let e of [].constructor(lastMeasuredMonths); let i = index\"></div>\n</div>\n", styles: [".smallTextUppercase{font-family:StevieSansThin,sans-serif;font-style:normal;font-weight:400;font-size:15px;line-height:140%;text-transform:uppercase;line-height:100%}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
28
31
  }
29
32
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AgeIndicatorComponent, decorators: [{
30
33
  type: Component,
31
- args: [{ selector: 'age-indicator', template: "<div class=\"age-indicator\" [style.opacity]=\"lastMeasuredOpacity\" [matTooltip]=\"lastMeasuredTooltip\" *ngIf=\"lastMeasuredDots\">\n <div class=\"age-indicator-dot\" *ngFor=\"let dot of lastMeasuredDots\"></div>\n</div>\n", styles: [".smallTextUppercase{font-family:StevieSansThin,sans-serif;font-style:normal;font-weight:400;font-size:15px;line-height:140%;text-transform:uppercase;line-height:100%}\n"] }]
34
+ args: [{ selector: 'age-indicator', template: "<div class=\"age-indicator\" [style.opacity]=\"lastMeasuredOpacity\" [matTooltip]=\"lastMeasuredTooltip\" *ngIf=\"lastMeasuredMonths > 0\">\n <div class=\"age-indicator-dot\" *ngFor=\"let e of [].constructor(lastMeasuredMonths); let i = index\"></div>\n</div>\n", styles: [".smallTextUppercase{font-family:StevieSansThin,sans-serif;font-style:normal;font-weight:400;font-size:15px;line-height:140%;text-transform:uppercase;line-height:100%}\n"] }]
32
35
  }], ctorParameters: () => [], propDecorators: { lastMeasured: [{
33
36
  type: Input
34
37
  }] } });
35
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWdlLWluZGljYXRvci5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi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FzdXJlIHRoaXMgYWdhaW4gdG8ga2VlcCBkYXRhIGZyZXNoLic7XG4gICAgICB9XG4gICAgICBlbHNlIHtcbiAgICAgICAgIHRoaXMubGFzdE1lYXN1cmVkVG9vbHRpcCA9ICdUaGlzIGZhY3RvciB3YXMgbGFzdCBtZWFzdXJlZCAnICsgdGhpcy5sYXN0TWVhc3VyZWRNb250aHMgKyAnIG1vbnRoIG9yIG1vcmUgYWdvLiBUaGUgZnJlc2hlciB5b3VyIGRhdGEsIHRoZSBtb3JlIHJlbGlhYmxlIGl0IGlzLic7XG4gICAgICB9XG4gIH1cbiAgXG59XG4iLCI8ZGl2IGNsYXNzPVwiYWdlLWluZGljYXRvclwiIFtzdHlsZS5vcGFjaXR5XT1cImxhc3RNZWFzdXJlZE9wYWNpdHlcIiBbbWF0VG9vbHRpcF09XCJsYXN0TWVhc3VyZWRUb29sdGlwXCIgKm5nSWY9XCJsYXN0TWVhc3VyZWRNb250aHMgPiAwXCI+XG4gICA8ZGl2IGNsYXNzPVwiYWdlLWluZGljYXRvci1kb3RcIiAqbmdGb3I9XCJsZXQgZSBvZiBbXS5jb25zdHJ1Y3RvcihsYXN0TWVhc3VyZWRNb250aHMpOyBsZXQgaSA9IGluZGV4XCI+PC9kaXY+XG48L2Rpdj5cbiJdfQ==
@@ -5568,28 +5568,31 @@ class AgeIndicatorComponent {
5568
5568
  }
5569
5569
  ngOnInit() {
5570
5570
  var measureDate = new Date(this.lastMeasured);
5571
- var lastMeasuredMonths = Math.max(0, (new Date().getFullYear() - measureDate.getFullYear()) * 12 - measureDate.getMonth() + new Date().getMonth());
5572
- if (lastMeasuredMonths > 12) {
5573
- lastMeasuredMonths == 12;
5571
+ this.lastMeasuredMonths = Math.max(0, (new Date().getFullYear() - measureDate.getFullYear()) * 12 - measureDate.getMonth() + new Date().getMonth());
5572
+ if (this.lastMeasuredMonths > 12) {
5573
+ this.lastMeasuredMonths = 12;
5574
5574
  }
5575
- this.lastMeasuredDots = new Array(lastMeasuredMonths);
5576
- this.lastMeasuredOpacity = 1 - (lastMeasuredMonths / 14);
5577
- if (lastMeasuredMonths <= 1) {
5575
+ if (this.lastMeasuredMonths < 1) {
5576
+ this.lastMeasuredMonths = 1;
5577
+ }
5578
+ this.lastMeasuredOpacity = 1 - (this.lastMeasuredMonths / 14);
5579
+ console.log(this.lastMeasuredMonths);
5580
+ if (this.lastMeasuredMonths <= 1) {
5578
5581
  this.lastMeasuredTooltip = 'This factor was last measured 1 month or less ago. It is fresh data.';
5579
5582
  }
5580
- else if (lastMeasuredMonths >= 12) {
5583
+ else if (this.lastMeasuredMonths >= 12) {
5581
5584
  this.lastMeasuredTooltip = 'This factor was last measured 12 month or more ago. We recommend to measure this again to keep data fresh.';
5582
5585
  }
5583
5586
  else {
5584
- this.lastMeasuredTooltip = 'This factor was last measured ' + lastMeasuredMonths + ' month or more ago. The fresher your data, the more reliable it is.';
5587
+ this.lastMeasuredTooltip = 'This factor was last measured ' + this.lastMeasuredMonths + ' month or more ago. The fresher your data, the more reliable it is.';
5585
5588
  }
5586
5589
  }
5587
5590
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AgeIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5588
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: AgeIndicatorComponent, selector: "age-indicator", inputs: { lastMeasured: "lastMeasured" }, ngImport: i0, template: "<div class=\"age-indicator\" [style.opacity]=\"lastMeasuredOpacity\" [matTooltip]=\"lastMeasuredTooltip\" *ngIf=\"lastMeasuredDots\">\n <div class=\"age-indicator-dot\" *ngFor=\"let dot of lastMeasuredDots\"></div>\n</div>\n", styles: [".smallTextUppercase{font-family:StevieSansThin,sans-serif;font-style:normal;font-weight:400;font-size:15px;line-height:140%;text-transform:uppercase;line-height:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
5591
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.0.1", type: AgeIndicatorComponent, selector: "age-indicator", inputs: { lastMeasured: "lastMeasured" }, ngImport: i0, template: "<div class=\"age-indicator\" [style.opacity]=\"lastMeasuredOpacity\" [matTooltip]=\"lastMeasuredTooltip\" *ngIf=\"lastMeasuredMonths > 0\">\n <div class=\"age-indicator-dot\" *ngFor=\"let e of [].constructor(lastMeasuredMonths); let i = index\"></div>\n</div>\n", styles: [".smallTextUppercase{font-family:StevieSansThin,sans-serif;font-style:normal;font-weight:400;font-size:15px;line-height:140%;text-transform:uppercase;line-height:100%}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }] }); }
5589
5592
  }
5590
5593
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.1", ngImport: i0, type: AgeIndicatorComponent, decorators: [{
5591
5594
  type: Component,
5592
- args: [{ selector: 'age-indicator', template: "<div class=\"age-indicator\" [style.opacity]=\"lastMeasuredOpacity\" [matTooltip]=\"lastMeasuredTooltip\" *ngIf=\"lastMeasuredDots\">\n <div class=\"age-indicator-dot\" *ngFor=\"let dot of lastMeasuredDots\"></div>\n</div>\n", styles: [".smallTextUppercase{font-family:StevieSansThin,sans-serif;font-style:normal;font-weight:400;font-size:15px;line-height:140%;text-transform:uppercase;line-height:100%}\n"] }]
5595
+ args: [{ selector: 'age-indicator', template: "<div class=\"age-indicator\" [style.opacity]=\"lastMeasuredOpacity\" [matTooltip]=\"lastMeasuredTooltip\" *ngIf=\"lastMeasuredMonths > 0\">\n <div class=\"age-indicator-dot\" *ngFor=\"let e of [].constructor(lastMeasuredMonths); let i = index\"></div>\n</div>\n", styles: [".smallTextUppercase{font-family:StevieSansThin,sans-serif;font-style:normal;font-weight:400;font-size:15px;line-height:140%;text-transform:uppercase;line-height:100%}\n"] }]
5593
5596
  }], ctorParameters: () => [], propDecorators: { lastMeasured: [{
5594
5597
  type: Input
5595
5598
  }] } });