@datarailsshared/datarailsshared 1.3.20 → 1.3.21

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.
@@ -0,0 +1,4 @@
1
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <rect width="24" height="24" rx="12" fill="#BCBCBC"/>
3
+ <path d="M11.9993 11.9998C13.6108 11.9998 14.916 10.691 14.916 9.08317C14.916 7.47171 13.6108 6.1665 11.9993 6.1665C10.3879 6.1665 9.08268 7.47171 9.08268 9.08317C9.08268 10.691 10.3879 11.9998 11.9993 11.9998ZM11.9993 13.4582C10.0561 13.4582 6.16602 14.4316 6.16602 16.3748V17.8332H17.8327V16.3748C17.8327 14.4316 13.9426 13.4582 11.9993 13.4582Z" fill="white"/>
4
+ </svg>
@@ -1221,10 +1221,23 @@
1221
1221
  function CheckboxComponent(cdr) {
1222
1222
  this.cdr = cdr;
1223
1223
  this.disabled = false;
1224
+ this.icon = '';
1225
+ this._indeterminate = false;
1224
1226
  this.checkedChange = new i0.EventEmitter();
1225
1227
  this.onChange = function () { };
1226
1228
  this.onTouched = function () { };
1227
1229
  }
1230
+ Object.defineProperty(CheckboxComponent.prototype, "indeterminate", {
1231
+ get: function () {
1232
+ return this._indeterminate;
1233
+ },
1234
+ set: function (value) {
1235
+ this._indeterminate = !!value;
1236
+ this.cdr.markForCheck();
1237
+ },
1238
+ enumerable: false,
1239
+ configurable: true
1240
+ });
1228
1241
  CheckboxComponent.prototype.writeValue = function (value) {
1229
1242
  this.checkedStatus = value;
1230
1243
  this.cdr.markForCheck();
@@ -1238,10 +1251,12 @@
1238
1251
  CheckboxComponent.prototype.setDisabledState = function (isDisabled) {
1239
1252
  this.disabled = isDisabled;
1240
1253
  };
1241
- CheckboxComponent.prototype.setValue = function () {
1242
- this.checkedStatus = !this.checkedStatus;
1243
- this.onChange(this.checkedStatus);
1254
+ CheckboxComponent.prototype.setValue = function (event) {
1255
+ var input = event.target;
1256
+ this.checkedStatus = input.checked;
1244
1257
  this.checkedChange.emit(this.checkedStatus);
1258
+ this.onChange(this.checkedStatus);
1259
+ this.indeterminate = input.indeterminate;
1245
1260
  this.onTouched();
1246
1261
  };
1247
1262
  return CheckboxComponent;
@@ -1249,13 +1264,12 @@
1249
1264
  CheckboxComponent.decorators = [
1250
1265
  { type: i0.Component, args: [{
1251
1266
  selector: 'dr-checkbox',
1252
- template: "<label>\r\n <input\r\n type=\"checkbox\"\r\n [checked]=\"checkedStatus\"\r\n [disabled]=\"disabled\"\r\n (click)=\"setValue()\">\r\n <span>\r\n <ng-content></ng-content>\r\n </span>\r\n</label>\r\n",
1267
+ template: "<label>\r\n <input type=\"checkbox\"\r\n [checked]=\"checkedStatus\"\r\n [disabled]=\"disabled\"\r\n (change)=\"setValue($event)\"\r\n (click)=\"$event.stopPropagation()\">\r\n <span [class]=\"icon\" [class.indeterminate]=\"indeterminate\">\r\n <ng-content></ng-content>\r\n </span>\r\n</label>\r\n",
1253
1268
  providers: [
1254
1269
  { provide: forms.NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }
1255
1270
  ],
1256
1271
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1257
- encapsulation: i0.ViewEncapsulation.ShadowDom,
1258
- styles: ["input+span{vertical-align:middle;line-height:30px}input+span,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;min-height:12px;line-height:12px;min-width:12px;margin-right:5px;border:1.5px solid #85889C;background-color:#f4f4f4;font-weight:normal;margin-top:-1px}label input+span:before,label:hover input+span:before{background-color:#fff;border-color:#85889c;color:#579bf2;border-radius:2px}label input:checked+span:before,label:hover input:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M1 5L4.5 8.5L11 1.5\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/> </svg>');background:#579BF2;border-color:#579bf2;color:#fff}label input:disabled+span:before{border-color:#bcbcbc;pointer-events:none}label input[disabled]:checked+span:before{background:#BCBCBC;border-color:#bcbcbc;pointer-events:none}label input:not([disabled])+span:hover:after{content:\"\";width:28px;height:28px;background:#F6F7F8;border-radius:50%;position:absolute;left:-6px;top:-5px;z-index:-1}\n"]
1272
+ styles: ["input+span{vertical-align:middle;line-height:30px}input+span,input+span:before{box-sizing:content-box!important;-webkit-box-sizing:content-box!important;-moz-box-sizing:content-box!important}input{visibility:hidden;position:absolute;width:0}label input+span{position:relative;z-index:19;display:inline-block;margin:0 5px 0 0;line-height:17px;min-height:14px;min-width:14px}label input+span:hover{cursor:pointer}label input+span:before{content:\"\";font-size:14px;border-radius:0;display:inline-block;text-align:center;vertical-align:middle;padding:1px;min-height:12px;line-height:12px;min-width:12px;margin-right:5px;border:1.5px solid #85889C;background-color:#f4f4f4;font-weight:normal;margin-top:-1px}label input+span:before,label:hover input+span:before{background-color:#fff;border-color:#85889c;color:#579bf2;border-radius:2px}label input:checked+span:before,label:hover input:checked+span:before{content:url('data:image/svg+xml; utf8, <svg width=\"12\" height=\"10\" viewBox=\"0 0 12 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path d=\"M1 5L4.5 8.5L11 1.5\" stroke=\"white\" stroke-width=\"1.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/> </svg>');background:#579BF2;border-color:#579bf2;color:#fff}label input:checked+span.cross:before,label:hover input:checked+span.cross:before{content:url('data:image/svg+xml; utf8, <svg width=\"10\" height=\"10\" viewBox=\"0 0 10 10\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M5.91786 4.99992L9.03356 1.88386C9.11927 1.79808 9.16654 1.68365 9.16668 1.56162C9.16668 1.43952 9.1194 1.32495 9.03356 1.23931L8.7605 0.966323C8.67466 0.880342 8.56026 0.833252 8.43811 0.833252C8.31615 0.833252 8.20169 0.880342 8.11585 0.966323L5.00016 4.08218L1.88431 0.966323C1.79861 0.880342 1.68407 0.833252 1.56199 0.833252C1.44004 0.833252 1.32559 0.880342 1.23988 0.966323L0.966677 1.23931C0.788899 1.4171 0.788899 1.70628 0.966677 1.88386L4.08245 4.99992L0.966677 8.11584C0.880904 8.20175 0.833707 8.31619 0.833707 8.43822C0.833707 8.56025 0.880904 8.67468 0.966677 8.76053L1.23981 9.03351C1.32551 9.11943 1.44003 9.16658 1.56191 9.16658C1.684 9.16658 1.79853 9.11943 1.88424 9.03351L5.00008 5.91759L8.11578 9.03351C8.20162 9.11943 8.31608 9.16658 8.43803 9.16658C8.56005 9.16658 8.67459 9.11943 8.76043 9.03351L9.03349 8.76053C9.11919 8.67475 9.16646 8.56025 9.16646 8.43822C9.16646 8.31619 9.11919 8.20175 9.03349 8.11591L5.91786 4.99992Z\" fill=\"white\"/></svg>')}label input+span.indeterminate:before,label:hover input+span.indeterminate:before{content:url('data:image/svg+xml; utf8, <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"> <path fill-rule=\"evenodd\" clip-rule=\"evenodd\" d=\"M6.25 12C6.25 11.5858 6.58579 11.25 7 11.25L17 11.25C17.4142 11.25 17.75 11.5858 17.75 12C17.75 12.4142 17.4142 12.75 17 12.75L7 12.75C6.58579 12.75 6.25 12.4142 6.25 12Z\" fill=\"white\"/></svg>');background:#579BF2;border-color:#579bf2;color:#fff}label input:disabled+span:before{border-color:#bcbcbc;pointer-events:none}label input[disabled]:checked+span:before{background:#BCBCBC;border-color:#bcbcbc;pointer-events:none}label input:not([disabled])+span:hover:after{content:\"\";width:28px;height:28px;background:#F6F7F8;border-radius:50%;position:absolute;left:-6px;top:-5px;z-index:-1}\n"]
1259
1273
  },] }
1260
1274
  ];
1261
1275
  CheckboxComponent.ctorParameters = function () { return [
@@ -1264,6 +1278,8 @@
1264
1278
  CheckboxComponent.propDecorators = {
1265
1279
  checkedStatus: [{ type: i0.Input }],
1266
1280
  disabled: [{ type: i0.Input }],
1281
+ icon: [{ type: i0.Input }],
1282
+ indeterminate: [{ type: i0.Input }],
1267
1283
  checkedChange: [{ type: i0.Output }]
1268
1284
  };
1269
1285
 
@@ -1512,28 +1528,24 @@
1512
1528
 
1513
1529
  var DrAvatarComponent = /** @class */ (function () {
1514
1530
  function DrAvatarComponent() {
1531
+ this.warning = false;
1515
1532
  this.userClicked = new i0.EventEmitter();
1516
1533
  this.parsedUsers = [];
1517
1534
  }
1518
1535
  Object.defineProperty(DrAvatarComponent.prototype, "users", {
1519
- set: function (user) {
1520
- if (user) {
1521
- this.parsedUsers = this.parseUsers(user);
1536
+ set: function (users) {
1537
+ if (users) {
1538
+ this.parsedUsers = Array.isArray(users) ? users : [users];
1539
+ this.parsedUsers.forEach(function (user, index) {
1540
+ if (!user.colorNumber) {
1541
+ user.colorNumber = index % 5;
1542
+ }
1543
+ });
1522
1544
  }
1523
1545
  },
1524
1546
  enumerable: false,
1525
1547
  configurable: true
1526
1548
  });
1527
- DrAvatarComponent.prototype.ngOnChanges = function (changes) {
1528
- var _this = this;
1529
- if (changes.users) {
1530
- this.getFirstUsers().forEach(function (user) { return user.class = "icon-" + _this.getRandomValue(5); });
1531
- this.getLastUsers().forEach(function (user) { return user.class = "icon-" + _this.getRandomValue(5); });
1532
- }
1533
- };
1534
- DrAvatarComponent.prototype.parseUsers = function (value) {
1535
- return Array.isArray(value) ? value : Array.of(value);
1536
- };
1537
1549
  DrAvatarComponent.prototype.getFirstUsers = function () {
1538
1550
  return this.parsedUsers.slice(0, 2);
1539
1551
  };
@@ -1543,25 +1555,41 @@
1543
1555
  }
1544
1556
  return [];
1545
1557
  };
1546
- DrAvatarComponent.prototype.getRandomValue = function (limit) {
1547
- return ~~(limit * Math.random());
1548
- };
1549
1558
  return DrAvatarComponent;
1550
1559
  }());
1551
1560
  DrAvatarComponent.decorators = [
1552
1561
  { type: i0.Component, args: [{
1553
1562
  selector: 'dr-avatar',
1554
- template: "<div class=\"users-section\">\r\n <div class=\"users-section__user\"\r\n [class]=\"user.class\"\r\n *ngFor=\"let user of getFirstUsers()\"\r\n (click)=\"userClicked.emit()\"\r\n [matTooltip]=\"user.first_name + ' ' + user.last_name\"\r\n [matTooltipPosition]=\"'below'\">\r\n {{user.first_name[0] + user.last_name[0]}}\r\n </div>\r\n\r\n <div class=\"users-section__user icon-2\" *ngIf=\"parsedUsers.length > 2\"\r\n [drTooltip]=\"usersTemplate\"\r\n [drTooltipPosition]=\"'bottom'\">\r\n {{getLastUsers().length}}\r\n </div>\r\n</div>\r\n\r\n<ng-template #usersTemplate>\r\n <div *ngFor=\"let user of getLastUsers()\" class=\"users-popover-item\">\r\n <div class=\"users-section__user\"\r\n (click)=\"userClicked.emit()\"\r\n [class]=\"user.class\">\r\n {{user.first_name[0] + user.last_name[0]}}\r\n </div>\r\n <span class=\"username\">\r\n {{user.first_name + ' ' + user.last_name}}\r\n </span>\r\n </div>\r\n</ng-template>\r\n",
1563
+ template: "<div class=\"users-section\">\r\n <div *ngIf=\"!parsedUsers.length\"\r\n class=\"users-section__default\"\r\n [drTooltip]=\"usersTemplate\"\r\n [drTooltipPosition]=\"'bottom'\">\r\n {{getLastUsers().length}}\r\n </div>\r\n\r\n <div *ngFor=\"let user of getFirstUsers()\"\r\n class=\"users-section__user\"\r\n [class]=\"'icon-' + user.colorNumber\"\r\n [class.warning]=\"warning && warning[user.email]\"\r\n (click)=\"userClicked.emit()\"\r\n [matTooltip]=\"user | drAvatar\"\r\n [matTooltipPosition]=\"'below'\">\r\n {{user | drAvatar: 'initials'}}\r\n </div>\r\n\r\n <div *ngIf=\"parsedUsers.length > 2\"\r\n class=\"users-section__user icon-2\"\r\n [drTooltip]=\"usersTemplate\"\r\n [drTooltipPosition]=\"'bottom'\">\r\n {{getLastUsers().length}}\r\n </div>\r\n</div>\r\n\r\n<ng-template #usersTemplate>\r\n <div *ngFor=\"let user of getLastUsers()\" class=\"users-popover-item\">\r\n <div class=\"users-section__user\"\r\n (click)=\"userClicked.emit()\"\r\n [class]=\"user.class\">\r\n {{user | drAvatar: 'initials'}}\r\n </div>\r\n <span class=\"username\">\r\n {{user | drAvatar}}\r\n </span>\r\n </div>\r\n</ng-template>\r\n",
1555
1564
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1556
- styles: [":host{width:auto}.users-section{display:flex;position:absolute;height:28px;top:5px}.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{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}\n"]
1565
+ 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%0D%3Crect width%3D%2224%22 height%3D%2224%22 rx%3D%2212%22 fill%3D%22%23BCBCBC%22%2F%3E%0D%3Cpath d%3D%22M11.9993 11.9998C13.6108 11.9998 14.916 10.691 14.916 9.08317C14.916 7.47171 13.6108 6.1665 11.9993 6.1665C10.3879 6.1665 9.08268 7.47171 9.08268 9.08317C9.08268 10.691 10.3879 11.9998 11.9993 11.9998ZM11.9993 13.4582C10.0561 13.4582 6.16602 14.4316 6.16602 16.3748V17.8332H17.8327V16.3748C17.8327 14.4316 13.9426 13.4582 11.9993 13.4582Z%22 fill%3D%22white%22%2F%3E%0D%3C%2Fsvg%3E%0D\") no-repeat}.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.warning:after{content:\"\";display:flex;width:8px;height:8px;position:absolute;background:#FDA014;border-radius:4px;top:-2px;right:0}\n"]
1557
1566
  },] }
1558
1567
  ];
1559
1568
  DrAvatarComponent.ctorParameters = function () { return []; };
1560
1569
  DrAvatarComponent.propDecorators = {
1561
1570
  users: [{ type: i0.Input }],
1571
+ warning: [{ type: i0.Input }],
1562
1572
  userClicked: [{ type: i0.Output }]
1563
1573
  };
1564
1574
 
1575
+ var DrAvatarPipe = /** @class */ (function () {
1576
+ function DrAvatarPipe() {
1577
+ }
1578
+ DrAvatarPipe.prototype.transform = function (item, type) {
1579
+ if (type === void 0) { type = 'full'; }
1580
+ if (type === 'initials') {
1581
+ return (item.first_name && item.last_name ? (item.first_name[0] + item.last_name[0]) : item.email[0]).toUpperCase();
1582
+ }
1583
+ return item.first_name && item.last_name ? (item.first_name + ' ' + item.last_name) : item.email;
1584
+ };
1585
+ return DrAvatarPipe;
1586
+ }());
1587
+ DrAvatarPipe.decorators = [
1588
+ { type: i0.Pipe, args: [{
1589
+ name: 'drAvatar'
1590
+ },] }
1591
+ ];
1592
+
1565
1593
  var POPUP_POSITIONS = {
1566
1594
  top: {
1567
1595
  originX: 'center',
@@ -2592,6 +2620,7 @@
2592
2620
  if (data) {
2593
2621
  this.option = data.option;
2594
2622
  this.position = data.position;
2623
+ this.containerClass = data.class;
2595
2624
  this.list = data.list || [];
2596
2625
  this.list.forEach(function (item) {
2597
2626
  var _a;
@@ -2670,9 +2699,9 @@
2670
2699
  DrDropdownComponent.decorators = [
2671
2700
  { type: i0.Component, args: [{
2672
2701
  selector: 'dr-dropdown',
2673
- template: "<div #menuContainer\r\n (clickOutside)=\"onClickedOutside()\"\r\n [drDropdownPosition]=\"option\"\r\n [position]=\"position\"\r\n class=\"dr-dropdown\">\r\n <div class=\"dr-dropdown__container\">\r\n <div *ngFor=\"let act of list | drDropdownItemShowPipe\"\r\n (click)=\"action(act)\"\r\n [drTooltip]=\"tooltipToShow(act)\"\r\n [drTooltipPosition]=\"'top'\"\r\n [drTooltipOptions]=\"{ withoutArrow: true }\"\r\n class=\"dr-dropdown__container__item\"\r\n [class.item-disabled]=\"disabled(act)\"\r\n [class.item-selected]=\"selected(act)\">\r\n <i *ngIf=\"act.icon\" [class]=\"act.icon\"></i>\r\n <span class=\"dr-dropdown__container__item__text\">{{act.title}}</span>\r\n <i *ngFor=\"let actionIcon of act.actionIcons\"\r\n [class]=\"actionIcon.icon\"\r\n [class.showOnHover]=\"actionIcon.showOnHover\"\r\n (click)=\"onActionIconClick($event, actionIcon, act.data)\"></i>\r\n <i *ngIf=\"act.children?.length\" class=\"dr-icon-arrow-right\"></i>\r\n <dr-dropdown *ngIf=\"act.children?.length\" [options]=\"act.childOptions\"></dr-dropdown>\r\n </div>\r\n </div>\r\n</div>\r\n",
2702
+ template: "<div #menuContainer\r\n (clickOutside)=\"onClickedOutside()\"\r\n [drDropdownPosition]=\"option\"\r\n [position]=\"position\"\r\n [class]=\"containerClass\"\r\n class=\"dr-dropdown\">\r\n <div class=\"dr-dropdown__container\">\r\n <div *ngFor=\"let act of list | drDropdownItemShowPipe\"\r\n (click)=\"action(act)\"\r\n [drTooltip]=\"tooltipToShow(act)\"\r\n [drTooltipPosition]=\"'top'\"\r\n [drTooltipOptions]=\"{ withoutArrow: true }\"\r\n class=\"dr-dropdown__container__item\"\r\n [class.item-disabled]=\"disabled(act)\"\r\n [class.item-selected]=\"selected(act)\">\r\n <i *ngIf=\"act.icon\" [class]=\"act.icon\"></i>\r\n <span class=\"dr-dropdown__container__item__text\">{{act.title}}</span>\r\n <i *ngFor=\"let actionIcon of act.actionIcons\"\r\n [class]=\"actionIcon.icon\"\r\n [class.showOnHover]=\"actionIcon.showOnHover\"\r\n (click)=\"onActionIconClick($event, actionIcon, act.data)\"></i>\r\n <i *ngIf=\"act.children?.length\" class=\"dr-icon-arrow-right\"></i>\r\n <dr-dropdown *ngIf=\"act.children?.length\" [options]=\"act.childOptions\"></dr-dropdown>\r\n </div>\r\n </div>\r\n</div>\r\n",
2674
2703
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
2675
- styles: ["::ng-deep .dr-dropdown__container__item .dr-dropdown{visibility:hidden}::ng-deep .dr-dropdown__container__item:hover .dr-dropdown{visibility:visible}.dr-dropdown{position:absolute;z-index:-1;top:0;left:0;width:auto}.dr-dropdown__container{display:flex;flex-direction:column;background:#fff;border-radius:4px;box-shadow:0 4px 8px 1px #00000040;padding:8px 0;overflow-y:auto;max-height:60vh}.dr-dropdown__container__item{display:flex;align-items:center;justify-content:flex-start;cursor:pointer;min-width:15rem;font-style:normal;font-weight:400;font-size:14px;line-height:24px;clear:both;width:100%;white-space:nowrap;padding:0 12px;height:36px;flex-shrink:0}.dr-dropdown__container__item:hover{background-color:#f6f7f8}.dr-dropdown__container__item:hover .showOnHover{visibility:visible}.dr-dropdown__container__item.item-selected{background:#F3F7FF}.dr-dropdown__container__item.item-disabled{color:#bcbcbc;pointer-events:none}.dr-dropdown__container__item i:first-child{margin-right:8px}.dr-dropdown__container__item__text{margin-right:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dr-dropdown__container__item i,.dr-dropdown__container__item__text{color:#151b3f}.dr-dropdown__container__item .showOnHover{visibility:hidden}.dr-dropdown.content-top{transform:translate(-50%,-100%)}.dr-dropdown.content-top-left{transform:translate(-100%,-100%)}.dr-dropdown.content-bottom{transform:translate(-50%,50%)}.dr-dropdown.content-bottom-left{transform:translate(-90%,35%)}.dr-dropdown.content-left{transform:translate(-100%)}.dr-dropdown.content-left-center{transform:translate(-100%,-50%)}.dr-dropdown.content-right{transform:translate(5%)}\n"]
2704
+ styles: ["::ng-deep .dr-dropdown__container__item .dr-dropdown{visibility:hidden}::ng-deep .dr-dropdown__container__item:hover .dr-dropdown{visibility:visible}.dr-dropdown{position:absolute;z-index:-1;top:0;left:0;width:auto}.dr-dropdown__container{display:flex;flex-direction:column;background:#fff;border-radius:4px;box-shadow:0 4px 8px 1px #00000040;padding:8px 0;overflow-y:auto;max-height:60vh}.dr-dropdown__container__item{display:flex;align-items:center;justify-content:flex-start;cursor:pointer;min-width:15rem;font-style:normal;font-weight:400;font-size:14px;line-height:24px;clear:both;width:100%;white-space:nowrap;padding:0 12px;height:36px;flex-shrink:0}.dr-dropdown__container__item:hover{background-color:#f6f7f8}.dr-dropdown__container__item:hover .showOnHover{visibility:visible}.dr-dropdown__container__item.item-selected{background:#F3F7FF}.dr-dropdown__container__item.item-disabled{color:#bcbcbc;pointer-events:none}.dr-dropdown__container__item i:first-child{margin-right:8px}.dr-dropdown__container__item__text{margin-right:auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dr-dropdown__container__item i,.dr-dropdown__container__item__text{color:#151b3f}.dr-dropdown__container__item .showOnHover{visibility:hidden}.dr-dropdown.content-top{transform:translate(-50%,-100%)}.dr-dropdown.content-top-left{transform:translate(-100%,-100%)}.dr-dropdown.content-bottom{transform:translate(-50%,50%)}.dr-dropdown.content-bottom-left{transform:translate(-90%,35%)}.dr-dropdown.content-bottom-right{transform:translateY(45%)}.dr-dropdown.content-left{transform:translate(-100%)}.dr-dropdown.content-left-center{transform:translate(-100%,-50%)}.dr-dropdown.content-right{transform:translate(5%)}\n"]
2676
2705
  },] }
2677
2706
  ];
2678
2707
  DrDropdownComponent.ctorParameters = function () { return [
@@ -2707,6 +2736,7 @@
2707
2736
  option: option,
2708
2737
  position: this.position,
2709
2738
  list: this.drDropdown,
2739
+ class: this.drDropdownClass
2710
2740
  });
2711
2741
  }
2712
2742
  };
@@ -2750,6 +2780,7 @@
2750
2780
  DrDropdownDirective.propDecorators = {
2751
2781
  position: [{ type: i0.Input }],
2752
2782
  drDropdown: [{ type: i0.Input }],
2783
+ drDropdownClass: [{ type: i0.Input }],
2753
2784
  contentCmpRef: [{ type: i0.ViewChild, args: [DrDropdownComponent, { static: true, read: i0.ViewContainerRef },] }],
2754
2785
  elementClick: [{ type: i0.HostListener, args: ['click',] }],
2755
2786
  documentClick: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
@@ -2765,14 +2796,16 @@
2765
2796
  setTimeout(this.calculatePosition.bind(this), 1);
2766
2797
  };
2767
2798
  DrDropdownPositionDirective.prototype.calculatePosition = function () {
2799
+ var xDifference = 0;
2768
2800
  var defaultDelta = 10;
2769
2801
  var defaultPadding = 0;
2770
2802
  if (this.position === 'child') {
2771
2803
  defaultDelta = 0;
2772
2804
  defaultPadding = 10;
2805
+ xDifference = this.el.nativeElement.parentElement.parentElement.offsetWidth - this.el.nativeElement.offsetWidth;
2773
2806
  var parentRect = this.el.nativeElement.parentElement.parentElement.getBoundingClientRect();
2774
2807
  this.position = {
2775
- x: this.el.nativeElement.parentElement.parentElement.offsetWidth + 2,
2808
+ x: this.el.nativeElement.offsetWidth,
2776
2809
  y: this.el.nativeElement.parentElement.parentElement.offsetTop - 9,
2777
2810
  clientX: parentRect.x + this.el.nativeElement.parentElement.parentElement.offsetWidth,
2778
2811
  clientY: parentRect.y
@@ -2808,17 +2841,21 @@
2808
2841
  : this.position === 'bottom-left' ? 'content-bottom-left'
2809
2842
  : this.position === 'left' ? 'content-left'
2810
2843
  : this.position === 'left-center' ? 'content-left-center'
2811
- : this.position === 'right' ? 'content-right' : '';
2844
+ : this.position === 'right' ? 'content-right'
2845
+ : this.position === 'bottom-right' ? 'content-bottom-right' : '';
2812
2846
  this.renderer.addClass(this.el.nativeElement, className);
2813
2847
  this.renderer.setStyle(this.el.nativeElement, 'z-index', '10010');
2814
2848
  }
2815
2849
  else {
2850
+ var defaultChildPadding = 5;
2816
2851
  var widthMoreWindowRight = window.innerWidth - this.position.clientX - this.el.nativeElement.offsetWidth - defaultPadding;
2817
- var deltaWidth = widthMoreWindowRight < 0 ? widthMoreWindowRight : defaultDelta;
2818
2852
  var widthMoreWindowBottom = window.innerHeight - this.position.clientY - this.el.nativeElement.offsetHeight - defaultPadding;
2853
+ var calculatedHorizantallyPos = widthMoreWindowRight < 0
2854
+ ? -this.position.x + -defaultChildPadding
2855
+ : this.position.x + defaultChildPadding + xDifference;
2819
2856
  var deltaHeight = widthMoreWindowBottom < 0 ? widthMoreWindowBottom : defaultDelta;
2820
2857
  this.renderer.setStyle(this.el.nativeElement, 'top', (this.position.y + deltaHeight) + 'px');
2821
- this.renderer.setStyle(this.el.nativeElement, 'left', (this.position.x + deltaWidth) + 'px');
2858
+ this.renderer.setStyle(this.el.nativeElement, 'left', (calculatedHorizantallyPos) + 'px');
2822
2859
  this.renderer.setStyle(this.el.nativeElement, 'z-index', '10010');
2823
2860
  }
2824
2861
  };
@@ -2996,9 +3033,7 @@
2996
3033
  }());
2997
3034
  DrInputsModule.decorators = [
2998
3035
  { type: i0.NgModule, args: [{
2999
- declarations: [
3000
- components$1,
3001
- ],
3036
+ declarations: components$1,
3002
3037
  exports: components$1,
3003
3038
  imports: [
3004
3039
  forms.FormsModule,
@@ -3040,10 +3075,12 @@
3040
3075
  DrAvatarModule.decorators = [
3041
3076
  { type: i0.NgModule, args: [{
3042
3077
  declarations: [
3043
- DrAvatarComponent
3078
+ DrAvatarComponent,
3079
+ DrAvatarPipe
3044
3080
  ],
3045
3081
  exports: [
3046
- DrAvatarComponent
3082
+ DrAvatarComponent,
3083
+ DrAvatarPipe
3047
3084
  ],
3048
3085
  imports: [
3049
3086
  tooltip.MatTooltipModule,
@@ -3160,6 +3197,7 @@
3160
3197
  exports.DayTagComponent = DayTagComponent;
3161
3198
  exports.DrAvatarComponent = DrAvatarComponent;
3162
3199
  exports.DrAvatarModule = DrAvatarModule;
3200
+ exports.DrAvatarPipe = DrAvatarPipe;
3163
3201
  exports.DrButtonComponent = DrButtonComponent;
3164
3202
  exports.DrDatePickerComponent = DrDatePickerComponent;
3165
3203
  exports.DrDatePickerFormatDirective = DrDatePickerFormatDirective;