@seniorsistemas/angular-components 17.2.18 → 17.2.19

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.
Files changed (30) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +93 -12
  2. package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
  3. package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
  4. package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
  5. package/components/progressbar/components/progressbar-determinate/progressbar-determinate.component.d.ts +11 -0
  6. package/components/progressbar/components/progressbar-indeterminate/progressbar-indeterminate.component.d.ts +5 -0
  7. package/components/progressbar/models/index.d.ts +1 -0
  8. package/components/progressbar/models/progressbar-mode.d.ts +4 -0
  9. package/components/progressbar/progressbar.component.d.ts +4 -2
  10. package/esm2015/components/progressbar/components/progressbar-determinate/progressbar-determinate.component.js +42 -0
  11. package/esm2015/components/progressbar/components/progressbar-indeterminate/progressbar-indeterminate.component.js +19 -0
  12. package/esm2015/components/progressbar/models/index.js +2 -1
  13. package/esm2015/components/progressbar/models/progressbar-mode.js +6 -0
  14. package/esm2015/components/progressbar/progressbar.component.js +15 -4
  15. package/esm2015/components/progressbar/progressbar.module.js +8 -2
  16. package/esm2015/seniorsistemas-angular-components.js +3 -1
  17. package/esm5/components/progressbar/components/progressbar-determinate/progressbar-determinate.component.js +43 -0
  18. package/esm5/components/progressbar/components/progressbar-indeterminate/progressbar-indeterminate.component.js +22 -0
  19. package/esm5/components/progressbar/models/index.js +2 -1
  20. package/esm5/components/progressbar/models/progressbar-mode.js +6 -0
  21. package/esm5/components/progressbar/progressbar.component.js +15 -4
  22. package/esm5/components/progressbar/progressbar.module.js +8 -2
  23. package/esm5/seniorsistemas-angular-components.js +3 -1
  24. package/fesm2015/seniorsistemas-angular-components.js +88 -13
  25. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  26. package/fesm5/seniorsistemas-angular-components.js +92 -13
  27. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  28. package/package.json +1 -1
  29. package/seniorsistemas-angular-components.d.ts +2 -0
  30. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -15541,20 +15541,38 @@
15541
15541
  return WorkspaceSwitchModule;
15542
15542
  }());
15543
15543
 
15544
+
15545
+ (function (ProgressBarColors) {
15546
+ ProgressBarColors["Blue"] = "blue";
15547
+ ProgressBarColors["Green"] = "green";
15548
+ ProgressBarColors["Red"] = "red";
15549
+ ProgressBarColors["Yellow"] = "yellow";
15550
+ })(exports.ProgressBarColors || (exports.ProgressBarColors = {}));
15551
+
15552
+ var ProgressBarMode;
15553
+ (function (ProgressBarMode) {
15554
+ ProgressBarMode["Determinate"] = "determinate";
15555
+ ProgressBarMode["Indeterminate"] = "indeterminate";
15556
+ })(ProgressBarMode || (ProgressBarMode = {}));
15557
+
15544
15558
  var ProgressBarComponent = /** @class */ (function () {
15545
15559
  function ProgressBarComponent() {
15546
15560
  this.showValue = true;
15561
+ this.mode = ProgressBarMode.Determinate;
15547
15562
  }
15548
15563
  ProgressBarComponent.prototype.ngOnInit = function () {
15549
- this.validateValues();
15564
+ this.validateInputs();
15550
15565
  };
15551
- ProgressBarComponent.prototype.validateValues = function () {
15566
+ ProgressBarComponent.prototype.validateInputs = function () {
15552
15567
  if (this.value < 0 || this.value > 100) {
15553
15568
  throw new Error("Invalid value for value");
15554
15569
  }
15555
15570
  if (this.targetValue < 0 || this.targetValue > 100) {
15556
15571
  throw new Error("Invalid value for targetValue");
15557
15572
  }
15573
+ if (this.mode === ProgressBarMode.Indeterminate && (this.value || this.targetValue || this.targetLabel)) {
15574
+ throw new Error("When the mode is indeterminate, the value, targetValue and targetLabel parameters are not expected.");
15575
+ }
15558
15576
  };
15559
15577
  __decorate([
15560
15578
  core.Input()
@@ -15562,6 +15580,9 @@
15562
15580
  __decorate([
15563
15581
  core.Input()
15564
15582
  ], ProgressBarComponent.prototype, "targetValue", void 0);
15583
+ __decorate([
15584
+ core.Input()
15585
+ ], ProgressBarComponent.prototype, "label", void 0);
15565
15586
  __decorate([
15566
15587
  core.Input()
15567
15588
  ], ProgressBarComponent.prototype, "targetLabel", void 0);
@@ -15571,37 +15592,95 @@
15571
15592
  __decorate([
15572
15593
  core.Input()
15573
15594
  ], ProgressBarComponent.prototype, "showValue", void 0);
15595
+ __decorate([
15596
+ core.Input()
15597
+ ], ProgressBarComponent.prototype, "mode", void 0);
15574
15598
  ProgressBarComponent = __decorate([
15575
15599
  core.Component({
15576
15600
  selector: "s-progressbar",
15577
- template: "<div class=\"progress-bar\">\n <div class=\"progress-bar-all\">\n <div\n class=\"progress-bar-active\"\n [ngClass]=\"{\n 'progress-bar-active--blue' : activeColor == 'blue',\n 'progress-bar-active--green': activeColor == 'green',\n 'progress-bar-active--red': activeColor == 'red',\n 'progress-bar-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",
15601
+ 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>",
15578
15602
  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}"]
15579
15603
  })
15580
15604
  ], ProgressBarComponent);
15581
15605
  return ProgressBarComponent;
15582
15606
  }());
15583
15607
 
15608
+ var ProgressBarDeterminateComponent = /** @class */ (function () {
15609
+ function ProgressBarDeterminateComponent() {
15610
+ this.showValue = true;
15611
+ }
15612
+ ProgressBarDeterminateComponent.prototype.ngOnInit = function () {
15613
+ this.validateValues();
15614
+ };
15615
+ ProgressBarDeterminateComponent.prototype.validateValues = function () {
15616
+ if (this.value < 0 || this.value > 100) {
15617
+ throw new Error("Invalid value for value");
15618
+ }
15619
+ if (this.targetValue < 0 || this.targetValue > 100) {
15620
+ throw new Error("Invalid value for targetValue");
15621
+ }
15622
+ };
15623
+ __decorate([
15624
+ core.Input()
15625
+ ], ProgressBarDeterminateComponent.prototype, "value", void 0);
15626
+ __decorate([
15627
+ core.Input()
15628
+ ], ProgressBarDeterminateComponent.prototype, "targetValue", void 0);
15629
+ __decorate([
15630
+ core.Input()
15631
+ ], ProgressBarDeterminateComponent.prototype, "targetLabel", void 0);
15632
+ __decorate([
15633
+ core.Input()
15634
+ ], ProgressBarDeterminateComponent.prototype, "activeColor", void 0);
15635
+ __decorate([
15636
+ core.Input()
15637
+ ], ProgressBarDeterminateComponent.prototype, "showValue", void 0);
15638
+ ProgressBarDeterminateComponent = __decorate([
15639
+ core.Component({
15640
+ selector: "s-progressbar-determinate",
15641
+ 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 ",
15642
+ 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}.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}"]
15643
+ })
15644
+ ], ProgressBarDeterminateComponent);
15645
+ return ProgressBarDeterminateComponent;
15646
+ }());
15647
+
15648
+ var ProgressBarIndeterminateComponent = /** @class */ (function () {
15649
+ function ProgressBarIndeterminateComponent() {
15650
+ }
15651
+ __decorate([
15652
+ core.Input()
15653
+ ], ProgressBarIndeterminateComponent.prototype, "activeColor", void 0);
15654
+ __decorate([
15655
+ core.Input()
15656
+ ], ProgressBarIndeterminateComponent.prototype, "label", void 0);
15657
+ ProgressBarIndeterminateComponent = __decorate([
15658
+ core.Component({
15659
+ selector: "s-progressbar-indeterminate",
15660
+ 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",
15661
+ 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%)}}"]
15662
+ })
15663
+ ], ProgressBarIndeterminateComponent);
15664
+ return ProgressBarIndeterminateComponent;
15665
+ }());
15666
+
15584
15667
  var ProgressBarModule = /** @class */ (function () {
15585
15668
  function ProgressBarModule() {
15586
15669
  }
15587
15670
  ProgressBarModule = __decorate([
15588
15671
  core.NgModule({
15589
15672
  imports: [common.CommonModule],
15590
- declarations: [ProgressBarComponent],
15673
+ declarations: [
15674
+ ProgressBarComponent,
15675
+ ProgressBarDeterminateComponent,
15676
+ ProgressBarIndeterminateComponent,
15677
+ ],
15591
15678
  exports: [ProgressBarComponent],
15592
15679
  })
15593
15680
  ], ProgressBarModule);
15594
15681
  return ProgressBarModule;
15595
15682
  }());
15596
15683
 
15597
-
15598
- (function (ProgressBarColors) {
15599
- ProgressBarColors["Blue"] = "blue";
15600
- ProgressBarColors["Green"] = "green";
15601
- ProgressBarColors["Red"] = "red";
15602
- ProgressBarColors["Yellow"] = "yellow";
15603
- })(exports.ProgressBarColors || (exports.ProgressBarColors = {}));
15604
-
15605
15684
  var RatingScaleComponent = /** @class */ (function () {
15606
15685
  function RatingScaleComponent() {
15607
15686
  this.disabled = false;
@@ -16309,6 +16388,8 @@
16309
16388
  exports.ɵcn = TieredMenuNestedComponent;
16310
16389
  exports.ɵco = TieredMenuItemComponent;
16311
16390
  exports.ɵcp = TieredMenuDividerComponent;
16391
+ exports.ɵcq = ProgressBarDeterminateComponent;
16392
+ exports.ɵcr = ProgressBarIndeterminateComponent;
16312
16393
  exports.ɵd = LocalizedCurrencyImpurePipe;
16313
16394
  exports.ɵe = LocalizedBignumberPipe;
16314
16395
  exports.ɵf = LocalizedBignumberImpurePipe;