@datarailsshared/datarailsshared 1.3.20 → 1.3.23

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 (34) hide show
  1. package/assets/styles/img/default_avatar.svg +4 -0
  2. package/bundles/datarailsshared-datarailsshared.umd.js +283 -45
  3. package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
  4. package/datarailsshared-datarailsshared-1.3.23.tgz +0 -0
  5. package/datarailsshared-datarailsshared.metadata.json +1 -1
  6. package/esm2015/lib/dr-avatar/dr-avatar.component.js +13 -18
  7. package/esm2015/lib/dr-avatar/dr-avatar.module.js +10 -7
  8. package/esm2015/lib/dr-avatar/dr-avatar.pipe.js +15 -0
  9. package/esm2015/lib/dr-dropdown/dr-dropdown-position.directive.js +11 -5
  10. package/esm2015/lib/dr-dropdown/dr-dropdown.component.js +5 -3
  11. package/esm2015/lib/dr-dropdown/dr-dropdown.directive.js +3 -1
  12. package/esm2015/lib/dr-inputs/checkbox/checkbox.component.js +21 -9
  13. package/esm2015/lib/dr-inputs/dr-input/dr-input.component.js +4 -2
  14. package/esm2015/lib/dr-inputs/dr-inputs.module.js +4 -4
  15. package/esm2015/lib/dr-inputs/dr-toggle/dr-toggle.component.js +12 -4
  16. package/esm2015/lib/dr-inputs/radio-button/radio-button.component.js +14 -5
  17. package/esm2015/lib/dr-inputs/radio-button/radio-group.component.js +164 -0
  18. package/esm2015/lib/models/dropdown.js +1 -1
  19. package/esm2015/public-api.js +3 -1
  20. package/fesm2015/datarailsshared-datarailsshared.js +253 -45
  21. package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
  22. package/lib/dr-avatar/dr-avatar.component.d.ts +4 -6
  23. package/lib/dr-avatar/dr-avatar.pipe.d.ts +4 -0
  24. package/lib/dr-dropdown/dr-dropdown.component.d.ts +1 -0
  25. package/lib/dr-dropdown/dr-dropdown.directive.d.ts +1 -0
  26. package/lib/dr-inputs/checkbox/checkbox.component.d.ts +7 -3
  27. package/lib/dr-inputs/dr-input/dr-input.component.d.ts +2 -0
  28. package/lib/dr-inputs/dr-toggle/dr-toggle.component.d.ts +5 -2
  29. package/lib/dr-inputs/radio-button/radio-button.component.d.ts +4 -1
  30. package/lib/dr-inputs/radio-button/radio-group.component.d.ts +39 -0
  31. package/lib/models/dropdown.d.ts +1 -0
  32. package/package.json +1 -1
  33. package/public-api.d.ts +2 -0
  34. package/datarailsshared-datarailsshared-1.3.20.tgz +0 -0
@@ -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>
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('moment'), require('rxjs'), require('@angular/animations'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/common'), require('rxjs/operators'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/button-toggle'), require('@ng-select/ng-select'), require('@angular/material/tooltip'), require('@angular/material/tabs')) :
3
- typeof define === 'function' && define.amd ? define('@datarailsshared/datarailsshared', ['exports', '@angular/core', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'moment', 'rxjs', '@angular/animations', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/common', 'rxjs/operators', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/button-toggle', '@ng-select/ng-select', '@angular/material/tooltip', '@angular/material/tabs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.datarailsshared = global.datarailsshared || {}, global.datarailsshared.datarailsshared = {}), global.ng.core, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.momentImported, global.rxjs, global.ng.animations, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.common, global.rxjs.operators, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.buttonToggle, global.ngSelect, global.ng.material.tooltip, global.ng.material.tabs));
5
- }(this, (function (exports, i0, forms, core, materialMomentAdapter, momentImported, rxjs, animations, i1, portal, common, operators, datepicker, formField, input, select, buttonToggle, ngSelect, tooltip, tabs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('moment'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/button-toggle'), require('@ng-select/ng-select'), require('@angular/material/tooltip'), require('@angular/material/tabs')) :
3
+ typeof define === 'function' && define.amd ? define('@datarailsshared/datarailsshared', ['exports', '@angular/core', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'moment', '@angular/common', 'rxjs', 'rxjs/operators', '@angular/animations', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/button-toggle', '@ng-select/ng-select', '@angular/material/tooltip', '@angular/material/tabs'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.datarailsshared = global.datarailsshared || {}, global.datarailsshared.datarailsshared = {}), global.ng.core, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.momentImported, global.ng.common, global.rxjs, global.rxjs.operators, global.ng.animations, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.buttonToggle, global.ngSelect, global.ng.material.tooltip, global.ng.material.tabs));
5
+ }(this, (function (exports, i0, forms, core, materialMomentAdapter, momentImported, common, rxjs, operators, animations, i1, portal, datepicker, formField, input, select, buttonToggle, ngSelect, tooltip, tabs) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -1162,6 +1162,7 @@
1162
1162
  var RadioButtonComponent = /** @class */ (function () {
1163
1163
  function RadioButtonComponent(cdr) {
1164
1164
  this.cdr = cdr;
1165
+ this.valueChange = new i0.EventEmitter();
1165
1166
  this.onChange = (function (onchanges) { });
1166
1167
  this.onTouched = function () { };
1167
1168
  }
@@ -1189,6 +1190,14 @@
1189
1190
  };
1190
1191
  RadioButtonComponent.prototype.valueChanged = function (event) {
1191
1192
  this.onChange(this.modelValue);
1193
+ this.valueChange.emit(this.value);
1194
+ };
1195
+ RadioButtonComponent.prototype._setName = function (name) {
1196
+ this.name = name;
1197
+ this.cdr.markForCheck();
1198
+ };
1199
+ RadioButtonComponent.prototype._markForCheck = function () {
1200
+ this.cdr.markForCheck();
1192
1201
  };
1193
1202
  return RadioButtonComponent;
1194
1203
  }());
@@ -1204,8 +1213,7 @@
1204
1213
  }
1205
1214
  ],
1206
1215
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1207
- encapsulation: i0.ViewEncapsulation.ShadowDom,
1208
- styles: ["label input[type=radio].radiobox+span{vertical-align:middle;line-height:20px}input+span,input+span:after,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:18px;height:18px}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;height:12px;line-height:13px;width:12px;margin-right:5px;border:1px solid #C3C4CE;background-color:#fff;font-weight:normal;margin-top:-1px}label input+span:before{border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%}label input:checked+span:before,label:hover input:checked+span:before{background:white;border-color:#579bf2;color:#579bf2}label input:checked+span:before,label:hover input:checked+span:before{font-family:\"DataRails\"!important;background-image: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\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23579BF2\"/></svg> ');background-repeat:no-repeat;background-position:center;color:#579bf2}label input:disabled+span:before{border-color:#bcbcbc}label input[disabled]:checked+span: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\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23BCBCBC\"/></svg> ');border-color:#bcbcbc}label span:hover:before{border-color:#85889c}\n"]
1216
+ styles: [":host{display:flex;line-height:22px}label input[type=radio].radiobox+span{vertical-align:middle;line-height:20px}input+span,input+span:after,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:18px;height:18px}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;height:12px;line-height:13px;width:12px;margin-right:5px;border:1px solid #C3C4CE;background-color:#fff;font-weight:normal;margin-top:-1px}label input+span:before{border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%}label input:checked+span:before,label:hover input:checked+span:before{background:white;border-color:#579bf2;color:#579bf2}label input:checked+span:before,label:hover input:checked+span:before{font-family:\"DataRails\"!important;background-image: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\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23579BF2\"/></svg> ');background-repeat:no-repeat;background-position:center;color:#579bf2}label input:disabled+span:before{border-color:#bcbcbc}label input[disabled]:checked+span: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\"><circle cx=\"5\" cy=\"5\" r=\"4.5\" fill=\"%23BCBCBC\"/></svg> ');border-color:#bcbcbc}label span:hover:before{border-color:#85889c}\n"]
1209
1217
  },] }
1210
1218
  ];
1211
1219
  RadioButtonComponent.ctorParameters = function () { return [
@@ -1214,17 +1222,205 @@
1214
1222
  RadioButtonComponent.propDecorators = {
1215
1223
  disabled: [{ type: i0.Input }],
1216
1224
  name: [{ type: i0.Input }],
1217
- _value: [{ type: i0.Input, args: ['value',] }]
1225
+ _value: [{ type: i0.Input, args: ['value',] }],
1226
+ valueChange: [{ type: i0.Output }]
1227
+ };
1228
+
1229
+ var RadioGroupComponent = /** @class */ (function () {
1230
+ function RadioGroupComponent(hostElement, platformId, document) {
1231
+ this.hostElement = hostElement;
1232
+ this.platformId = platformId;
1233
+ this.document = document;
1234
+ this.destroy$ = new rxjs.Subject();
1235
+ this.valueChange = new i0.EventEmitter();
1236
+ this.onChange = function (value) { };
1237
+ this.onTouched = function () { };
1238
+ }
1239
+ Object.defineProperty(RadioGroupComponent.prototype, "value", {
1240
+ get: function () {
1241
+ return this._value;
1242
+ },
1243
+ set: function (value) {
1244
+ this._value = value;
1245
+ this.updateValues();
1246
+ },
1247
+ enumerable: false,
1248
+ configurable: true
1249
+ });
1250
+ Object.defineProperty(RadioGroupComponent.prototype, "name", {
1251
+ get: function () {
1252
+ return this._name;
1253
+ },
1254
+ set: function (name) {
1255
+ this._name = name;
1256
+ this.updateNames();
1257
+ },
1258
+ enumerable: false,
1259
+ configurable: true
1260
+ });
1261
+ Object.defineProperty(RadioGroupComponent.prototype, "disabled", {
1262
+ get: function () {
1263
+ return this._disabled;
1264
+ },
1265
+ set: function (disabled) {
1266
+ this._disabled = !!disabled;
1267
+ this.updateDisabled();
1268
+ },
1269
+ enumerable: false,
1270
+ configurable: true
1271
+ });
1272
+ RadioGroupComponent.prototype.ngAfterContentInit = function () {
1273
+ var _this = this;
1274
+ // In case option 'name' isn't set on nb-radio component,
1275
+ // we need to set it's name right away, so it won't overlap with options
1276
+ // without names from other radio groups. Otherwise they all would have
1277
+ // same name and will be considered as options from one group so only the
1278
+ // last option will stay selected.
1279
+ this.updateNames();
1280
+ this.radios.changes
1281
+ .pipe(operators.startWith(this.radios),
1282
+ // 'changes' emit during change detection run and we can't update
1283
+ // option properties right of since they already was initialized.
1284
+ // Instead we schedule microtask to update radios after change detection
1285
+ // run is finished and trigger one more change detection run.
1286
+ operators.switchMap(function (radios) { return rxjs.from(Promise.resolve(radios)); }), operators.takeUntil(this.destroy$))
1287
+ .subscribe(function () { return _this.updateAndSubscribeToRadios(); });
1288
+ };
1289
+ RadioGroupComponent.prototype.ngOnDestroy = function () {
1290
+ this.destroy$.next();
1291
+ this.destroy$.complete();
1292
+ };
1293
+ RadioGroupComponent.prototype.registerOnChange = function (fn) {
1294
+ this.onChange = fn;
1295
+ };
1296
+ RadioGroupComponent.prototype.registerOnTouched = function (fn) {
1297
+ this.onTouched = fn;
1298
+ };
1299
+ RadioGroupComponent.prototype.writeValue = function (value) {
1300
+ this.value = value;
1301
+ };
1302
+ RadioGroupComponent.prototype.setDisabledState = function (isDisabled) {
1303
+ this.disabled = isDisabled;
1304
+ };
1305
+ RadioGroupComponent.prototype.updateAndSubscribeToRadios = function () {
1306
+ this.updateValueFromCheckedOption();
1307
+ this.updateNames();
1308
+ this.updateValues();
1309
+ this.updateDisabled();
1310
+ this.subscribeOnRadiosValueChange();
1311
+ this.subscribeOnRadiosBlur();
1312
+ };
1313
+ RadioGroupComponent.prototype.updateNames = function () {
1314
+ var _this = this;
1315
+ if (this.radios) {
1316
+ this.radios.forEach(function (radio) { return radio._setName(_this.name); });
1317
+ }
1318
+ };
1319
+ RadioGroupComponent.prototype.updateValues = function () {
1320
+ var _this = this;
1321
+ this.updateAndMarkForCheckRadios(function (radio) {
1322
+ if (radio.value === _this.value) {
1323
+ radio.modelValue = radio.value;
1324
+ }
1325
+ });
1326
+ };
1327
+ RadioGroupComponent.prototype.updateDisabled = function () {
1328
+ var _this = this;
1329
+ if (typeof this.disabled !== 'undefined') {
1330
+ this.updateAndMarkForCheckRadios(function (radio) { return radio.disabled = _this.disabled; });
1331
+ }
1332
+ };
1333
+ RadioGroupComponent.prototype.subscribeOnRadiosValueChange = function () {
1334
+ var _this = this;
1335
+ if (!this.radios || !this.radios.length) {
1336
+ return;
1337
+ }
1338
+ rxjs.merge.apply(void 0, __spreadArray([], __read(this.radios.map(function (radio) { return radio.valueChange; })))).pipe(operators.takeUntil(rxjs.merge(this.radios.changes, this.destroy$)))
1339
+ .subscribe(function (value) {
1340
+ _this.writeValue(value);
1341
+ _this.propagateValue(value);
1342
+ });
1343
+ };
1344
+ RadioGroupComponent.prototype.propagateValue = function (value) {
1345
+ this.valueChange.emit(value);
1346
+ this.onChange(value);
1347
+ };
1348
+ RadioGroupComponent.prototype.subscribeOnRadiosBlur = function () {
1349
+ var _this = this;
1350
+ var hasNoRadios = !this.radios || !this.radios.length;
1351
+ if (!common.isPlatformBrowser(this.platformId) || hasNoRadios) {
1352
+ return;
1353
+ }
1354
+ var hostElement = this.hostElement.nativeElement;
1355
+ rxjs.fromEvent(hostElement, 'focusin')
1356
+ .pipe(operators.filter(function (event) { return hostElement.contains(event.target); }), operators.switchMap(function () { return rxjs.merge(rxjs.fromEvent(_this.document, 'focusin'), rxjs.fromEvent(_this.document, 'click')); }), operators.filter(function (event) { return !hostElement.contains(event.target); }), operators.takeUntil(rxjs.merge(this.radios.changes, this.destroy$)))
1357
+ .subscribe(function () { return _this.onTouched(); });
1358
+ };
1359
+ RadioGroupComponent.prototype.updateAndMarkForCheckRadios = function (updateFn) {
1360
+ if (this.radios) {
1361
+ this.radios.forEach(function (radio) {
1362
+ updateFn(radio);
1363
+ radio._markForCheck();
1364
+ });
1365
+ }
1366
+ };
1367
+ RadioGroupComponent.prototype.updateValueFromCheckedOption = function () {
1368
+ var checkedRadio = this.radios.find(function (radio) { return radio.modelValue; });
1369
+ var isValueMissing = this.value === undefined || this.value === null;
1370
+ if (checkedRadio && isValueMissing && checkedRadio.value !== this.value) {
1371
+ this.value = checkedRadio.value;
1372
+ }
1373
+ };
1374
+ return RadioGroupComponent;
1375
+ }());
1376
+ RadioGroupComponent.decorators = [
1377
+ { type: i0.Component, args: [{
1378
+ selector: 'dr-radio-group',
1379
+ template: "\n <ng-content select=\"dr-radio-button\"></ng-content>",
1380
+ providers: [
1381
+ {
1382
+ provide: forms.NG_VALUE_ACCESSOR,
1383
+ useExisting: i0.forwardRef(function () { return RadioGroupComponent; }),
1384
+ multi: true,
1385
+ },
1386
+ ],
1387
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1388
+ },] }
1389
+ ];
1390
+ RadioGroupComponent.ctorParameters = function () { return [
1391
+ { type: i0.ElementRef },
1392
+ { type: undefined, decorators: [{ type: i0.Inject, args: [i0.PLATFORM_ID,] }] },
1393
+ { type: undefined, decorators: [{ type: i0.Inject, args: [common.DOCUMENT,] }] }
1394
+ ]; };
1395
+ RadioGroupComponent.propDecorators = {
1396
+ value: [{ type: i0.Input }],
1397
+ name: [{ type: i0.Input }],
1398
+ disabled: [{ type: i0.Input }],
1399
+ radios: [{ type: i0.ContentChildren, args: [RadioButtonComponent, { descendants: true },] }],
1400
+ valueChange: [{ type: i0.Output }]
1218
1401
  };
1219
1402
 
1220
1403
  var CheckboxComponent = /** @class */ (function () {
1221
1404
  function CheckboxComponent(cdr) {
1222
1405
  this.cdr = cdr;
1223
1406
  this.disabled = false;
1407
+ this.icon = '';
1408
+ this._indeterminate = false;
1224
1409
  this.checkedChange = new i0.EventEmitter();
1225
1410
  this.onChange = function () { };
1226
1411
  this.onTouched = function () { };
1227
1412
  }
1413
+ Object.defineProperty(CheckboxComponent.prototype, "indeterminate", {
1414
+ get: function () {
1415
+ return this._indeterminate;
1416
+ },
1417
+ set: function (value) {
1418
+ this._indeterminate = !!value;
1419
+ this.cdr.markForCheck();
1420
+ },
1421
+ enumerable: false,
1422
+ configurable: true
1423
+ });
1228
1424
  CheckboxComponent.prototype.writeValue = function (value) {
1229
1425
  this.checkedStatus = value;
1230
1426
  this.cdr.markForCheck();
@@ -1238,10 +1434,12 @@
1238
1434
  CheckboxComponent.prototype.setDisabledState = function (isDisabled) {
1239
1435
  this.disabled = isDisabled;
1240
1436
  };
1241
- CheckboxComponent.prototype.setValue = function () {
1242
- this.checkedStatus = !this.checkedStatus;
1243
- this.onChange(this.checkedStatus);
1437
+ CheckboxComponent.prototype.setValue = function (event) {
1438
+ var input = event.target;
1439
+ this.checkedStatus = input.checked;
1244
1440
  this.checkedChange.emit(this.checkedStatus);
1441
+ this.onChange(this.checkedStatus);
1442
+ this.indeterminate = input.indeterminate;
1245
1443
  this.onTouched();
1246
1444
  };
1247
1445
  return CheckboxComponent;
@@ -1249,13 +1447,12 @@
1249
1447
  CheckboxComponent.decorators = [
1250
1448
  { type: i0.Component, args: [{
1251
1449
  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",
1450
+ 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
1451
  providers: [
1254
1452
  { provide: forms.NG_VALUE_ACCESSOR, useExisting: CheckboxComponent, multi: true }
1255
1453
  ],
1256
1454
  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"]
1455
+ 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
1456
  },] }
1260
1457
  ];
1261
1458
  CheckboxComponent.ctorParameters = function () { return [
@@ -1264,6 +1461,8 @@
1264
1461
  CheckboxComponent.propDecorators = {
1265
1462
  checkedStatus: [{ type: i0.Input }],
1266
1463
  disabled: [{ type: i0.Input }],
1464
+ icon: [{ type: i0.Input }],
1465
+ indeterminate: [{ type: i0.Input }],
1267
1466
  checkedChange: [{ type: i0.Output }]
1268
1467
  };
1269
1468
 
@@ -1413,7 +1612,7 @@
1413
1612
  DrInputComponent.decorators = [
1414
1613
  { type: i0.Component, args: [{
1415
1614
  selector: 'dr-input',
1416
- template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"blur.emit(value); onTouched()\"\r\n [disabled]=\"_disabled\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [name]=\"name\"\r\n>\r\n<span class=\"clear-icon\" (click)=\"writeValue(null)\"></span>\r\n<span *ngIf=\"type === 'search'\" class=\"search-icon\" (click)=\"onSearchClicked($event)\"></span>\r\n<ng-content select=\"[suffixIcon]\"></ng-content>\r\n<button *ngIf=\"_buttonOptions.show || (_buttonOptions.showOnFocus && _buttonOptions.focusSet)\"\r\n (click)=\"onButtonClicked($event)\">\r\n {{_buttonOptions.text}}\r\n</button>\r\n",
1615
+ template: "<ng-content select=\"[prefixIcon]\"></ng-content>\r\n<input [(ngModel)]=\"value\"\r\n (ngModelChange)=\"updateChanges()\"\r\n (blur)=\"blur.emit(value); onTouched()\"\r\n [disabled]=\"_disabled\"\r\n [readonly]=\"readonly\"\r\n [type]=\"type\"\r\n [placeholder]=\"placeholder\"\r\n [name]=\"name\"\r\n [min]=\"min\"\r\n [step]=\"step\"\r\n>\r\n<span class=\"clear-icon\" (click)=\"writeValue(null)\"></span>\r\n<span *ngIf=\"type === 'search'\" class=\"search-icon\" (click)=\"onSearchClicked($event)\"></span>\r\n<ng-content select=\"[suffixIcon]\"></ng-content>\r\n<button *ngIf=\"_buttonOptions.show || (_buttonOptions.showOnFocus && _buttonOptions.focusSet)\"\r\n (click)=\"onButtonClicked($event)\">\r\n {{_buttonOptions.text}}\r\n</button>\r\n",
1417
1616
  providers: [{
1418
1617
  provide: forms.NG_VALUE_ACCESSOR,
1419
1618
  useExisting: i0.forwardRef(function () { return DrInputComponent; }),
@@ -1436,6 +1635,8 @@
1436
1635
  placeholder: [{ type: i0.Input }],
1437
1636
  readonly: [{ type: i0.Input }],
1438
1637
  clearable: [{ type: i0.Input }],
1638
+ min: [{ type: i0.Input }],
1639
+ step: [{ type: i0.Input }],
1439
1640
  blur: [{ type: i0.Output }],
1440
1641
  elementClass: [{ type: i0.HostBinding, args: ['class',] }],
1441
1642
  searchHandler: [{ type: i0.Output }],
@@ -1512,28 +1713,24 @@
1512
1713
 
1513
1714
  var DrAvatarComponent = /** @class */ (function () {
1514
1715
  function DrAvatarComponent() {
1716
+ this.warning = false;
1515
1717
  this.userClicked = new i0.EventEmitter();
1516
1718
  this.parsedUsers = [];
1517
1719
  }
1518
1720
  Object.defineProperty(DrAvatarComponent.prototype, "users", {
1519
- set: function (user) {
1520
- if (user) {
1521
- this.parsedUsers = this.parseUsers(user);
1721
+ set: function (users) {
1722
+ if (users) {
1723
+ this.parsedUsers = Array.isArray(users) ? users : [users];
1724
+ this.parsedUsers.forEach(function (user, index) {
1725
+ if (!user.colorNumber) {
1726
+ user.colorNumber = index % 5;
1727
+ }
1728
+ });
1522
1729
  }
1523
1730
  },
1524
1731
  enumerable: false,
1525
1732
  configurable: true
1526
1733
  });
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
1734
  DrAvatarComponent.prototype.getFirstUsers = function () {
1538
1735
  return this.parsedUsers.slice(0, 2);
1539
1736
  };
@@ -1543,25 +1740,41 @@
1543
1740
  }
1544
1741
  return [];
1545
1742
  };
1546
- DrAvatarComponent.prototype.getRandomValue = function (limit) {
1547
- return ~~(limit * Math.random());
1548
- };
1549
1743
  return DrAvatarComponent;
1550
1744
  }());
1551
1745
  DrAvatarComponent.decorators = [
1552
1746
  { type: i0.Component, args: [{
1553
1747
  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",
1748
+ template: "<div class=\"users-section\">\r\n <div *ngIf=\"!parsedUsers.length\"\r\n class=\"users-section__default\">\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 + ' ' + user.status\"\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
1749
  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"]
1750
+ 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.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"]
1557
1751
  },] }
1558
1752
  ];
1559
1753
  DrAvatarComponent.ctorParameters = function () { return []; };
1560
1754
  DrAvatarComponent.propDecorators = {
1561
1755
  users: [{ type: i0.Input }],
1756
+ warning: [{ type: i0.Input }],
1562
1757
  userClicked: [{ type: i0.Output }]
1563
1758
  };
1564
1759
 
1760
+ var DrAvatarPipe = /** @class */ (function () {
1761
+ function DrAvatarPipe() {
1762
+ }
1763
+ DrAvatarPipe.prototype.transform = function (item, type) {
1764
+ if (type === void 0) { type = 'full'; }
1765
+ if (type === 'initials') {
1766
+ return (item.first_name && item.last_name ? (item.first_name[0] + item.last_name[0]) : item.email[0]).toUpperCase();
1767
+ }
1768
+ return item.first_name && item.last_name ? (item.first_name + ' ' + item.last_name) : item.email;
1769
+ };
1770
+ return DrAvatarPipe;
1771
+ }());
1772
+ DrAvatarPipe.decorators = [
1773
+ { type: i0.Pipe, args: [{
1774
+ name: 'drAvatar'
1775
+ },] }
1776
+ ];
1777
+
1565
1778
  var POPUP_POSITIONS = {
1566
1779
  top: {
1567
1780
  originX: 'center',
@@ -1796,6 +2009,7 @@
1796
2009
  function DrToggleComponent(cdr) {
1797
2010
  this.cdr = cdr;
1798
2011
  this._disabled = false;
2012
+ this._elementClass = [];
1799
2013
  this.checkedChange = new i0.EventEmitter();
1800
2014
  this.onChange = function () { };
1801
2015
  this.onTouched = function () { };
@@ -1807,6 +2021,16 @@
1807
2021
  enumerable: false,
1808
2022
  configurable: true
1809
2023
  });
2024
+ Object.defineProperty(DrToggleComponent.prototype, "elementClass", {
2025
+ get: function () { return this._elementClass.join(' '); },
2026
+ enumerable: false,
2027
+ configurable: true
2028
+ });
2029
+ DrToggleComponent.prototype.ngAfterViewInit = function () {
2030
+ if (this.toggleTitleRight) {
2031
+ this._elementClass.push('toggle-label-alignment');
2032
+ }
2033
+ };
1810
2034
  DrToggleComponent.prototype.writeValue = function (value) {
1811
2035
  this.checkedStatus = value;
1812
2036
  this.cdr.markForCheck();
@@ -1836,7 +2060,7 @@
1836
2060
  { provide: forms.NG_VALUE_ACCESSOR, useExisting: DrToggleComponent, multi: true }
1837
2061
  ],
1838
2062
  changeDetection: i0.ChangeDetectionStrategy.OnPush,
1839
- styles: [":host{display:flex;justify-content:space-between;align-items:center}:host .toggle-container.disabled{pointer-events:none}:host .toggle-container.disabled .toggle-body{background-color:#8f9bb329!important}:host .toggle-container.disabled .toggle-body i{background:rgba(143,155,179,.24)!important}:host .toggle-container.success input:checked+span.toggle-body{background-color:#03a678}:host .toggle-container input{display:none}:host .toggle-container input:checked+span.toggle-body>i,:host .toggle-container input:checked+span.toggle-body:active>i{margin-left:16px}:host .toggle-container input:checked+span.toggle-body{background-color:#579bf2}:host .toggle-container .toggle-body{cursor:pointer;display:block;width:30px;height:16px;margin:7px auto;border-radius:15px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;background-color:#aeb5bb;line-height:1}:host .toggle-container .toggle-body:active{background-color:#a6b9cb}:host .toggle-container .toggle-body-wrapper{display:flex;flex-direction:column}:host .toggle-container .toggle-body i{height:12px;width:12px;background:#fff;display:inline-block;border-radius:100px;margin-top:2px;margin-left:1.5px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;pointer-events:none}\n"]
2063
+ styles: [":host{display:flex;justify-content:space-between;align-items:center}:host.toggle-label-alignment{justify-content:start}:host .toggle-container.disabled{pointer-events:none}:host .toggle-container.disabled .toggle-body{background-color:#8f9bb329!important}:host .toggle-container.disabled .toggle-body i{background:rgba(143,155,179,.24)!important}:host .toggle-container.success input:checked+span.toggle-body{background-color:#03a678}:host .toggle-container input{display:none}:host .toggle-container input:checked+span.toggle-body>i,:host .toggle-container input:checked+span.toggle-body:active>i{margin-left:16px}:host .toggle-container input:checked+span.toggle-body{background-color:#579bf2}:host .toggle-container .toggle-body{cursor:pointer;display:block;width:30px;height:16px;margin:7px auto;border-radius:15px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;background-color:#aeb5bb;line-height:1}:host .toggle-container .toggle-body:active{background-color:#a6b9cb}:host .toggle-container .toggle-body-wrapper{display:flex;flex-direction:column}:host .toggle-container .toggle-body i{height:12px;width:12px;background:#fff;display:inline-block;border-radius:100px;margin-top:2px;margin-left:1.5px;transition:all .2s ease-in-out;-webkit-transition:all .2s ease-in-out;pointer-events:none}\n"]
1840
2064
  },] }
1841
2065
  ];
1842
2066
  DrToggleComponent.ctorParameters = function () { return [
@@ -1848,7 +2072,8 @@
1848
2072
  successType: [{ type: i0.Input }],
1849
2073
  checkedStatus: [{ type: i0.Input }],
1850
2074
  disabled: [{ type: i0.Input }],
1851
- checkedChange: [{ type: i0.Output }]
2075
+ checkedChange: [{ type: i0.Output }],
2076
+ elementClass: [{ type: i0.HostBinding, args: ['class',] }]
1852
2077
  };
1853
2078
 
1854
2079
  var DrToggleButtonComponent = /** @class */ (function () {
@@ -2592,12 +2817,14 @@
2592
2817
  if (data) {
2593
2818
  this.option = data.option;
2594
2819
  this.position = data.position;
2820
+ this.containerClass = data.class;
2595
2821
  this.list = data.list || [];
2596
2822
  this.list.forEach(function (item) {
2597
2823
  var _a;
2598
2824
  if ((_a = item.children) === null || _a === void 0 ? void 0 : _a.length) {
2599
2825
  item.childOptions = {
2600
2826
  list: item.children,
2827
+ class: item.childOptions.class,
2601
2828
  position: 'child'
2602
2829
  };
2603
2830
  }
@@ -2670,9 +2897,9 @@
2670
2897
  DrDropdownComponent.decorators = [
2671
2898
  { type: i0.Component, args: [{
2672
2899
  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",
2900
+ 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
2901
  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"]
2902
+ 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
2903
  },] }
2677
2904
  ];
2678
2905
  DrDropdownComponent.ctorParameters = function () { return [
@@ -2707,6 +2934,7 @@
2707
2934
  option: option,
2708
2935
  position: this.position,
2709
2936
  list: this.drDropdown,
2937
+ class: this.drDropdownClass
2710
2938
  });
2711
2939
  }
2712
2940
  };
@@ -2750,6 +2978,7 @@
2750
2978
  DrDropdownDirective.propDecorators = {
2751
2979
  position: [{ type: i0.Input }],
2752
2980
  drDropdown: [{ type: i0.Input }],
2981
+ drDropdownClass: [{ type: i0.Input }],
2753
2982
  contentCmpRef: [{ type: i0.ViewChild, args: [DrDropdownComponent, { static: true, read: i0.ViewContainerRef },] }],
2754
2983
  elementClick: [{ type: i0.HostListener, args: ['click',] }],
2755
2984
  documentClick: [{ type: i0.HostListener, args: ['document:mouseup', ['$event'],] }]
@@ -2765,14 +2994,16 @@
2765
2994
  setTimeout(this.calculatePosition.bind(this), 1);
2766
2995
  };
2767
2996
  DrDropdownPositionDirective.prototype.calculatePosition = function () {
2997
+ var xDifference = 0;
2768
2998
  var defaultDelta = 10;
2769
2999
  var defaultPadding = 0;
2770
3000
  if (this.position === 'child') {
2771
3001
  defaultDelta = 0;
2772
3002
  defaultPadding = 10;
3003
+ xDifference = this.el.nativeElement.parentElement.parentElement.offsetWidth - this.el.nativeElement.offsetWidth;
2773
3004
  var parentRect = this.el.nativeElement.parentElement.parentElement.getBoundingClientRect();
2774
3005
  this.position = {
2775
- x: this.el.nativeElement.parentElement.parentElement.offsetWidth + 2,
3006
+ x: this.el.nativeElement.offsetWidth,
2776
3007
  y: this.el.nativeElement.parentElement.parentElement.offsetTop - 9,
2777
3008
  clientX: parentRect.x + this.el.nativeElement.parentElement.parentElement.offsetWidth,
2778
3009
  clientY: parentRect.y
@@ -2808,17 +3039,21 @@
2808
3039
  : this.position === 'bottom-left' ? 'content-bottom-left'
2809
3040
  : this.position === 'left' ? 'content-left'
2810
3041
  : this.position === 'left-center' ? 'content-left-center'
2811
- : this.position === 'right' ? 'content-right' : '';
3042
+ : this.position === 'right' ? 'content-right'
3043
+ : this.position === 'bottom-right' ? 'content-bottom-right' : '';
2812
3044
  this.renderer.addClass(this.el.nativeElement, className);
2813
3045
  this.renderer.setStyle(this.el.nativeElement, 'z-index', '10010');
2814
3046
  }
2815
3047
  else {
3048
+ var defaultChildPadding = 3;
2816
3049
  var widthMoreWindowRight = window.innerWidth - this.position.clientX - this.el.nativeElement.offsetWidth - defaultPadding;
2817
- var deltaWidth = widthMoreWindowRight < 0 ? widthMoreWindowRight : defaultDelta;
2818
3050
  var widthMoreWindowBottom = window.innerHeight - this.position.clientY - this.el.nativeElement.offsetHeight - defaultPadding;
3051
+ var calculatedHorizantallyPos = widthMoreWindowRight < 0
3052
+ ? -this.position.x + -defaultChildPadding
3053
+ : this.position.x + defaultChildPadding + xDifference;
2819
3054
  var deltaHeight = widthMoreWindowBottom < 0 ? widthMoreWindowBottom : defaultDelta;
2820
3055
  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');
3056
+ this.renderer.setStyle(this.el.nativeElement, 'left', (calculatedHorizantallyPos) + 'px');
2822
3057
  this.renderer.setStyle(this.el.nativeElement, 'z-index', '10010');
2823
3058
  }
2824
3059
  };
@@ -2981,6 +3216,7 @@
2981
3216
  var components$1 = [
2982
3217
  DrButtonComponent,
2983
3218
  RadioButtonComponent,
3219
+ RadioGroupComponent,
2984
3220
  CheckboxComponent,
2985
3221
  DrInputComponent,
2986
3222
  DrSelectComponent,
@@ -2996,9 +3232,7 @@
2996
3232
  }());
2997
3233
  DrInputsModule.decorators = [
2998
3234
  { type: i0.NgModule, args: [{
2999
- declarations: [
3000
- components$1,
3001
- ],
3235
+ declarations: components$1,
3002
3236
  exports: components$1,
3003
3237
  imports: [
3004
3238
  forms.FormsModule,
@@ -3040,10 +3274,12 @@
3040
3274
  DrAvatarModule.decorators = [
3041
3275
  { type: i0.NgModule, args: [{
3042
3276
  declarations: [
3043
- DrAvatarComponent
3277
+ DrAvatarComponent,
3278
+ DrAvatarPipe
3044
3279
  ],
3045
3280
  exports: [
3046
- DrAvatarComponent
3281
+ DrAvatarComponent,
3282
+ DrAvatarPipe
3047
3283
  ],
3048
3284
  imports: [
3049
3285
  tooltip.MatTooltipModule,
@@ -3160,6 +3396,7 @@
3160
3396
  exports.DayTagComponent = DayTagComponent;
3161
3397
  exports.DrAvatarComponent = DrAvatarComponent;
3162
3398
  exports.DrAvatarModule = DrAvatarModule;
3399
+ exports.DrAvatarPipe = DrAvatarPipe;
3163
3400
  exports.DrButtonComponent = DrButtonComponent;
3164
3401
  exports.DrDatePickerComponent = DrDatePickerComponent;
3165
3402
  exports.DrDatePickerFormatDirective = DrDatePickerFormatDirective;
@@ -3196,6 +3433,7 @@
3196
3433
  exports.MonthTagComponent = MonthTagComponent;
3197
3434
  exports.QuarterTagComponent = QuarterTagComponent;
3198
3435
  exports.RadioButtonComponent = RadioButtonComponent;
3436
+ exports.RadioGroupComponent = RadioGroupComponent;
3199
3437
  exports.TooltipComponent = TooltipComponent;
3200
3438
  exports.WeekTagComponent = WeekTagComponent;
3201
3439
  exports.YearTagComponent = YearTagComponent;