@seniorsistemas/angular-components 17.5.0 → 17.5.1

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.
@@ -6362,6 +6362,11 @@
6362
6362
 
6363
6363
  var ProgressBarComponent = /** @class */ (function () {
6364
6364
  function ProgressBarComponent() {
6365
+ this.numberFormatOptions = {
6366
+ style: "decimal",
6367
+ minimumFractionDigits: 0,
6368
+ maximumFractionDigits: 2,
6369
+ };
6365
6370
  this.showValue = true;
6366
6371
  this.mode = ProgressBarMode.Determinate;
6367
6372
  }
@@ -6382,6 +6387,9 @@
6382
6387
  __decorate([
6383
6388
  core.Input()
6384
6389
  ], ProgressBarComponent.prototype, "value", void 0);
6390
+ __decorate([
6391
+ core.Input()
6392
+ ], ProgressBarComponent.prototype, "numberFormatOptions", void 0);
6385
6393
  __decorate([
6386
6394
  core.Input()
6387
6395
  ], ProgressBarComponent.prototype, "targetValue", void 0);
@@ -6403,7 +6411,7 @@
6403
6411
  ProgressBarComponent = __decorate([
6404
6412
  core.Component({
6405
6413
  selector: "s-progressbar",
6406
- template: "<ng-container *ngIf=\"mode === 'determinate'; then pbDeterminateTemplate else pbIndeterminateTemplate\"></ng-container>\n\n<ng-template #pbDeterminateTemplate>\n <s-progressbar-determinate\n [value]=\"value\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\">\n </s-progressbar-determinate>\n</ng-template>\n\n<ng-template #pbIndeterminateTemplate>\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\">\n </s-progressbar-indeterminate>\n</ng-template>",
6414
+ template: "<ng-container *ngIf=\"mode === 'determinate'; then pbDeterminateTemplate else pbIndeterminateTemplate\"></ng-container>\n\n<ng-template #pbDeterminateTemplate>\n <s-progressbar-determinate\n [value]=\"value\"\n [numberFormatOptions]=\"numberFormatOptions\"\n [targetValue]=\"targetValue\"\n [targetLabel]=\"targetLabel\"\n [activeColor]=\"activeColor\"\n [showValue]=\"showValue\">\n </s-progressbar-determinate>\n</ng-template>\n\n<ng-template #pbIndeterminateTemplate>\n <s-progressbar-indeterminate\n [activeColor]=\"activeColor\"\n [label]=\"label\">\n </s-progressbar-indeterminate>\n</ng-template>",
6407
6415
  styles: [".progress-bar{position:relative}.progress-bar .progress-bar-all{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progress-bar .progress-bar-all .progress-bar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progress-bar .progress-bar-all .progress-bar-active--blue{background-color:#428bca}.progress-bar .progress-bar-all .progress-bar-active--green{background-color:#0c9348}.progress-bar .progress-bar-all .progress-bar-active--red{background-color:#c13018}.progress-bar .progress-bar-all .progress-bar-active--yellow{background-color:#fcbf10}.progress-bar .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progress-bar .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progress-bar .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
6408
6416
  })
6409
6417
  ], ProgressBarComponent);
@@ -6411,11 +6419,24 @@
6411
6419
  }());
6412
6420
 
6413
6421
  var ProgressBarDeterminateComponent = /** @class */ (function () {
6414
- function ProgressBarDeterminateComponent() {
6422
+ function ProgressBarDeterminateComponent(localeService) {
6423
+ this.localeService = localeService;
6415
6424
  this.showValue = true;
6416
6425
  }
6417
6426
  ProgressBarDeterminateComponent.prototype.ngOnInit = function () {
6418
6427
  this.validateValues();
6428
+ this.onGetLocale();
6429
+ };
6430
+ ProgressBarDeterminateComponent.prototype.onGetLocale = function () {
6431
+ var _this = this;
6432
+ this.localeService.getLocale().subscribe({
6433
+ next: function (locale) {
6434
+ _this.numberFormat = new Intl.NumberFormat(locale !== null && locale !== void 0 ? locale : "pt-BR", _this.numberFormatOptions);
6435
+ },
6436
+ error: function () {
6437
+ _this.numberFormat = new Intl.NumberFormat("pt-BR", _this.numberFormatOptions);
6438
+ },
6439
+ });
6419
6440
  };
6420
6441
  ProgressBarDeterminateComponent.prototype.validateValues = function () {
6421
6442
  if (this.value < 0 || this.value > 100) {
@@ -6425,9 +6446,15 @@
6425
6446
  throw new Error("Invalid value for targetValue");
6426
6447
  }
6427
6448
  };
6449
+ ProgressBarDeterminateComponent.ctorParameters = function () { return [
6450
+ { type: LocaleService }
6451
+ ]; };
6428
6452
  __decorate([
6429
6453
  core.Input()
6430
6454
  ], ProgressBarDeterminateComponent.prototype, "value", void 0);
6455
+ __decorate([
6456
+ core.Input()
6457
+ ], ProgressBarDeterminateComponent.prototype, "numberFormatOptions", void 0);
6431
6458
  __decorate([
6432
6459
  core.Input()
6433
6460
  ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
@@ -6443,7 +6470,7 @@
6443
6470
  ProgressBarDeterminateComponent = __decorate([
6444
6471
  core.Component({
6445
6472
  selector: "s-progressbar-determinate",
6446
- template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue' : activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n {{ showValue && value ? value + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || value + '%' }}\n </span>\n </div>\n </div>\n ",
6473
+ template: "<div class=\"progressbar-determinate\">\n <div class=\"progressbar-container\">\n <div\n class=\"progressbar-active\"\n [ngClass]=\"{\n 'progressbar-active--blue' : activeColor === 'blue',\n 'progressbar-active--green': activeColor === 'green',\n 'progressbar-active--red': activeColor === 'red',\n 'progressbar-active--yellow': activeColor === 'yellow'\n }\"\n [ngStyle]=\"{ 'width': value + '%' }\">\n\n {{ showValue && value ? numberFormat.format(value) + '%' : '' }}\n </div>\n </div>\n <div\n *ngIf=\"targetValue\"\n class=\"target\"\n [ngStyle]=\"{\n 'left': targetValue <= 50 ? targetValue + '%' : 'unset',\n 'right': targetValue > 50 ? 100 - targetValue + '%' : 'unset',\n 'align-items': targetValue > 50 ? 'flex-end' : 'flex-start'\n }\">\n <span class=\"target-line\"></span>\n <span class=\"target-label\">\n {{ targetLabel || numberFormat.format(value) + '%' }}\n </span>\n </div>\n </div>\n",
6447
6474
  styles: [".progressbar-determinate{position:relative}.progressbar-determinate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;overflow:hidden;width:100%}.progressbar-determinate .progressbar-container .progressbar-active{-ms-flex-align:center;align-items:center;color:#fff;display:-ms-flexbox;display:flex;font-family:\"Open Sans\",sans-serif;font-size:14px;height:100%;-ms-flex-pack:center;justify-content:center;line-height:150%;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:80%}.progressbar-determinate .progressbar-container .progressbar-active--blue{background-color:#428bca}.progressbar-determinate .progressbar-container .progressbar-active--green{background-color:#0c9348}.progressbar-determinate .progressbar-container .progressbar-active--red{background-color:#c13018}.progressbar-determinate .progressbar-container .progressbar-active--yellow{background-color:#fcbf10;color:#212533}.progressbar-determinate .target{-ms-flex-align:start;align-items:flex-start;bottom:-38px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;position:absolute}.progressbar-determinate .target .target-line{background-color:#333;height:40px;margin:8px 0;width:1px}.progressbar-determinate .target .target-label{background-color:#426e78;border-radius:10px;color:#e5eaea;font-family:\"Open Sans\",sans-serif;font-size:12px;line-height:150%;padding:2px 12px}"]
6448
6475
  })
6449
6476
  ], ProgressBarDeterminateComponent);
@@ -6462,7 +6489,7 @@
6462
6489
  ProgressBarIndeterminateComponent = __decorate([
6463
6490
  core.Component({
6464
6491
  selector: "s-progressbar-indeterminate",
6465
- template: "<!-- progressbar-indeterminate.component.html -->\n<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n \n <span *ngIf=\"label\" class=\"progressbar-label\">{{ label }}</span>\n</div>\n",
6492
+ template: "<div class=\"progressbar-indeterminate\">\n <div class=\"progressbar-container\">\n <div class=\"indeterminate-bar\" [ngClass]=\"{\n 'indeterminate-bar--blue': activeColor === 'blue',\n 'indeterminate-bar--green': activeColor === 'green',\n 'indeterminate-bar--red': activeColor === 'red',\n 'indeterminate-bar--yellow': activeColor === 'yellow'\n }\"></div>\n </div>\n\n <span *ngIf=\"label\" class=\"progressbar-label\">{{ label }}</span>\n</div>\n",
6466
6493
  styles: [".progressbar-indeterminate{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center}.progressbar-indeterminate .progressbar-container{background-color:#d8d8d8;border-radius:4px;height:24px;margin:8px 0;overflow:hidden;width:100%}.progressbar-indeterminate .indeterminate-bar{animation:5s infinite indeterminate-progress;background-color:#428bca;height:100%;width:40%}.progressbar-indeterminate .indeterminate-bar--blue{background-color:#428bca}.progressbar-indeterminate .indeterminate-bar--green{background-color:#0c9348}.progressbar-indeterminate .indeterminate-bar--red{background-color:#c13018}.progressbar-indeterminate .indeterminate-bar--yellow{background-color:#fcbf10}.progressbar-indeterminate .progressbar-label{font-family:\"Open Sans\" sans-serif;font-size:12px;line-height:150%;color:#212533}@keyframes indeterminate-progress{0%{transform:translateX(-250%)}100%{transform:translateX(250%)}}"]
6467
6494
  })
6468
6495
  ], ProgressBarIndeterminateComponent);