@seniorsistemas/angular-components 16.12.4 → 16.13.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.
Files changed (32) hide show
  1. package/bundles/seniorsistemas-angular-components.umd.js +81 -5
  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/rating-scale/index.d.ts +3 -0
  6. package/components/rating-scale/models/index.d.ts +1 -0
  7. package/components/rating-scale/models/rating-scale-node.d.ts +5 -0
  8. package/components/rating-scale/rating-scale.component.d.ts +15 -0
  9. package/components/rating-scale/rating-scale.module.d.ts +2 -0
  10. package/esm2015/components/rating-scale/index.js +3 -0
  11. package/esm2015/components/rating-scale/models/index.js +1 -0
  12. package/esm2015/components/rating-scale/models/rating-scale-node.js +1 -0
  13. package/esm2015/components/rating-scale/rating-scale.component.js +52 -0
  14. package/esm2015/components/rating-scale/rating-scale.module.js +19 -0
  15. package/esm2015/components/tile/tile.component.js +5 -4
  16. package/esm2015/components/tile/tile.module.js +11 -4
  17. package/esm2015/public-api.js +2 -1
  18. package/esm5/components/rating-scale/index.js +3 -0
  19. package/esm5/components/rating-scale/models/index.js +1 -0
  20. package/esm5/components/rating-scale/models/rating-scale-node.js +1 -0
  21. package/esm5/components/rating-scale/rating-scale.component.js +54 -0
  22. package/esm5/components/rating-scale/rating-scale.module.js +22 -0
  23. package/esm5/components/tile/tile.component.js +5 -4
  24. package/esm5/components/tile/tile.module.js +11 -4
  25. package/esm5/public-api.js +2 -1
  26. package/fesm2015/seniorsistemas-angular-components.js +75 -6
  27. package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
  28. package/fesm5/seniorsistemas-angular-components.js +80 -6
  29. package/fesm5/seniorsistemas-angular-components.js.map +1 -1
  30. package/package.json +1 -1
  31. package/public-api.d.ts +1 -0
  32. package/seniorsistemas-angular-components.metadata.json +1 -1
@@ -10482,8 +10482,9 @@
10482
10482
  configurable: true
10483
10483
  });
10484
10484
  TileComponent.prototype.onKeyDown = function (event) {
10485
- if (!this.disabled && [13, 32].includes(event.keyCode))
10485
+ if (!this.disabled && [13, 32].includes(event.keyCode)) {
10486
10486
  this.onClick.emit();
10487
+ }
10487
10488
  };
10488
10489
  var TileComponent_1;
10489
10490
  TileComponent.nextId = 0;
@@ -10520,8 +10521,8 @@
10520
10521
  TileComponent = TileComponent_1 = __decorate([
10521
10522
  core.Component({
10522
10523
  selector: "s-tile",
10523
- template: "<div [id]=\"id\" class=\"container\" [attr.tabindex]=\"disabled ? undefined : tabIndex\" [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"disabled\" role=\"button\" [ngClass]=\"{'disabled': disabled}\" (click)=\"!disabled && onClick.emit($event)\">\n <div class=\"thumbnail-container\" *ngIf=\"imageSource || iconClass\">\n <s-thumbnail [id]=\"id + '-thumbnail'\" *ngIf=\"imageSource\" [imageSource]=\"imageSource\" [imageAlt]=\"imageAlt || label\"\n size=\"small\" [isTile]=\"true\"></s-thumbnail>\n\n <span [id]=\"id + '-icon'\" *ngIf=\"!imageSource && iconClass\" [class]=\"'icon ' + iconClass\" aria-hidden=\"true\"></span>\n </div>\n <div class=\"first-letter-container\" *ngIf=\"!iconClass && !imageSource\">\n <div class=\"first-letter-span\">\n <span>{{initialLetter}}</span>\n </div>\n </div>\n\n <div class=\"info-container\">\n <span [id]=\"id + '-label'\" class=\"label\" [pTooltip]=\"label\" tooltipPosition=\"top\" showDelay=\"500\">{{label}}</span>\n <span [id]=\"id + '-description'\" class=\"description\" [pTooltip]=\"description\" tooltipPosition=\"top\" showDelay=\"500\">{{description}}</span>\n </div>\n</div>\n",
10524
- styles: [":host{display:block}.container{position:relative;background-color:#fff;border:1px solid #ddd;padding:15px;-ms-flex-align:center;align-items:center;cursor:pointer;min-height:80px;overflow:hidden;display:-ms-flexbox;display:flex;transition:background-color .2s ease-out,border-color .2s ease-out}.container:focus:not(.disabled),.container:hover:not(.disabled){background-color:rgba(221,221,221,.2);outline:0}.container.disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}.container.disabled,.container.disabled *{cursor:text!important}.thumbnail-container+.info-container{margin-left:15px}.info-container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden}.info-container span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label{color:#428bca;font-size:12pt}.description{color:#999}.icon{color:#428bca;font-size:40px}.first-letter-container{position:relative;float:left;margin-right:10px;text-align:center}.first-letter-container .first-letter-span{margin:0 auto 5px;font-size:22px;line-height:1.8em;width:40px;height:40px;border-radius:100%;background-color:#428bca;color:#fff}"]
10524
+ template: "<div\n [id]=\"id\"\n class=\"tile\"\n [attr.tabindex]=\"disabled ? undefined : tabIndex\"\n [attr.aria-label]=\"label\"\n [attr.aria-disabled]=\"disabled\"\n role=\"button\"\n [ngClass]=\"{'tile--disabled': disabled}\"\n (click)=\"!disabled && onClick.emit($event)\">\n <div\n *ngIf=\"imageSource || iconClass\"\n class=\"thumbnail\">\n <s-thumbnail\n *ngIf=\"imageSource\" \n [id]=\"id + '-thumbnail'\"\n [imageSource]=\"imageSource\"\n [imageAlt]=\"imageAlt || label\"\n size=\"small\"\n [isTile]=\"true\">\n </s-thumbnail>\n <span\n *ngIf=\"!imageSource && iconClass\" \n [id]=\"id + '-icon'\"\n [class]=\"'icon ' + iconClass\"\n aria-hidden=\"true\">\n </span>\n </div>\n <div\n *ngIf=\"!iconClass && !imageSource\"\n class=\"first-letter-container\">\n <div class=\"first-letter\">\n <span>{{ initialLetter }}</span>\n </div>\n </div>\n\n <div class=\"info\">\n <span\n [id]=\"id + '-title'\"\n class=\"title\"\n [sTooltip]=\"label\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n {{ label }}\n </span>\n <span\n [id]=\"id + '-description'\"\n class=\"description\"\n [sTooltip]=\"description\"\n tooltipPosition=\"top\"\n showDelay=\"500\">\n {{ description }}\n </span>\n </div>\n</div>\n",
10525
+ styles: [".tile{-ms-flex-align:center;align-items:center;background-color:#fff;border:1px solid #c1c1cc;cursor:pointer;display:-ms-flexbox;display:flex;min-height:80px;overflow:hidden;padding:15px;position:relative;transition:background-color .2s ease-out,border-color .2s ease-out}.tile--disabled{opacity:.5;filter:Alpha(Opacity=50);background-image:none}.tile--disabled,.tile--disabled *{cursor:text!important}.tile:focus:not(.tile--disabled),.tile:hover:not(.tile--disabled){background-color:#eeebf2;outline:0}.tile .thumbnail{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;margin-right:15px}.tile .thumbnail .icon{color:#428bca;font-size:2.5rem}.tile .info{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;overflow:hidden}.tile .info .description,.tile .info .title{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tile .info .title{color:#428bca;font-size:1.25rem}.tile .info .description{color:#6e7280;font-size:.875rem}.tile .first-letter-container{float:left;margin-right:10px;position:relative;text-align:center}.tile .first-letter-container .first-letter{background-color:#428bca;border-radius:50%;color:#fff;font-size:1.375rem;height:40px;line-height:1.8em;margin:0 auto 5px;width:40px}"]
10525
10526
  })
10526
10527
  ], TileComponent);
10527
10528
  return TileComponent;
@@ -10532,9 +10533,16 @@
10532
10533
  }
10533
10534
  TileModule = __decorate([
10534
10535
  core.NgModule({
10535
- imports: [common.CommonModule, tooltip.TooltipModule, ThumbnailModule],
10536
+ imports: [
10537
+ common.CommonModule,
10538
+ TooltipModule,
10539
+ ThumbnailModule,
10540
+ ],
10536
10541
  declarations: [TileComponent],
10537
- exports: [TileComponent, ThumbnailModule],
10542
+ exports: [
10543
+ TileComponent,
10544
+ ThumbnailModule,
10545
+ ],
10538
10546
  })
10539
10547
  ], TileModule);
10540
10548
  return TileModule;
@@ -12539,6 +12547,72 @@
12539
12547
  ProgressBarColors["Yellow"] = "yellow";
12540
12548
  })(exports.ProgressBarColors || (exports.ProgressBarColors = {}));
12541
12549
 
12550
+ var RatingScaleComponent = /** @class */ (function () {
12551
+ function RatingScaleComponent() {
12552
+ this.disabled = false;
12553
+ }
12554
+ RatingScaleComponent_1 = RatingScaleComponent;
12555
+ RatingScaleComponent.prototype.writeValue = function (value) {
12556
+ if (!this.disabled) {
12557
+ this.value = value;
12558
+ }
12559
+ };
12560
+ RatingScaleComponent.prototype.registerOnChange = function (onChange) {
12561
+ this._onChange = onChange;
12562
+ };
12563
+ RatingScaleComponent.prototype.registerOnTouched = function (onTouched) {
12564
+ this._onTouched = onTouched;
12565
+ };
12566
+ RatingScaleComponent.prototype.onSelect = function (rating) {
12567
+ this.value = rating;
12568
+ if (this._onChange) {
12569
+ this._onChange(this.value);
12570
+ }
12571
+ };
12572
+ var RatingScaleComponent_1;
12573
+ __decorate([
12574
+ core.Input()
12575
+ ], RatingScaleComponent.prototype, "nodes", void 0);
12576
+ __decorate([
12577
+ core.Input()
12578
+ ], RatingScaleComponent.prototype, "startLabel", void 0);
12579
+ __decorate([
12580
+ core.Input()
12581
+ ], RatingScaleComponent.prototype, "endLabel", void 0);
12582
+ __decorate([
12583
+ core.Input()
12584
+ ], RatingScaleComponent.prototype, "disabled", void 0);
12585
+ RatingScaleComponent = RatingScaleComponent_1 = __decorate([
12586
+ core.Component({
12587
+ selector: "s-rating-scale",
12588
+ template: "<div\n class=\"rating-scale\"\n [ngClass]=\"{ 'rating-scale--disabled': disabled }\">\n <div class=\"nodes\">\n <button\n *ngFor=\"let node of nodes; index as i\"\n class=\"node\"\n [ngClass]=\"{ 'node--selected': value?.id === node.id && !disabled }\"\n tabindex=\"0\"\n (click)=\"onSelect(node)\"> \n <span\n *ngIf=\"node.icon\"\n class=\"icon fas\"\n [ngClass]=\"node.icon\">\n </span>\n <span\n *ngIf=\"node.title\"\n class=\"label\">\n {{ node.title }}\n </span>\n </button>\n </div>\n <div class=\"labels\">\n <span>{{ startLabel }}</span>\n <span>{{ endLabel }}</span>\n </div>\n</div>",
12589
+ providers: [{
12590
+ provide: forms.NG_VALUE_ACCESSOR,
12591
+ useExisting: core.forwardRef(function () { return RatingScaleComponent_1; }),
12592
+ multi: true,
12593
+ }],
12594
+ styles: [".rating-scale{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}.rating-scale .nodes{display:-ms-flexbox;display:flex}.rating-scale .nodes .node{-ms-flex-align:center;align-items:center;background-color:#fff;border-radius:6px;display:-ms-flexbox;display:flex;-ms-flex-positive:1;flex-grow:1;-ms-flex-pack:center;justify-content:center;margin:0 2px;padding:8px;border:1px solid #7892a1}.rating-scale .nodes .node .icon{color:#6e7280;font-size:1rem}.rating-scale .nodes .node .label{color:#212533;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale .nodes .node .icon,.rating-scale .nodes .node .label{margin:6px}.rating-scale .nodes .node--selected{background-color:#d5e8ec;border-color:#428bca;color:#428bca}.rating-scale .nodes .node:first-child{margin-left:0}.rating-scale .nodes .node:last-child{margin-right:0}.rating-scale .labels{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;padding:12px 0}.rating-scale .labels span{color:#080808;font-family:\"Open Sans\" sans-serif;font-size:.875rem;font-weight:400;line-height:150%}.rating-scale--disabled{opacity:.5}.rating-scale:not(.rating-scale--disabled) .node{cursor:pointer}.rating-scale:not(.rating-scale--disabled) .node:hover{background-color:#dedce5}.rating-scale:not(.rating-scale--disabled) .node:focus{border-width:2px;outline:0}"]
12595
+ })
12596
+ ], RatingScaleComponent);
12597
+ return RatingScaleComponent;
12598
+ }());
12599
+
12600
+ var RatingScaleModule = /** @class */ (function () {
12601
+ function RatingScaleModule() {
12602
+ }
12603
+ RatingScaleModule = __decorate([
12604
+ core.NgModule({
12605
+ imports: [
12606
+ common.CommonModule,
12607
+ forms.ReactiveFormsModule,
12608
+ ],
12609
+ declarations: [RatingScaleComponent],
12610
+ exports: [RatingScaleComponent],
12611
+ })
12612
+ ], RatingScaleModule);
12613
+ return RatingScaleModule;
12614
+ }());
12615
+
12542
12616
 
12543
12617
  (function (SplitButtonType) {
12544
12618
  SplitButtonType["Primary"] = "primary";
@@ -13022,6 +13096,8 @@
13022
13096
  exports.ProgressBarComponent = ProgressBarComponent;
13023
13097
  exports.ProgressBarModule = ProgressBarModule;
13024
13098
  exports.RadioButtonField = RadioButtonField;
13099
+ exports.RatingScaleComponent = RatingScaleComponent;
13100
+ exports.RatingScaleModule = RatingScaleModule;
13025
13101
  exports.RationButtonOption = RationButtonOption;
13026
13102
  exports.RowTogllerDirective = RowTogllerDirective;
13027
13103
  exports.Section = Section;