@seniorsistemas/angular-components 16.10.17 → 16.10.18

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.
@@ -11895,6 +11895,10 @@ var WorkspaceSwitchComponent = /** @class */ (function () {
11895
11895
  WorkspaceSwitchComponent.prototype.onKeydown = function (event) {
11896
11896
  if (event.key === "Enter" || event.key === " ") {
11897
11897
  if (this.open) {
11898
+ var workspace = this.workspaces[this.selectedItemIndex];
11899
+ if (workspace.disabled) {
11900
+ return;
11901
+ }
11898
11902
  this.selectedItemIndex = this.currentItemIndex;
11899
11903
  this.selected.emit(this.workspaces[this.selectedItemIndex]);
11900
11904
  }
@@ -11929,6 +11933,9 @@ var WorkspaceSwitchComponent = /** @class */ (function () {
11929
11933
  this.currentItemIndex = this.selectedItemIndex;
11930
11934
  };
11931
11935
  WorkspaceSwitchComponent.prototype.onSelectItem = function (workspace) {
11936
+ if (workspace.disabled) {
11937
+ return;
11938
+ }
11932
11939
  this.open = false;
11933
11940
  this.selectedItemIndex = this.workspaces.indexOf(workspace);
11934
11941
  this.currentItemIndex = this.selectedItemIndex;
@@ -11971,8 +11978,8 @@ var WorkspaceSwitchComponent = /** @class */ (function () {
11971
11978
  WorkspaceSwitchComponent = __decorate([
11972
11979
  Component({
11973
11980
  selector: "s-workspace-switch",
11974
- template: "<div\n class=\"workspace-switch\"\n [ngClass]=\"{ 'workspace-switch--disabled': disabled }\"\n (blur)=\"buttonOnBlur()\">\n <div class=\"button\" (click)=\"open = !open\">\n <div class=\"item\">\n <span class=\"title\">{{ workspaces[selectedItemIndex].title }}</span>\n <span class=\"subtitle\">{{ workspaces[selectedItemIndex].subtitle }}</span>\n </div>\n <div class=\"icons\">\n <span class=\"fas fa-chevron-up\"></span>\n <span class=\"fas fa-chevron-down\"></span>\n </div>\n </div>\n <div *ngIf=\"!disabled && open\" class=\"select\">\n <div\n *ngFor=\"let workspace of workspaces; let i = index\"\n class=\"select-item\"\n [ngClass]=\"{ 'select-item--focused': i == currentItemIndex }\"\n (click)=\"onSelectItem(workspace)\">\n <div class=\"item\">\n <span class=\"title\">{{ workspace.title }}</span>\n <span class=\"subtitle\">{{ workspace.subtitle }}</span>\n </div>\n <span *ngIf=\"i === selectedItemIndex\" class=\"active-icon fas fa-check\"></span>\n </div>\n <div *ngIf=\"showFooterButton\" class=\"footer\">\n <div class=\"footer__button\" (click)=\"onFooterButtonClick()\">\n <span class=\"footer__button__icon fas fa-plus\"></span>\n <span class=\"footer__button__title\">{{ footerButtonLabel }}</span>\n </div>\n </div>\n </div>\n</div>",
11975
- styles: [".workspace-switch{border-radius:4px;border:1px solid transparent;width:324px}.workspace-switch .button{-ms-flex-align:center;align-items:center;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-ms-user-select:none;user-select:none}.workspace-switch .button .icons{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;margin:0 12px}.workspace-switch .select{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.25);cursor:pointer;margin:20px 0;padding-top:4px;position:absolute;width:324px}.workspace-switch .select .select-item{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-ms-user-select:none;user-select:none}.workspace-switch .select .select-item .active-icon{color:#7892a1;font-size:12px;margin:0 12px}.workspace-switch .select .select-item--focused,.workspace-switch .select .select-item:hover{background-color:#f1f7f8}.workspace-switch .select .footer{border-top:1px solid #ccc;padding:12px}.workspace-switch .select .footer .footer__button{-ms-flex-align:center;align-items:center;border:1px solid #d8d8d8;border-radius:4px;padding:8px 12px;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.workspace-switch .select .footer .footer__button .footer__button__icon{color:#333;margin-right:8px}.workspace-switch .select .footer .footer__button:active{border:1px solid #428bca}.workspace-switch .item{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;padding:12px}.workspace-switch .item .title{color:#333;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:700;line-height:150%;text-transform:uppercase}.workspace-switch .item .subtitle{color:#999;font-family:\"Open Sans\",sans-serif;font-size:12px;font-weight:400;line-height:150%}.workspace-switch:focus{border:1px solid #428bca}.workspace-switch--disabled .button{cursor:default}.workspace-switch--disabled .button .icons,.workspace-switch--disabled .item .subtitle,.workspace-switch--disabled .item .title{color:#ccc}"]
11981
+ template: "<div\n class=\"workspace-switch\"\n [ngClass]=\"{ 'workspace-switch--disabled': disabled }\"\n (blur)=\"buttonOnBlur()\">\n <div class=\"button\" (click)=\"open = !open\">\n <div class=\"item\">\n <span class=\"title\">{{ workspaces[selectedItemIndex].title }}</span>\n <span class=\"subtitle\">{{ workspaces[selectedItemIndex].subtitle }}</span>\n </div>\n <div class=\"icons\">\n <span class=\"fas fa-chevron-up\"></span>\n <span class=\"fas fa-chevron-down\"></span>\n </div>\n </div>\n <div *ngIf=\"!disabled && open\" class=\"select\">\n <div\n *ngFor=\"let workspace of workspaces; let i = index\"\n class=\"workspace\"\n [ngClass]=\"{\n 'workspace--focused': i == currentItemIndex && !workspace.disabled,\n 'workspace--disabled': workspace.disabled\n }\"\n (click)=\"onSelectItem(workspace)\">\n <div class=\"item\">\n <span class=\"title\">{{ workspace.title }}</span>\n <span class=\"subtitle\">{{ workspace.subtitle }}</span>\n </div>\n <span *ngIf=\"i === selectedItemIndex\" class=\"active-icon fas fa-check\"></span>\n </div>\n <div *ngIf=\"showFooterButton\" class=\"footer\">\n <div class=\"footer__button\" (click)=\"onFooterButtonClick()\">\n <span class=\"footer__button__icon fas fa-plus\"></span>\n <span class=\"footer__button__title\">{{ footerButtonLabel }}</span>\n </div>\n </div>\n </div>\n</div>",
11982
+ styles: [".workspace-switch{border-radius:4px;border:1px solid transparent;width:324px}.workspace-switch .button{-ms-flex-align:center;align-items:center;background-color:#fff;border:none;border-radius:3px;cursor:pointer;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-ms-user-select:none;user-select:none;width:100%}.workspace-switch .button .icons{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;margin:0 12px}.workspace-switch .select{background-color:#fff;border-radius:4px;box-shadow:0 1px 5px rgba(0,0,0,.25);cursor:pointer;margin:20px 0;padding-top:4px;position:absolute;width:324px}.workspace-switch .select .workspace{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between;-webkit-user-select:none;-ms-user-select:none;user-select:none}.workspace-switch .select .workspace .active-icon{color:#7892a1;font-size:12px;margin:0 12px}.workspace-switch .select .workspace--focused{background-color:#f1f7f8}.workspace-switch .select .workspace--disabled .item .subtitle,.workspace-switch .select .workspace--disabled .item .title{color:#c1c1cc}.workspace-switch .select .workspace:hover:not(.workspace--disabled){background-color:#f1f7f8}.workspace-switch .select .footer{border-top:1px solid #ccc;padding:12px}.workspace-switch .select .footer .footer__button{-ms-flex-align:center;align-items:center;border:1px solid #d8d8d8;border-radius:4px;padding:8px 12px;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.workspace-switch .select .footer .footer__button .footer__button__icon{color:#333;margin-right:8px}.workspace-switch .select .footer .footer__button:active{border:1px solid #428bca}.workspace-switch .item{-ms-flex-align:start;align-items:flex-start;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:justify;justify-content:space-between;padding:12px}.workspace-switch .item .title{color:#333;font-family:\"Open Sans\",sans-serif;font-size:14px;font-weight:700;line-height:150%;text-transform:uppercase}.workspace-switch .item .subtitle{color:#999;font-family:\"Open Sans\",sans-serif;font-size:12px;font-weight:400;line-height:150%}.workspace-switch:focus{border:1px solid #428bca}.workspace-switch--disabled .button{cursor:default}.workspace-switch--disabled .button .icons,.workspace-switch--disabled .item .subtitle,.workspace-switch--disabled .item .title{color:#ccc}"]
11976
11983
  })
11977
11984
  ], WorkspaceSwitchComponent);
11978
11985
  return WorkspaceSwitchComponent;