@datarailsshared/datarailsshared 1.4.20-tigers → 1.4.21-tigers

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.
@@ -1785,6 +1785,7 @@
1785
1785
  var DrAvatarComponent = /** @class */ (function () {
1786
1786
  function DrAvatarComponent() {
1787
1787
  this.warning = false;
1788
+ this.showUnassigned = false;
1788
1789
  this.userClicked = new i0.EventEmitter();
1789
1790
  this.parsedUsers = [];
1790
1791
  }
@@ -1816,15 +1817,16 @@
1816
1817
  DrAvatarComponent.decorators = [
1817
1818
  { type: i0.Component, args: [{
1818
1819
  selector: 'dr-avatar',
1819
- template: "<div class=\"users-section\">\n <div *ngIf=\"!parsedUsers.length\"\n class=\"users-section__default\">\n </div>\n\n <div *ngFor=\"let user of getFirstUsers()\"\n class=\"users-section__user\"\n [class]=\"'icon-' + user.colorNumber + ' ' + user.status\"\n (click)=\"userClicked.emit()\"\n [matTooltip]=\"user | drAvatar\"\n [matTooltipPosition]=\"'below'\">\n {{user | drAvatar: 'initials'}}\n </div>\n\n <div *ngIf=\"parsedUsers.length > 2\"\n class=\"users-section__user icon-2\"\n [drTooltip]=\"usersTemplate\"\n [drTooltipPosition]=\"'bottom'\">\n {{getLastUsers().length}}\n </div>\n</div>\n\n<ng-template #usersTemplate>\n <div *ngFor=\"let user of getLastUsers()\" class=\"users-popover-item\">\n <div class=\"users-section__user\"\n (click)=\"userClicked.emit()\"\n [class]=\"user.class\">\n {{user | drAvatar: 'initials'}}\n </div>\n <span class=\"username\">\n {{user | drAvatar}}\n </span>\n </div>\n</ng-template>\n",
1820
+ template: "<div class=\"users-section\">\n <div *ngIf=\"!parsedUsers.length\"\n class=\"users-section__default\">\n </div>\n\n <div *ngFor=\"let user of getFirstUsers()\"\n class=\"users-section__user\"\n [class]=\"'icon-' + user.colorNumber + ' ' + user.status\"\n [ngClass]=\"{ 'users-section__default': showUnassigned && !user.email }\"\n (click)=\"userClicked.emit()\"\n [matTooltip]=\"user | drAvatar\"\n [matTooltipPosition]=\"'below'\">\n {{user | drAvatar: 'initials'}}\n </div>\n\n <div *ngIf=\"parsedUsers.length > 2\"\n class=\"users-section__user icon-2\"\n [drTooltip]=\"usersTemplate\"\n [drTooltipPosition]=\"'bottom'\">\n {{getLastUsers().length}}\n </div>\n</div>\n\n<ng-template #usersTemplate>\n <div *ngFor=\"let user of getLastUsers()\" class=\"users-popover-item\">\n <div class=\"users-section__user\"\n (click)=\"userClicked.emit()\"\n [class]=\"user.class\">\n {{user | drAvatar: 'initials'}}\n </div>\n <span class=\"username\">\n {{user | drAvatar}}\n </span>\n </div>\n</ng-template>\n",
1820
1821
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1821
- styles: [":host{width:auto}.users-section{display:flex;height:28px}.users-section__default{display:flex;height:28px;width:28px;border-radius:14px;background:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%23E5E6EA%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M15 9.75C15 11.4069 13.6569 12.75 12 12.75C10.3431 12.75 9 11.4069 9 9.75C9 8.09315 10.3431 6.75 12 6.75C13.6569 6.75 15 8.09315 15 9.75ZM13.875 9.75C13.875 10.7855 13.0355 11.625 12 11.625C10.9645 11.625 10.125 10.7855 10.125 9.75C10.125 8.71447 10.9645 7.875 12 7.875C13.0355 7.875 13.875 8.71447 13.875 9.75Z%22 fill%3D%22%2351566F%22%2F%3E%3Cpath d%3D%22M15.9968 16.7631C15.5425 15.3973 14.0368 14.25 12 14.25C9.9632 14.25 8.45748 15.3973 8.00319 16.7631C7.91242 17.0359 7.67416 17.25 7.38657 17.25C7.04536 17.25 6.77507 16.9539 6.86275 16.6241C7.39546 14.6206 9.49327 13.125 12 13.125C14.5067 13.125 16.6045 14.6206 17.1373 16.6241C17.2249 16.9539 16.9546 17.25 16.6134 17.25C16.3259 17.25 16.0876 17.0359 15.9968 16.7631Z%22 fill%3D%22%2351566F%22%2F%3E%3C%2Fsvg%3E\") no-repeat;background-size:cover}.users-popover-item{display:flex;align-items:center;margin:12px}.users-popover-item .username{color:#51566f;font-size:14px}.users-popover-item .users-section__user{margin-right:8px}.users-section__user{position:relative;display:flex;justify-content:center;align-items:center;height:28px;width:28px;border-radius:14px;background:red;color:#fff;font-size:12px}.users-section__user.icon-0{background-color:#7b61ff}.users-section__user.icon-1{background-color:#21b8f1}.users-section__user.icon-2{background-color:#2969b0}.users-section__user.icon-3{background-color:#51566f}.users-section__user.icon-4{background-color:#0061ff}.users-section__user:hover{cursor:pointer}.users-section__user:not(:first-child){margin-left:4px}.users-section__user.online:after,.users-section__user.offline:after,.users-section__user.warning:after{content:\"\";display:flex;width:8px;height:8px;position:absolute;border-radius:4px;top:-2px;right:0}.users-section__user.online:after{background:#03A678}.users-section__user.offline:after{background:#DE2833}.users-section__user.warning:after{background:#FDA014}\n"]
1822
+ styles: [":host{width:auto}.users-section{display:flex;height:28px}.users-section__default{display:flex;height:28px;width:28px;border-radius:14px;background:url(\"data:image/svg+xml,%3Csvg width%3D%2224%22 height%3D%2224%22 viewBox%3D%220 0 24 24%22 fill%3D%22none%22 xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%23E5E6EA%22%2F%3E%3Cpath fill-rule%3D%22evenodd%22 clip-rule%3D%22evenodd%22 d%3D%22M15 9.75C15 11.4069 13.6569 12.75 12 12.75C10.3431 12.75 9 11.4069 9 9.75C9 8.09315 10.3431 6.75 12 6.75C13.6569 6.75 15 8.09315 15 9.75ZM13.875 9.75C13.875 10.7855 13.0355 11.625 12 11.625C10.9645 11.625 10.125 10.7855 10.125 9.75C10.125 8.71447 10.9645 7.875 12 7.875C13.0355 7.875 13.875 8.71447 13.875 9.75Z%22 fill%3D%22%2351566F%22%2F%3E%3Cpath d%3D%22M15.9968 16.7631C15.5425 15.3973 14.0368 14.25 12 14.25C9.9632 14.25 8.45748 15.3973 8.00319 16.7631C7.91242 17.0359 7.67416 17.25 7.38657 17.25C7.04536 17.25 6.77507 16.9539 6.86275 16.6241C7.39546 14.6206 9.49327 13.125 12 13.125C14.5067 13.125 16.6045 14.6206 17.1373 16.6241C17.2249 16.9539 16.9546 17.25 16.6134 17.25C16.3259 17.25 16.0876 17.0359 15.9968 16.7631Z%22 fill%3D%22%2351566F%22%2F%3E%3C%2Fsvg%3E\") no-repeat!important;background-size:cover}.users-popover-item{display:flex;align-items:center;margin:12px}.users-popover-item .username{color:#51566f;font-size:14px}.users-popover-item .users-section__user{margin-right:8px}.users-section__user{position:relative;display:flex;justify-content:center;align-items:center;height:28px;width:28px;border-radius:14px;background:red;color:#fff;font-size:12px}.users-section__user.icon-0{background-color:#7b61ff}.users-section__user.icon-1{background-color:#21b8f1}.users-section__user.icon-2{background-color:#2969b0}.users-section__user.icon-3{background-color:#51566f}.users-section__user.icon-4{background-color:#0061ff}.users-section__user:hover{cursor:pointer}.users-section__user:not(:first-child){margin-left:4px}.users-section__user.online:after,.users-section__user.offline:after,.users-section__user.warning:after{content:\"\";display:flex;width:8px;height:8px;position:absolute;border-radius:4px;top:-2px;right:0}.users-section__user.online:after{background:#03A678}.users-section__user.offline:after{background:#DE2833}.users-section__user.warning:after{background:#FDA014}\n"]
1822
1823
  },] }
1823
1824
  ];
1824
1825
  DrAvatarComponent.ctorParameters = function () { return []; };
1825
1826
  DrAvatarComponent.propDecorators = {
1826
1827
  users: [{ type: i0.Input }],
1827
1828
  warning: [{ type: i0.Input }],
1829
+ showUnassigned: [{ type: i0.Input }],
1828
1830
  userClicked: [{ type: i0.Output }]
1829
1831
  };
1830
1832
 
@@ -1834,7 +1836,8 @@
1834
1836
  DrAvatarPipe.prototype.transform = function (item, type) {
1835
1837
  if (type === void 0) { type = 'full'; }
1836
1838
  if (type === 'initials') {
1837
- return (item.first_name && item.last_name ? (item.first_name[0] + item.last_name[0]) : item.email[0]).toUpperCase();
1839
+ var email = item.email ? item.email[0] : '';
1840
+ return (item.first_name && item.last_name ? (item.first_name[0] + item.last_name[0]) : email).toUpperCase();
1838
1841
  }
1839
1842
  return item.first_name && item.last_name ? (item.first_name + ' ' + item.last_name) : item.email;
1840
1843
  };