@datarailsshared/datarailsshared 1.4.182 → 1.4.184

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.
@@ -450,10 +450,13 @@
450
450
  this.updateLockedDate();
451
451
  };
452
452
  ForecastTagComponent.prototype.updateYear = function (fiscalYear, month) {
453
- this.dateObj.date = fiscalYear ? moment$8((month || '01') + "/01/" + fiscalYear + " 12:00:00", 'MM/DD/YYYY hh:mm:ss').utc().unix() : moment$8.utc().unix();
453
+ var MONTH_DIFF = 1;
454
+ this.dateObj.date = fiscalYear
455
+ ? moment$8((month + MONTH_DIFF || '01') + "/01/" + fiscalYear + " 12:00:00", 'MM/DD/YYYY hh:mm:ss').utc().unix()
456
+ : moment$8.utc().unix();
454
457
  };
455
458
  ForecastTagComponent.prototype.updateLockedDate = function () {
456
- var e_1, _a;
459
+ var e_1, _b;
457
460
  var year = moment$8.unix(this.dateObj.date).year();
458
461
  var _loop_1 = function (forecastTag) {
459
462
  forecastTag.disabled = this_1.lockedDate.some(function (timestamp) {
@@ -463,15 +466,15 @@
463
466
  };
464
467
  var this_1 = this;
465
468
  try {
466
- for (var _b = __values(this.forecastTags), _c = _b.next(); !_c.done; _c = _b.next()) {
467
- var forecastTag = _c.value;
469
+ for (var _c = __values(this.forecastTags), _d = _c.next(); !_d.done; _d = _c.next()) {
470
+ var forecastTag = _d.value;
468
471
  _loop_1(forecastTag);
469
472
  }
470
473
  }
471
474
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
472
475
  finally {
473
476
  try {
474
- if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
477
+ if (_d && !_d.done && (_b = _c.return)) _b.call(_c);
475
478
  }
476
479
  finally { if (e_1) throw e_1.error; }
477
480
  }
@@ -505,14 +508,6 @@
505
508
  }
506
509
  return fiscal_year;
507
510
  };
508
- ForecastTagComponent.prototype.getForecastLabelFromValue = function (value, fiscal_year_starts_from, fiscal_year_back) {
509
- if (!value)
510
- return '';
511
- var dateObj = moment$8.unix(value);
512
- var fiscal_month = this.getFiscalMonthFromDate(dateObj, fiscal_year_starts_from);
513
- var fiscal_year = this.getFiscalYearFromDate(dateObj, fiscal_year_starts_from, fiscal_year_back);
514
- return fiscal_month + "+" + (12 - fiscal_month) + " (" + fiscal_year + ")";
515
- };
516
511
  ForecastTagComponent.prototype.changeTagInputHandler = function (event) {
517
512
  this.chosenTagHandler();
518
513
  };
@@ -522,26 +517,26 @@
522
517
  };
523
518
  ForecastTagComponent.prototype.chosenTagHandler = function () {
524
519
  var _this = this;
520
+ var _a;
525
521
  if (this.isDateEventHappened)
526
522
  return;
527
523
  var month = this.forecastValue;
528
524
  var year = moment$8.unix(this.dateObj.date).year();
529
- var label = '';
530
525
  if (!Number.isNaN(month) && !Number.isNaN(year)) {
531
- var date = moment$8(month + "/01/" + year + " 12:00:00", 'MM/DD/YYYY hh:mm:ss');
526
+ var date = new Date(year, month, 1, 12, 0, 0, 0);
532
527
  var fiscal_year_starts_from = this.fiscalYearStartsFrom || 1;
533
528
  var fiscal_year_back = this.fiscalYearBack || false;
534
529
  if (fiscal_year_starts_from !== 1) {
535
530
  if (!fiscal_year_back) {
536
- date.set('month', date.month() - 13 + fiscal_year_starts_from);
531
+ date.setMonth(date.getMonth() - 13 + fiscal_year_starts_from);
537
532
  }
538
533
  else {
539
- date.set('month', date.month() - 1 + fiscal_year_starts_from);
534
+ date.setMonth(date.getMonth() - 1 + fiscal_year_starts_from);
540
535
  }
541
536
  }
542
- label = this.getForecastLabelFromValue(date.unix(), fiscal_year_starts_from, fiscal_year_back);
543
- var fiscal_year = this.getFiscalYearFromDate(date, fiscal_year_starts_from, fiscal_year_back);
544
- this.updateYear(fiscal_year, month);
537
+ var momentDate = moment$8.unix(date.getTime() / 1000);
538
+ var fiscal_year = this.getFiscalYearFromDate(momentDate, fiscal_year_starts_from, fiscal_year_back);
539
+ this.updateYear(fiscal_year, date.getMonth());
545
540
  this.isDateEventHappened = true;
546
541
  setTimeout(function () {
547
542
  _this.isDateEventHappened = false;
@@ -550,7 +545,7 @@
550
545
  var resultTag = {
551
546
  name: this.name,
552
547
  value: this.dateObj.date,
553
- label: label,
548
+ label: (_a = _.find(this.forecastTags, { value: this.forecastValue })) === null || _a === void 0 ? void 0 : _a.label,
554
549
  locked: !this.dateFilter(moment$8.unix(this.dateObj.date))
555
550
  };
556
551
  this.dateChange.emit(resultTag);
@@ -2624,49 +2619,14 @@
2624
2619
 
2625
2620
  var DrButtonComponent = /** @class */ (function () {
2626
2621
  function DrButtonComponent() {
2627
- this._disabled = null;
2628
- this._isLoading = false;
2629
- this._elementClass = [];
2630
2622
  this.theme = 'primary';
2631
- this.isBold = false;
2623
+ this.iconSize = '24px';
2624
+ this.iconAfterSize = '24px';
2625
+ this.disabled = false;
2626
+ this.isLoading = false;
2627
+ this.isActive = false;
2632
2628
  this.click = new i0.EventEmitter();
2633
2629
  }
2634
- Object.defineProperty(DrButtonComponent.prototype, "disabled", {
2635
- set: function (value) {
2636
- if (value) {
2637
- this._elementClass.push('disabled');
2638
- }
2639
- else {
2640
- this._elementClass = this._elementClass.filter(function (item) { return item !== 'disabled'; });
2641
- }
2642
- this._disabled = value;
2643
- },
2644
- enumerable: false,
2645
- configurable: true
2646
- });
2647
- Object.defineProperty(DrButtonComponent.prototype, "isLoading", {
2648
- set: function (value) {
2649
- if (value) {
2650
- this._elementClass.push('loading');
2651
- }
2652
- else {
2653
- this._elementClass = this._elementClass.filter(function (item) { return item !== 'loading'; });
2654
- }
2655
- this._isLoading = !!value;
2656
- },
2657
- enumerable: false,
2658
- configurable: true
2659
- });
2660
- Object.defineProperty(DrButtonComponent.prototype, "elementClass", {
2661
- get: function () {
2662
- return this._elementClass.join(' ');
2663
- },
2664
- enumerable: false,
2665
- configurable: true
2666
- });
2667
- DrButtonComponent.prototype.set = function (val) {
2668
- this._elementClass = val.split(' ');
2669
- };
2670
2630
  DrButtonComponent.prototype.onClick = function ($event) {
2671
2631
  $event.preventDefault();
2672
2632
  $event.stopPropagation();
@@ -2677,43 +2637,24 @@
2677
2637
  DrButtonComponent.decorators = [
2678
2638
  { type: i0.Component, args: [{
2679
2639
  selector: 'dr-button',
2680
- template: "<button (click)=\"onClick($event)\" [disabled]=\"_disabled\" [attr.is-loading]=\"_isLoading\" [attr.bold]=\"isBold\"\n [attr.icon]=\"!!icon\" [attr.iconAfterLabel]=\"!!iconAfterLabel\" [attr.theme]=\"theme\">\n <ng-container *ngIf=\"!_isLoading\">\n <i *ngIf=\"icon\" class=\"dr\" [class]=\"icon\" [style.font-size]=\"iconSize || '24px'\" [style.color]=\"iconColor || 'inherit'\"></i>\n <ng-content></ng-content>\n <i *ngIf=\"theme === 'dropdown'\" class=\"dr-icon-arrow-down\"></i>\n <i *ngIf=\"iconAfterLabel\" class=\"dr dr-last\" [class]=\"iconAfterLabel\"\n [style.color]=\"iconColor || 'inherit'\"></i>\n </ng-container>\n <i *ngIf=\"_isLoading\" class=\"dr dr-spinner dr-icon-load\"></i>\n</button>\n",
2681
- styles: [":host{display:inline-block}:host.disabled,:host.loading{pointer-events:none}:host button[theme]{cursor:pointer;border-radius:16px;padding:5px 16px;font-family:\"Poppins\";font-style:normal;font-weight:400;font-size:14px;line-height:22px;color:#4e566c;border:1px solid #7f7fdd;display:flex;justify-content:space-between;align-items:center;height:32px}:host button[theme] .dr{padding:0;margin-left:5.35px;margin-right:8.64px}:host button[theme] .dr-spinner{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}@keyframes rotate{0%{transform:rotate()}to{transform:rotate(360deg)}}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=secondary]{padding:5px 16px;background:#ffffff;border-radius:16px;min-width:90px}:host button[theme][theme~=split-secondary-first]:hover:not([disabled]),:host button[theme][theme~=split-secondary-last]:hover:not([disabled]),:host button[theme][theme~=secondary]:hover:not([disabled]){color:#4e566c;transition:.2ms ease-in all;background:#f2f2fb;box-shadow:0 4px 14px #0000001a;border:1px solid #4646ce}:host button[theme][theme~=split-secondary-first]:active,:host button[theme][theme~=split-secondary-last]:active,:host button[theme][theme~=secondary]:active{box-shadow:none;background:#f2f2fb}:host button[theme][theme~=split-secondary-first][disabled],:host button[theme][theme~=split-secondary-last][disabled],:host button[theme][theme~=secondary][disabled]{background:#f0f1f4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-secondary-first][is-loading=true],:host button[theme][theme~=split-secondary-last][is-loading=true],:host button[theme][theme~=secondary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-last],:host button[theme][theme~=primary]{background:#4646ce;color:#fff;border:none;min-width:90px}:host button[theme][theme~=split-primary-first]:hover:not([disabled]),:host button[theme][theme~=split-primary-last]:hover:not([disabled]),:host button[theme][theme~=primary]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#25258c 0%,#4646ce 100%);box-shadow:0 4px 14px #0000001a;border:none}:host button[theme][theme~=split-primary-first]:active,:host button[theme][theme~=split-primary-last]:active,:host button[theme][theme~=primary]:active{background:#25258c}:host button[theme][theme~=split-primary-first][disabled],:host button[theme][theme~=split-primary-last][disabled],:host button[theme][theme~=primary][disabled]{background:#f0f1f4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=split-primary-first][is-loading=true],:host button[theme][theme~=split-primary-last][is-loading=true],:host button[theme][theme~=primary][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=split-primary-first] .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=primary] .dr{margin:0}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover,:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{min-width:unset;border-bottom-right-radius:0;border-top-right-radius:0}:host button[theme][theme~=split-secondary-first][icon=true],:host button[theme][theme~=split-secondary-first]:hover[icon=true],:host button[theme][theme~=split-primary-first][icon=true],:host button[theme][theme~=split-primary-first]:hover[icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{padding-left:10px;padding-right:8px}:host button[theme][theme~=split-secondary-first][icon=true]{padding-left:6px;padding-right:2px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{padding-left:12px;padding-right:9px}:host button[theme][theme~=split-primary-first],:host button[theme][theme~=split-primary-first]:hover{border-right:1px solid #fff!important}:host button[theme][theme~=split-secondary-first],:host button[theme][theme~=split-secondary-first]:hover{border-right:none!important}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover,:host button[theme][theme~=split-primary-last],:host button[theme][theme~=split-primary-last]:hover{min-width:unset;border-bottom-left-radius:0;border-top-left-radius:0}:host button[theme][theme~=split-secondary-last] .dr,:host button[theme][theme~=split-secondary-last]:hover .dr,:host button[theme][theme~=split-primary-last] .dr,:host button[theme][theme~=split-primary-last]:hover .dr{margin:0}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{padding-left:8px;padding-right:10px}:host button[theme][theme~=split-secondary-last][icon=true],:host button[theme][theme~=split-secondary-last]:hover[icon=true]{padding-left:2px;padding-right:6px}:host button[theme][theme~=split-primary-last]{padding-left:9px;padding-right:12px}:host button[theme][theme~=split-primary-last][icon=true]{padding-left:1px!important;padding-right:6px}:host button[theme][theme~=split-primary-last]:hover{padding-left:9px;padding-right:12px}:host button[theme][theme~=split-primary-last]:hover[icon=true]{padding-left:1px!important;padding-right:6px}:host button[theme][theme~=split-secondary-last],:host button[theme][theme~=split-secondary-last]:hover{margin-left:-1px}:host button[theme][theme~=danger]{background:#bf1d30;color:#fff;border:none;min-width:90px}:host button[theme][theme~=danger]:hover:not([disabled]){transition:.2ms ease-in all;background:linear-gradient(96.89deg,#740e1a 0%,#bf1d30 100%);box-shadow:0 4px 14px #0000001a;border-radius:16px;border:none}:host button[theme][theme~=danger]:active{background:#740e1a}:host button[theme][theme~=danger][disabled]{background:#f0f1f4;color:#727583;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=danger][is-loading=true]{justify-content:center;padding:5px 16px;pointer-events:none}:host button[theme][theme~=ghost]{background:none;border:none;padding:4px 8px;background:transparent;border-radius:4px;font-size:14px;font-style:normal;font-weight:400;line-height:22px;color:#6d6e6f;white-space:nowrap}:host button[theme][theme~=ghost] i{margin:0 4px 0 0}:host button[theme][theme~=ghost]:hover{background:#f5f5f5;color:#333}:host button[theme][theme~=ghost]:active:not([disabled]){color:#4646ce;background:#f2f2fb}:host button[theme][theme~=ghost][disabled]{color:#727583;cursor:default;pointer-events:none}:host button[theme][theme~=text-link]{background:none;border:none;color:#0b5af9}:host button[theme][theme~=text-link][disabled]{color:#727583;pointer-events:none}:host button[theme][theme~=primary-icon]{padding:8px;width:28px;height:28px;justify-content:center;color:#fff;background:#4646ce;border:none}:host button[theme][theme~=primary-icon]:hover,:host button[theme][theme~=primary-icon]:active{background:linear-gradient(96.89deg,#131318 0%,#4646ce 100%)}:host button[theme][theme~=primary-icon][disabled]{color:#bcbcbc;background:#e5e6ea;cursor:default;pointer-events:none}:host button[theme][theme~=primary-icon] .dr{margin:0}:host button[theme][theme~=secondary-icon]{background:white;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:1px solid #7f7fdd}:host button[theme][theme~=secondary-icon]:hover,:host button[theme][theme~=secondary-icon]:active{color:#4646ce;background:#f2f2fb}:host button[theme][theme~=secondary-icon][disabled]{color:#bcbcbc;background:#e5e6ea;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=secondary-icon] .dr{margin:0}:host button[theme][theme~=simple-text]{color:#0c142b;border:none;background:none}:host button[theme][theme~=simple-text] .dr{margin:0 8px 0 0}:host button[theme][theme~=icon]{background:none;padding:8px;width:28px;height:28px;justify-content:center;color:#4e566c;border:none}:host button[theme][theme~=icon]:hover,:host button[theme][theme~=icon]:active{background:#f0f3fc;color:#4646ce}:host button[theme][theme~=icon][disabled]{color:#bcbcbc;border:none;cursor:default;pointer-events:none}:host button[theme][theme~=icon][disabled]:hover,:host button[theme][theme~=icon][disabled]:active{background:none}:host button[theme][theme~=icon] .dr{margin:0}:host button[theme][theme~=dropdown],:host button[theme][theme~=primary-square]{background:#ffffff;border-radius:6px;border:1px solid #c3c4ce;box-shadow:none;min-width:unset}:host button[theme][theme~=dropdown]:hover,:host button[theme][theme~=primary-square]:hover{border-color:#85889c}:host button[theme][theme~=dropdown]:active,:host button[theme][theme~=primary-square]:active{border-color:#4646ce}:host button[theme][theme~=dropdown] i:first-child,:host button[theme][theme~=primary-square] i:first-child{margin-right:3px}:host button[theme][theme~=dropdown] i:last-child,:host button[theme][theme~=primary-square] i:last-child{margin-left:3px}:host button[theme][theme~=dropdown]{padding:0 8px}:host button[theme][theme~=primary-square]{padding:0;-webkit-user-select:none;user-select:none}:host button[theme][theme~=primary-square]:hover{background-color:#f9f7ff;border:1px solid #7e828e}:host button[theme][theme~=primary-square]:active{background-color:#f2f2fb;border:1px solid #4646ce}:host button[theme][theme~=primary-square][disabled]{opacity:.6;pointer-events:none}:host button[theme][theme~=link-btn]{padding:5px 8px;border:none;background:none;border-radius:5px;color:#0c142b}:host button[theme][theme~=link-btn] .dr{margin:0 4px 0 0}:host button[theme][theme~=link-btn] .dr-last{margin-right:0;margin-left:4px}:host button[theme][theme~=link-btn]:hover{background:#f2f2fb;color:#4646ce}:host button[theme][theme~=link-btn]:active{background:#f2f2fb;color:#25258c}:host button[theme][theme~=link-btn]:disabled{background:none;color:#727583}:host button[theme][theme~=link-btn]:disabled .dr{color:#bcbcbc}:host button[theme][bold=true]{font-weight:600}:host button[theme][icon=true]:not([theme~=\"primary-square\"]){padding-left:8px}:host button[theme][icon=false]{justify-content:center}:host.dr-button-selected button[theme][theme~=primary-square],:host.dr-button-selected button[theme][theme~=secondary-icon]{background-color:#f2f2fb;border:1px solid #4646ce}\n"]
2640
+ template: "<button (click)=\"onClick($event)\"\n [disabled]=\"disabled\">\n <i *ngIf=\"icon\"\n class=\"dr-button__icon\"\n [class]=\"icon\"\n [style.font-size]=\"iconSize\"\n [style.color]=\"iconColor || 'inherit'\">\n </i>\n <ng-content></ng-content>\n <div *ngIf=\"isLoading\"\n class=\"dr-button__spinner\">\n <i [style.font-size]=\"iconSize\" class=\"dr-icon-load\"></i>\n </div>\n <i *ngIf=\"iconAfter\"\n class=\"dr-button__icon dr-button__icon--after\"\n [class]=\"iconAfter\"\n [style.font-size]=\"iconAfterSize\"\n [style.color]=\"iconAfterColor || 'inherit'\">\n </i>\n</button>\n",
2641
+ styles: [":host{display:inline-block}:host.disabled,:host.loading{pointer-events:none}:host button{position:relative;display:flex;align-items:center;flex-wrap:nowrap;cursor:pointer;font-family:\"Poppins\",sans-serif;font-weight:400;font-size:14px;font-style:normal;line-height:22px;border-radius:16px;padding:4px 16px;height:32px;border:1px solid}:host button .dr-button__spinner{display:flex;align-items:center;justify-content:center;position:absolute;top:0;bottom:0;left:0;right:0;background:inherit;border-radius:inherit}:host button .dr-button__spinner i{animation-name:rotate;animation-iteration-count:infinite;animation-duration:1s}:host.with-icon button{padding-left:8px}:host.with-icon button i:first-child{margin-right:4px}:host.with-icon-after button{padding-right:8px}:host.with-icon-after button i:last-child{margin-left:4px}:host.split-primary-first button,:host.split-secondary-first button{border-bottom-right-radius:0;border-top-right-radius:0;padding-right:8px}:host.split-primary-last button,:host.split-secondary-last button{border-bottom-left-radius:0;border-top-left-radius:0;padding-right:8px;padding-left:4px;border-left:none}:host.split-primary-last button i,:host.split-secondary-last button i{margin:0!important}:host.primary button,:host.split-primary-first button,:host.split-primary-last button{color:#fff;background:#4646CE;border-color:#4646ce}:host.primary button:hover,:host.split-primary-first button:hover,:host.split-primary-last button:hover{background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);border-color:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%)}:host.primary.active button,:host.primary button:active,:host.split-primary-first.active button,:host.split-primary-first button:active,:host.split-primary-last.active button,:host.split-primary-last button:active{background:#25258C;border-color:#25258c}:host.primary.disabled button,:host.split-primary-first.disabled button,:host.split-primary-last.disabled button{color:#aeabac;background:#F0F1F4;border-color:#f0f1f4}:host.split-primary-first button{border-right-color:#dfe0e3}:host.split-primary-first.disabled button{border-right-color:#aeabac}:host.secondary button,:host.split-secondary-first button,:host.split-secondary-last button{color:#4646ce;background:#FFFFFF;border-color:#4646ce}:host.secondary button:hover,:host.split-secondary-first button:hover,:host.split-secondary-last button:hover{background:#F5F5F5;box-shadow:0 4px 14px #0000001a}:host.secondary.active button,:host.secondary button:active,:host.split-secondary-first.active button,:host.split-secondary-first button:active,:host.split-secondary-last.active button,:host.split-secondary-last button:active{background:#EAEAFF;box-shadow:none}:host.secondary.disabled button,:host.split-secondary-first.disabled button,:host.split-secondary-last.disabled button{color:#aeabac;border-color:#aeabac}:host.split-secondary-first button{border-right-color:#4646ce}:host.split-secondary-first.disabled button{border-right-color:#aeabac}:host.icon button,:host.icon-primary button,:host.icon-secondary button{width:28px;height:28px;padding:0;justify-content:center}:host.icon button i,:host.icon-primary button i,:host.icon-secondary button i{margin:0!important}:host.icon button{background:transparent;border-color:transparent;color:#6d6e6f}:host.icon button:hover{color:#333;background:#DFE0E3;border-color:#dfe0e3}:host.icon.active button,:host.icon button:active{color:#4646ce;background:#EAEAFF;border-color:#eaeaff}:host.icon.disabled button{color:#aeabac;background:transparent;border-color:transparent}:host.icon-primary button{color:#fff;background:#4646CE;border-color:#4646ce}:host.icon-primary button:hover{color:#fff;background:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%);border-color:linear-gradient(96.89deg,#25258C 0%,#4646CE 100%)}:host.icon-primary.active button,:host.icon-primary button:active{color:#fff;background:#25258C;border-color:#25258c}:host.icon-primary.disabled button{color:#aeabac;background:#F0F1F4;border-color:#f0f1f4}:host.icon-secondary button{color:#4646ce;background:#FFFFFF;border-color:#4646ce}:host.icon-secondary button:hover{color:#4646ce;background:#F5F5F5;border-color:#4646ce}:host.icon-secondary.active button,:host.icon-secondary button:active{color:#4646ce;background:#EAEAFF;border-color:#4646ce}:host.icon-secondary.disabled button{color:#aeabac;background:#F0F1F4;border-color:#f0f1f4}:host.ghost button{border-radius:4px;padding:4px;background:transparent;border-color:transparent;color:#6d6e6f}:host.ghost button .dr-button__spinner{color:#4646ce;background:#FFFFFF}:host.ghost button:hover{color:#333;background:#F5F5F5;border-color:#f5f5f5}:host.ghost.active button,:host.ghost button:active{color:#4646ce;background:#EAEAFF;border-color:#eaeaff}:host.ghost.disabled button{color:#aeabac;background:transparent;border-color:transparent}:host.selection button{border-radius:6px;padding:4px 8px;background:#FFFFFF;border-color:#9ea1aa;color:#6d6e6f}:host.selection button:hover{color:#6d6e6f;background:#F5F5F5;border-color:#4e566c}:host.selection.active button,:host.selection button:active{color:#6d6e6f;background:#EAEAFF;border-color:#4646ce}:host.selection.disabled button{color:#aeabac;background:#F0F1F4;border-color:#aeabac}:host.link button{border:none;background:none;color:#4646ce;padding:0 4px}:host.link button:hover,:host.link.active button,:host.link button:active{text-decoration:underline}:host.link.disabled button{color:#aeabac}:host.danger button{color:#fff;background:#BF1D30;border-color:#bf1d30}:host.danger button:hover{background:#981440;border-color:#981440}:host.danger.active button,:host.danger button:active{background:#680325;border-color:#680325}:host.danger.disabled button{color:#aeabac;background:#F0F1F4;border-color:#f0f1f4}@keyframes rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"]
2682
2642
  },] }
2683
2643
  ];
2684
2644
  DrButtonComponent.ctorParameters = function () { return []; };
2685
2645
  DrButtonComponent.propDecorators = {
2686
- title: [{ type: i0.Input }],
2687
- theme: [{ type: i0.Input }],
2688
- icon: [{ type: i0.Input }],
2689
- iconAfterLabel: [{ type: i0.Input }],
2690
- isBold: [{ type: i0.Input }],
2646
+ theme: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class',] }],
2647
+ icon: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.with-icon',] }],
2691
2648
  iconColor: [{ type: i0.Input }],
2692
2649
  iconSize: [{ type: i0.Input }],
2693
- disabled: [{ type: i0.Input }],
2694
- isLoading: [{ type: i0.Input }],
2695
- click: [{ type: i0.Output }],
2696
- elementClass: [{ type: i0.HostBinding, args: ['class',] }]
2650
+ iconAfter: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.with-icon-after',] }],
2651
+ iconAfterColor: [{ type: i0.Input }],
2652
+ iconAfterSize: [{ type: i0.Input }],
2653
+ disabled: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.disabled',] }],
2654
+ isLoading: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.loading',] }],
2655
+ isActive: [{ type: i0.Input }, { type: i0.HostBinding, args: ['class.active',] }],
2656
+ click: [{ type: i0.Output }]
2697
2657
  };
2698
- // Examples:
2699
- /*
2700
- <dr-button [icon]="'dr-icon-arrow-down'">hello</dr-button>
2701
- <dr-button [icon]="'dr-icon-refresh'" [theme]="'primary-icon'"></dr-button>
2702
- <dr-button [icon]="'dr-icon-refresh'" [isDisabled]="true" [theme]="'primary-icon'"></dr-button>
2703
- <dr-button [theme]="'secondary'" [icon]="'dr-icon-excel'" [iconColor]="'#03A678'"></dr-button>
2704
-
2705
- <dr-button [icon]="'dr-icon-refresh'" [theme]="'secondary-icon'"></dr-button>
2706
- <dr-button [icon]="'dr-icon-share'" [isDisabled]="true" [theme]="'secondary-icon'"></dr-button>
2707
-
2708
- <dr-button [icon]="'dr-icon-share'" [theme]="'icon'"></dr-button>
2709
- <dr-button [icon]="'dr-icon-share'" [isDisabled]="true" [theme]="'icon'"></dr-button>
2710
-
2711
- <dr-button [isDisabled]="false" [icon]="'dr-icon-refresh'">Primary</dr-button>
2712
- <dr-button [isDisabled]="false" >Primary</dr-button>
2713
- <dr-button [isDisabled]="false" [icon]="'dr-icon-refresh'" [theme]="'secondary'">Secondary</dr-button>
2714
- <dr-button [isDisabled]="false" [icon]="'dr-icon-refresh'" [theme]="'ghost'">Ghost</dr-button>
2715
- <dr-button [isDisabled]="false" [theme]="'text-link'">Text Link</dr-button>
2716
- */
2717
2658
 
2718
2659
  var DrPopoverRef = /** @class */ (function () {
2719
2660
  function DrPopoverRef(overlayRef) {